DEV Community

Cover image for Deploy a NEXT.js app for FREE on AWS with SST

Deploy a NEXT.js app for FREE on AWS with SST

Pierre Chollet on June 28, 2023

TL;DR What is SST ? SST is an IaC framework built on the AWS CDK, it allows you to deploy applications on AWS using TypeScript. SST in...
Collapse
 
astuyve profile image
AJ Stuyvenberg

IT'S FREE NEXT JS!

Collapse
 
jayair profile image
Jay V • Edited

Image description

Collapse
 
pchol22 profile image
Pierre Chollet

hahahaha

Collapse
 
luciacenetiempo profile image
Lucia Cenetiempo

Great tutorial on deploying Next.js apps with SST on AWS! SST makes it free and easy to deploy serverless applications, giving you control over your infrastructure. Plus, deploying on your own domain name with Route 53 adds that professional touch. Keep building and enjoy the journey! 🚀🌐

Collapse
 
levraimus profile image
Kumo Mus

P-Chol 🙌 🙌 🙌

Collapse
 
zainbinfurqan profile image
Zain Ahmed

HI, getting this error Could not load credentials from any providers

Collapse
 
pchol22 profile image
Pierre Chollet

Seems like your AWS profile is not correctly set-up.

If you need help, read an old article I wrote (dev.to/kumo/dont-miss-on-the-cloud...)
where I setup AWS from the start on the CLI.

Collapse
 
zainbinfurqan profile image
Zain Ahmed

Thanks mate. there were 2 issue one was this AWS, but second was .open-next/assets. now all good

Collapse
 
zirkelc profile image
Chris Cook

Never heard of SST before. It looks similar to the Serverless Framework. Are the two comparable?

Collapse
 
pchol22 profile image
Pierre Chollet • Edited

Hey!

Basically SST is an extension of the AWS CDK, which leverages Cloudformation to deploy apps.

The Serverless Framework also leverages Cloudformation, but in an other way.

In the end both are JS/TS IaC frameworks built on Cloudformation, and learning one is not so hard if you already used the other one!

Collapse
 
timhub profile image
Tech Tim (@TechTim42) • Edited

Good one.

Learnt something new,

One question, I thought cert manager from AWS is not free.

Collapse
 
pchol22 profile image
Pierre Chollet

Thanks!

About pricing, Part 1 of the article is contained in the free tier for an app with limited users.

In part 2, the certificate is free, Hosted zones are not (50cts/zone/month), neither is the domain name (~15$ per year).

I wrote a disclaimer at the start of part 2, saying it's not "free tier" anymore, maybe it's not visible enough 😅

Collapse
 
andrewbrown profile image
Andrew Brown 🇨🇦

You don't even need SST, you can just deploy directly to Lambda

Collapse
 
zainbinfurqan profile image
Zain Ahmed

@pchol22 Quick question, I have a domain on godaddy, can I link that domain name to this sst server ?

Collapse
 
pchol22 profile image
Pierre Chollet

Yes ! On GoDaddy, there should be an option to specify custom name servers for your domain name. Copy the 4 NS values from AWS Route 53 into GoDaddy and it should link them. (It’s not immediate)

Collapse
 
shivgonarkar profile image
shivgonarkar

I have created certificates in "us-east-1" region using Bamboo , since I need to get those certificate from vault.
I want to deploy my NextJS application in region "eu-west-1" , Just wanted to know how this can be written. How can I refer and certificate arn of us-east-1 region ? Where should I create HostedZones and how all of them can be fit in this stack. Your help will be really helpful

Collapse
 
tilo1306 profile image
Douglas dos Santos Oliveira • Edited

Hello, how would I pass the sst to generate the url= domain/mysite.
ex: mydomain/mysite