Fireship · @fireship

SST in 100 seconds

Uploaded June 20, 2023 · Length 2:25

SST in 100 seconds

Summary

SST is an open-source tool that simplifies building full-stack web applications with AWS using TypeScript code.

  • aws
  • sst
  • typescript
  • full-stack
  • serverless
  • aws-lambda
  • api-gateway

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:00

    SST an open source tool that actually

  2. 0:02

    makes it fun to build full stack web

  3. 0:04

    applications with AWS the problem with

  4. 0:07

    Amazon web services is that it has too

  5. 0:09

    many web services and putting them all

  6. 0:11

    together in a unified package can be

  7. 0:13

    extremely complicated SST fixes this for

  8. 0:15

    web developers by representing back-end

  9. 0:17

    infrastructure as code typescript code

  10. 0:19

    making it possible to integrate features

  11. 0:21

    like S3 storage buckets Lambda functions

  12. 0:24

    with API Gateway databases like RDS and

  13. 0:26

    dynamodb Cognito user authentication

  14. 0:28

    along with many other features without

  15. 0:30

    ever touching the AWS console and it has

  16. 0:33

    built-in deployment support for

  17. 0:34

    Frameworks like nexjs Astro and spell

  18. 0:37

    kit once initialized it provides a

  19. 0:39

    variety of simple constructs that

  20. 0:40

    represent infrastructure declaratively

  21. 0:42

    under the hood this code is based on

  22. 0:44

    Amazon's Cloud development kit and cloud

  23. 0:46

    formation these constructs are grouped

  24. 0:48

    together in Stacks which can be deployed

  25. 0:50

    together or run locally with the SST Dev

  26. 0:52

    command it provides a local development

  27. 0:54

    environment with live reloading and

  28. 0:55

    provides a web-based console to

  29. 0:57

    managerstack minus the typical AWS pain

  30. 0:59

    point to get started you'll need the AWS

  31. 1:01

    CLI with credentials set up locally next

  32. 1:04

    run the npx create SST command to drop

  33. 1:07

    in a deployment solution to your

  34. 1:08

    favorite framework or initialize it as a

  35. 1:10

    standalone project this will scaffold a

  36. 1:12

    mono repo and the packages directory is

  37. 1:14

    where you write the code to power the

  38. 1:16

    back end inside here we can write

  39. 1:17

    serverless functions in typescript that

  40. 1:19

    are powered by AWS Lambda and use API

  41. 1:22

    Gateway as the front door to see it in

  42. 1:24

    action run the dev command and that will

  43. 1:25

    automatically deploy the required

  44. 1:27

    resources to the cloud as we can see

  45. 1:28

    here on the AWS console what's really

  46. 1:30

    cool though is that we now have a local

  47. 1:32

    development environment and if we go and

  48. 1:34

    change the code in the function it's

  49. 1:35

    immediately reflected in the cloud in

  50. 1:37

    addition it spins up the local SST

  51. 1:39

    console where you can view logs and

  52. 1:41

    manager Stacks a stack is where you

  53. 1:43

    define your infrastructure as code in

  54. 1:45

    the stacks directory we have an API that

  55. 1:47

    can map URLs to Lambda functions pretty

  56. 1:49

    simple but we can expand on this by

  57. 1:51

    adding an event bus which is able to

  58. 1:53

    trigger Lambda functions based on

  59. 1:54

    different events that happen in the

  60. 1:55

    background like when a new database

  61. 1:57

    record is Created from there we can

  62. 1:58

    enable file uploads by adding the bucket