Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

astro-sst

sst130.5kMIT3.1.3TypeScript support: included

Adapter that allows Astro to deploy your site to AWS utilizing SST.

withastro, astro-adapter

readme

astro-sst

This adapter allows Astro to deploy your SSR or static site to AWS.

Installation

Add the AWS adapter to enable SST in your Astro project with the following astro add command. This will install the adapter and make the appropriate changes to your astro.config.mjs file in one step.

# Using NPM
npx astro add astro-sst
# Using Yarn
yarn astro add astro-sst
# Using PNPM
pnpm astro add astro-sst

If you prefer to install the adapter manually instead, complete the following two steps:

  1. Install the AWS adapter to your project's dependencies using your preferred package manager. If you're using npm or aren't sure, run this in the terminal:

      npm install astro-sst
  2. Add two new lines to your astro.config.mjs project configuration file.

    `js title="astro.config.mjs" ins={2, 5-6} import { defineConfig } from "astro/config"; import aws from "astro-sst";

    export default defineConfig({ output: "server", adapter: aws(), }); `

Response Mode

When utilizing server output, you can choose how responses are handled:

  • buffer: Responses are buffered and sent as a single response. (default)
  • stream: Responses are streamed as they are generated.

`js title="astro.config.mjs" ins={2, 5-6} import { defineConfig } from "astro/config"; import aws from "astro-sst";

export default defineConfig({ output: "server", adapter: aws({ responseMode: "stream", }), }); `

Upgrading from v2

If you're upgrading from v2 of this adapter, here are the key changes to be aware of:

  1. Remove the deploymentStrategy option from astro.config.mjs. Instead, the output setting in your Astro config is now used to determine the deployment type:

    • If you previously used deploymentStrategy: "regional", now set output: "server" in astro.config.mjs.
    • If you previously used deploymentStrategy: "edge", now set output: "server" in astro.config.mjs. Update SST to v3.9.25 or later. And configure regions on your Astro component.
    • If you previously used deploymentStrategy: "static", now set output: "static" in astro.config.mjs.
  2. Remove the serverRoutes option from astro.config.mjs

changelog

astro-sst

3.1.3

Patch Changes

  • bcbfb39: Respect vite sourcemap config

3.1.2

Patch Changes

  • 9f9b7be: Return base path

3.1.1

Patch Changes

  • 3361332: Refactor (no behavior change)

3.1.0

Minor Changes

  • 8fe39af: Serve function serves /404 routes if set

3.0.4

Patch Changes

  • c7ade19: Remove deploymentStrategy option

3.0.2

Patch Changes

  • 8a4a390: Update copy

2.45.2

Patch Changes

  • 263bcb0: Migrating to astro-sst repo

2.44.0

2.43.8

2.43.7

2.43.6

Patch Changes

2.43.5

2.43.4

2.43.3

2.43.2

2.43.1

2.43.0

2.42.0

2.41.5

2.41.4

2.41.3

2.41.2

2.41.1

2.41.0

2.40.8

2.40.7

2.40.6

2.40.5

2.40.4

2.40.3

2.40.2

Patch Changes

2.40.1

Patch Changes

2.40.0

2.39.13

2.39.12

2.39.11

2.39.10

2.39.9

2.39.8

2.39.7

2.39.6

2.39.5

2.39.4

2.39.3

2.39.2

2.39.1

2.39.0

2.38.7

2.38.6

2.38.5

2.38.4

2.38.3

2.38.2

2.38.1

2.38.0

2.37.2

Patch Changes

2.37.1

Patch Changes

2.37.0

2.36.8

2.36.7

2.36.6

2.36.5

2.36.4

2.36.3

2.36.2

2.36.1

2.36.0

2.35.1

Patch Changes

2.35.0

Patch Changes

2.34.7

2.34.6

2.34.5

2.34.4

2.34.3

2.34.2

2.34.1

2.34.0

Minor Changes

Patch Changes

2.33.4

2.33.3

2.33.2

2.33.1

2.33.0

2.32.3

Patch Changes

2.32.2

2.32.1

2.32.0

2.31.0

2.30.4

2.30.3

2.30.2

2.30.1

2.30.0

Patch Changes

2.29.2

2.29.1

2.29.0

2.28.6

2.28.5

2.28.4

2.28.3

2.28.2

2.28.1

Patch Changes

2.28.0

Patch Changes

2.27.0

Minor Changes

Patch Changes

2.26.11

2.26.10

2.26.9

2.26.8

2.26.7

2.26.6

2.26.5

2.26.4

2.26.3

2.26.2

2.26.1

2.26.0

2.25.7

2.25.6

2.25.5

2.25.4

2.25.3

2.25.2

2.25.1

Patch Changes

2.25.0

2.24.28

2.24.27

2.24.26

2.24.25

2.24.24

2.24.23

2.24.22

2.24.21

2.24.20

2.24.19

2.24.18

2.24.17

2.24.16

2.24.15

2.24.14

2.24.13

2.24.12

2.24.11

2.24.10

2.24.9

2.24.8

2.24.7

2.24.6

2.24.5

2.24.4

Patch Changes

2.24.3

2.24.2

2.24.1

2.24.0

Patch Changes

2.23.15

2.23.14

2.23.13

2.23.12

2.23.11

2.23.10

2.23.9

2.23.8

2.23.7

2.23.6

2.23.5

2.23.4

2.23.3

2.23.2

2.23.1

2.23.0

Patch Changes

2.22.11

2.22.10

2.22.9

2.22.8

2.22.7

2.22.6

2.22.5

2.22.4

2.22.3

2.22.2

2.22.1

2.22.0

2.21.8

2.21.7

2.21.6

2.21.5

2.21.4

2.21.3

2.21.2

2.21.1

2.21.0

2.20.1

2.20.0

2.19.2

2.19.1

2.19.0

2.18.4

2.18.3

2.18.2

2.18.1

2.18.0

2.17.8

2.17.7

2.17.6

2.17.5

2.17.4

2.17.3

2.17.2

2.17.1

2.17.0

2.16.4

2.16.3

2.16.2

2.16.1

2.16.0

2.15.0

2.14.0

2.13.9

2.13.8

2.13.7

2.13.6

2.13.5

2.13.4

2.13.3

2.13.2

2.13.1

2.13.0

2.12.2

2.12.1

2.12.0

2.11.18

2.11.17

2.11.16

2.11.15

2.11.14

2.11.13

2.11.12

2.11.11

2.11.10

2.11.9

2.11.8

2.11.7

2.11.6

2.11.5

2.11.4

2.11.3

2.11.2

2.11.1

2.11.0

2.10.4

2.10.3

2.10.2

2.10.1

2.10.0

2.9.0

2.8.29

2.8.28

2.8.27

2.8.26

2.8.25

2.8.24

2.8.23

2.8.22

2.8.21

2.8.20

2.8.19

2.8.18

2.8.17

2.8.16

2.8.15

2.8.14

2.8.13

2.8.12

2.8.11

2.8.10

2.8.9

2.8.8

2.8.7

2.8.6

2.8.5

2.8.4

2.8.3

2.8.2

2.8.1

2.8.0

2.7.2

2.7.1

2.7.0

2.6.0

2.5.8

2.5.7

2.5.6

2.5.5

2.5.4

2.5.3

2.5.2

2.5.1

2.5.0

2.4.3

2.4.2

2.4.1

2.4.0

2.3.7

2.3.6

2.3.5

2.3.4

2.3.3

2.3.2

2.3.1

2.3.0

2.2.8

2.2.7

2.2.6

2.2.5

2.2.4

2.2.3

2.2.2

2.2.1

2.2.0

2.1.35

2.1.34

2.1.33

2.1.32

2.1.31

2.1.30

2.1.29

Patch Changes

2.1.28

2.1.27

2.1.26

2.1.25

2.1.24

2.1.23

2.1.22

2.1.21

2.1.20

2.1.19

2.1.18

2.1.17

2.1.16

2.1.15

2.1.14

2.1.13

2.1.12

2.1.11

2.1.10

Patch Changes

  • d2e7d097d Thanks @fwang! - SsrSite: set "x-forwarded-host" using CloudFront function

2.1.9

2.1.8

2.1.7

2.1.6

2.1.5

2.1.4

2.1.3

2.1.2

2.1.1

2.1.0

2.0.39

2.0.38

2.0.37

2.0.36

Patch Changes

  • d81ac9fae Thanks @thdxr! - Fixed issue with astro adapter not forwarding cookies

2.0.35

2.0.34

2.0.33

2.0.32

2.0.31

2.0.30

2.0.29

2.0.28

2.0.27

2.0.26

2.0.25

2.0.24

2.0.23

2.0.22

2.0.21

2.0.20

2.0.19

2.0.18

2.0.17

2.0.16

2.0.15

2.0.14

2.0.13

2.0.12

2.0.11

2.0.10

2.0.9

2.0.8

2.0.7

2.0.6

2.0.5

2.0.4

2.0.3

2.0.2

2.0.1

2.0.0

Major Changes

  • #2428 ce13bea66 Thanks @thdxr! - SST 2.0

    This is a major overhaul of the SST codebase primarily for ergonomics and performance. There should be no infrastructure changes however there are some project structure and package changes. Please view the upgrade guide here: https://docs.sst.dev/upgrade-guide

2.0.0-rc.71

Patch Changes

2.0.0-rc.18

Patch Changes

2.0.0-rc.17

Patch Changes