diff --git a/src/content/docs/en/guides/deploy/sst.mdx b/src/content/docs/en/guides/deploy/sst.mdx index f9e900866952b..be8219d8dad32 100644 --- a/src/content/docs/en/guides/deploy/sst.mdx +++ b/src/content/docs/en/guides/deploy/sst.mdx @@ -6,38 +6,34 @@ i18nReady: true --- import { Steps } from '@astrojs/starlight/components'; -You can deploy an Astro site using [SST](https://sst.dev), an open-source framework for deploying fully serverless applications to AWS with SSG and SSR support. +You can deploy an Astro site to AWS using [SST](https://sst.dev), an open-source framework for deploying modern full-stack applications with SSG and SSR support. -You can also use any additional SST constructs like Cron Jobs, Buckets, Queues, etc while maintaining type-safety. +You can also use any additional SST components like Cron Jobs, Buckets, Queues, etc while maintaining type-safety. ## Quickstart 1. Create an astro project. -2. Run `npx create-sst`. +2. Run `npx sst@latest init`. 3. It should detect that you are using Astro and ask you to confirm. -4. Once you're ready for deployment you can run `npx sst deploy --stage=production`. +4. Once you're ready for deployment you can run `npx sst deploy --stage production`. -You can also watch [a video walkthrough of this process](https://www.youtube.com/watch?v=AFP3ZHxO7Gg) that will guide you through the steps. +You can also read [the full Astro on AWS with SST tutorial](https://sst.dev/docs/start/aws/astro) that will guide you through the steps. -### SST constructs +### SST components -To use any [additional SST constructs](https://docs.sst.dev/), add them to `sst.config.ts`. +To use any [additional SST components](https://sst.dev/docs/), add them to `sst.config.ts`. ```ts {2} {4} title="sst.config.ts" -app.stack(function Site(ctx) { - const bucket = new Bucket(ctx.stack, "public"); - const site = new AstroSite(ctx.stack, "site", { - bind: [bucket], - }); - - ctx.stack.addOutputs({ - url: site.url, - }); +const bucket = new sst.aws.Bucket("MyBucket", { + access: "public", +}); +new sst.aws.Astro("MyWeb", { + link: [bucket], }); ``` @@ -45,11 +41,11 @@ And then access them in your `.astro` file. ```astro --- -import { Bucket } from "sst/node/bucket" -console.log(Bucket.public.bucketName) +import { Resource } from "sst" +console.log(Resource.MyBucket.name) --- ``` -Consult the [SST docs on Resource Binding](https://docs.sst.dev/resource-binding) to learn more. +Consult the [SST docs on linking resources](https://sst.dev/docs/linking) to learn more. If you have any questions, you can [ask in the SST Discord](https://discord.gg/sst).