Build full-stack applications on AWS with SST

Configuring and deploying app on AWS is a nightmare for some of us. Thankfully, a new open-source framework called SST came to life to help us all.

June 22, 2023

What's wrong with AWS ?

The problem with Amazon Web Services (AWS) is that it has too many web services. Putting them all together can be extremely difficult, not only for beginners, but for experts too.

Why ? 

Well, as said earlier, it has too much services (238 exactly). The services are awesome, and often cheap, but interacting with AWS seems like what happens when you let the developers write the platform AND the UI.

Another problem: outdated and confusing documentation. The solutions of your problems are often found on Reddit or Stack Overflow.

Current solutions to AWS nightmare

Because AWS is complicated, many solutions were created: Vercel, Heroku, DigitalOcean, Netlify, etc... They all use AWS under the hood.

The drawback: the price, you pay more than if you used AWS directly.

SST: the perfect match

SST fixes all these issues for web developers by representing back-end infrastructure as Typescript code, making it possible to integrate features like:

  • S3 storage buckets
  • Lamba functions (with API Gateway)
  • RDS & DynamoDB
  • Cognito user authentication
  • Many other features, without touching the AWS console

It also has built-in deployment support for frameworks like:

  • NextJS
  • Astro
  • Sveltekit
  • RemixJS
  • SolidStart
  • Static website

How does it work ?

Under the hood, this code is based on Amazon's Cloud Development Kit and Cloud Formation. It provides a local development environment, along with a web-based console to manage your stack.

Get started with SST

First things first, you'll need the AWS CLI with credentials set-up locally:

aws configure

Next, run the following command to start a new SST project:

npx create-sst@latest --template=graphql/rds

You have now a scaffolded monorepo like this:

Capture D’écran 2023 06 23 À 17.03.41

The /packages directory is where you write the code to power the back-end. Run the npm run dev command to automatically deploy the required resources to the cloud. Thanks to live reload, your code is immediately updated in the cloud when you change it.

Going to production requires a single command line: npx sst deploy --stage prod

For more information, check the SST's documentation.

Other articles you might like

Coolify: the free and open-source Heroku / Netlify alternative

Coolify: the free and open-source Heroku / Netlify alternative

Discover Coolify, an open-source, self-hostable alternative to Heroku and Netlify. Deploy apps, databases, and services with ease.
Improving TypeScript typings with ts-reset

Improving TypeScript typings with ts-reset

If you've ever worked with TypeScript, you know that the built-in typings are not perfect. That's where ts-reset comes in, the Typescript version of css-reset.
Generate Typescript definitions from Directus

Generate Typescript definitions from Directus

If you're working with Directus CMS, you're likely aware of its power. But, if you're not using Typescript with Directus, you may be missing out on some significant benefits.
Build a simple newsletter system with Directus

Build a simple newsletter system with Directus

Learn how to build a simple newsletter system with Directus Flows. Featuring newsletter contacts & list management, along campaigns automations.
Most STUPID Javascript tricks you shouldn't use

Most STUPID Javascript tricks you shouldn't use

The Internet is great for developers, but sometimes, you come about stupid articles like "amazing JS tips you NEVER knew about". Get ready for stupid Javascript examples.
The perfect stack for your web projects

The perfect stack for your web projects

Starting a web project from scratch is sometimes difficult, new frameworks and programming languages get around really fast these days. Let me show you the perfect stack that will help you with your future web projects.