Repository navigation
Releases: sst-community/sst
Release list
v4.21.3
nodejs.install works with npm 12, and the Router's CloudFront function leaves more room for your own injection. Still built on upstream v4.17.2.
Fixes
nodejs.installnow works with npm 12. A function that installs packages at build time failed on npm 12 withEUNKNOWNCONFIG, because npm 12 rejects flags it doesn't know and--platformand--archwere two of them. The install no longer passes--platformand--arch. It selects the function's platform with--os=linuxand--cpu=<x64|arm64>(and--libc=glibcforsharp), as before, so native packages such asesbuildandsharpare still fetched for the function's architecture. npm 10 and 11 give the same result as before. npm older than 9.9 still completes the install, but installs the packages for the machine it runs on instead of the function's architecture, before and after this change. (#122, anomalyco/sst#7031, anomalyco/sst#6946)
Changes
- A
Routerleaves about 1 KB more room foredge.viewerRequest.injection. CloudFront limits the viewer-request function to 10,240 bytes, and the route lookup and thecloudfront.netblock are now minified. On a test router with three sites, a URL route and a bucket route the function went from 8,872 to 7,898 bytes, and an injection of 1,800 bytes that CloudFront rejected as too large now deploys. The 403 that a request to thecloudfront.netURL gets, from a component that has adomain(Router,StaticSiteorSsrSite) and from everyHttpsRedirect, now has the plain text body403 Forbiddeninstead of an HTML page. Its status code and description are the same.StaticSiteandSsrSiteuse the smaller block too, which saves them about 150 bytes; the rest of their function is unchanged. For aRouter, the first deploy after you update changes the code of its viewer-request function in place and replaces nothing. It also runs the route data, file sync and CloudFront invalidation steps of the sites behind theRouteragain, so eachStaticSitegets one invalidation. (#124, anomalyco/sst#7030)
Install
npm install sst@npm:@sst-community/sst@4.21.3To switch an existing project:
- Check that
node --versionshowsv22or later, wherever you runsst, CI included. - Set its dependency to
"sst": "npm:@sst-community/sst@4.21.3"and reinstall.
For a project that isn't JavaScript, install the CLI globally. It still needs Node.js 22 or later, to run sst.config.ts:
curl -fsSL https://raw.githubusercontent.com/sst-community/sst/main/install | bashv4.21.2
Faster deploys for apps that pass an IAM role to their functions, and Router timeout docs that match what CloudFront does. Still built on upstream v4.17.2.
Fixes
- A function no longer reads the IAM role you pass to it on every deploy. With
roleset, SST looked the role up once per function on everysst devandsst deploy, even when nothing had changed, so an app that shares one role across many functions paid for it many times. On a test app with 150 functions sharing one role, that was 150 reads per run, and it is now 0; a deploy with nothing to change went from 21–26 seconds to 13–18 seconds. The role is read when you accessnodes.role, and then a role that doesn't exist fails the deploy. Because of that, a role that was deleted no longer fails a deploy of an existing function: the function fails when it runs, with "The role defined for the function cannot be assumed by Lambda". Theroledocs now say so. The first deploy after you update changes none of your resources; it only drops the role reads from SST's state. (#116, anomalyco/sst#6942)
Docs
- The
readTimeoutandkeepAliveTimeoutoptions of a URL route on aRouter(router.route()) now say what CloudFront does.readTimeoutcounts for each connection attempt, so a request to a destination that never answers can takereadTimeouttimesconnectionAttempts(3 by default) to fail.keepAliveTimeoutis passed to CloudFront but ignored: the connection is kept for the keep-alive timeout of the distribution's origin, 5 seconds by default. (#112, anomalyco/sst#6987, anomalyco/sst#6900)
Install
npm install sst@npm:@sst-community/sst@4.21.2To switch an existing project:
- Check that
node --versionshowsv22or later, wherever you runsst, CI included. - Set its dependency to
"sst": "npm:@sst-community/sst@4.21.2"and reinstall.
For a project that isn't JavaScript, install the CLI globally. It still needs Node.js 22 or later, to run sst.config.ts:
curl -fsSL https://raw.githubusercontent.com/sst-community/sst/main/install | bashv5.0.0-alpha.2
The second pre-release of v5: a guide to moving from v4, a notice when a newer SST is out, faster rebuilds in sst dev, and the fixes in 4.21.0 and 4.21.1. It's on npm under the next-experimental tag, so an install without a version still gets 4.x. Built on sst-community v4.21.1 with the fixes on main since, and on upstream v4.17.2.
It's a build to try v5 with, on a stage of its own. The v5 components can still change in any way before 5.0.0.
⚠️ Breaking changes
- The functions v5 components create refuse an output for
dev,logging,url,pythonandconcurrency, assst.aws.v5.Functionalready did. A queue's subscriber is one. These decide which resources are created, so they have to be plain values. The error names the arg.
New
- A guide to moving from v4, Migrate From v4. It covers what to check in your config before you install, how to switch a component, what every v5 component does differently, what a switch can replace, a line for each component, and how to go back.
- The CLI says when a newer SST is out. Once a day, in the background, the commands that run your app, like
sst deploy,sst diffandsst dev, ask GitHub for the newest release in the CLI's major version, the onesst upgradeinstalls. When there is one, the next run showsSST 5.0.0-alpha.3 is available. Run `sst upgrade` to update.under the header. Nothing is looked for in CI, or withSST_SKIP_UPDATE_CHECK=1. sst devrebuilds the functions a change affects together, 4 Node.js functions at a time unlessSST_BUILD_CONCURRENCY_FUNCTIONsays otherwise, and files saved at once, by a formatter or agit checkout, start one rebuild instead of one each. With 16 functions that import a shared module, a change to it took 866ms of builds and takes 329ms.- A function can leave the AWS SDK out of its bundle in
sst dev, which took one function's build from 53ms to 10ms. Thenodejs.esbuilddocs show how. It's then loaded from yournode_modules, and a deploy still bundles it.
Fixes
- A
versionrule insst.config.tsaccepts a pre-release when it accepts its release.">= 4"and"5.x"accept this one, and"4.x"doesn't.5.0.0-alpha.1only met a rule that named a pre-release. - A function given a
roleno longer looks the role up on every run. Each lookup was an IAM call per function, so an app with 440 functions sharing one role spent 367s of a no-opsst devon them, and now spends 29s. A v5Functionuses a role ARN as it is, and still looks up a role given by name. (#116) - A
Mysqlwithout aversioncan be created again. It defaults to"8.0", and RDS uses its current minor version of MySQL 8.0. The old default,8.0.40, is no longer offered. A database you've deployed keeps its version. sst diffno longer shows a v5 component's function as deleted when its args hold a value that's only known on deploy, like the ARN of a layer being replaced.- A function's changed build options apply in
sst devwithout a restart. It kept building with the ones it started with. - A killed
sst tunnelorsst devno longer leaves the tunnel running. Runsudo sst tunnel installagain after you update, outside a project folder. (#101, anomalyco/sst#6297) - A Go function no longer changes when only the git commit changes, so a deploy no longer uploads every Go function after each commit. The first deploy after you update uploads each one once. (#109, anomalyco/sst#6976)
- The
Runresource no longer hangs on a long line of output. (#110, anomalyco/sst#7006)
Docs
- How a
RouterURL route's timeouts behave (#112), andsuccessoron PlanetScale'sPostgresBranchRole(#111).
Known issues
- Not ported yet: the sites (
Nextjs,Astro,StaticSiteand the rest),Vpc,Router,Cdn,MicroVm, the Cloudflare and Vercel components, and others. They work as 4.x components. The plan lists them. sst diffcan still show a 4.x component's function as deleted that the deploy then updates, as above.- Not tried in AWS yet:
sst devwith a v5ServiceorTask,getandexistingwith real resources, a customprovider, and switching a v5 component back to 4.x. - The v5 docs aren't published. The component pages and guides are in the repo, under
www/src/content/docs/docs.
Install
npm install sst@npm:@sst-community/sst@5.0.0-alpha.2To try it in an existing project:
- Use a stage of its own. A
versionrule insst.config.tshas to accept 5.x:">= 4"does, and an app without one runs with any version. - Set its dependency to
"sst": "npm:@sst-community/sst@5.0.0-alpha.2"and reinstall. - To go back, switch any v5 components back to their 4.x names and check
sst diff, then set it to4.21.1.
For a project that isn't JavaScript, install the CLI globally. This replaces a global 4.x CLI:
curl -fsSL https://raw.githubusercontent.com/sst-community/sst/main/install | VERSION=5.0.0-alpha.2 bashv4.21.1
A fix for Go functions that redeploy when nothing in them changed. Still built on upstream v4.17.2.
Fixes
- A Go function no longer changes when only the git commit changes. Go wrote the git revision and commit time into every binary it built, so a new commit gave a new binary and a new zip even if no Go file changed, and the next
sst deployuploaded new code for every Go function in the project. Deploy builds now pass-buildvcs=false, and so do the release builds of thesst devbridge task image. The first deploy after you update uploads each Go function once, because the binary changes; after that, a commit alone leaves them as they are. On a real Go function, an empty commit and a second deploy updated it before the fix and left it alone after. Dev builds are unchanged. (#109, anomalyco/sst#6976)
Also
- The
Runresource no longer hangs on a command that prints a line longer than 64 KB, and it reads stdout and stderr together, so a command that writes a lot to stderr can't block either. A line over 1 MB is replaced by a note and the lines after it still come through. Nothing in SST 4 creates aRunresource today, so no config reaches this yet. (#110, anomalyco/sst#7006)
Docs
- The PlanetScale guide explains
successoronPostgresBranchRole, which a role that owns objects needs before SST can remove it, and the Postgres examples set it. (#111, anomalyco/sst#6932)
Install
npm install sst@npm:@sst-community/sst@4.21.1To switch an existing project:
- Check that
node --versionshowsv22or later, wherever you runsst, CI included. - Set its dependency to
"sst": "npm:@sst-community/sst@4.21.1"and reinstall.
For a project that isn't JavaScript, install the CLI globally. It still needs Node.js 22 or later, to run sst.config.ts:
curl -fsSL https://raw.githubusercontent.com/sst-community/sst/main/install | bashv5.0.0-alpha.1
The first pre-release of v5, the fork's next major version. It rebuilds the components on one foundation, and lets you write and share your own the same way. It's on npm under the next-experimental tag, so an install without a version still gets 4.x. Built on sst-community v4.20.0 with the fixes on main since, and on upstream v4.17.2.
It's a build to try v5 with, on a stage of its own. The v5 components can still change in any way before 5.0.0. The 4.x components in sst.aws.* work as they do in 4.x, so an app can move to this CLI first and switch its components one at a time.
⚠️ Breaking changes
- A
versionrule insst.config.tshas to name a pre-release to accept this one.">= 5.0.0-0"accepts5.0.0-alpha.1, but">= 4","5.x"and"*"don't. Change the rule or remove it before you install. - A provider version in your config has to be in the major version SST's components are built for, or before 1.0, the minor version. An older one was already refused, and now a newer one is too, with the versions to use.
sst addpicks the newest version in that major version instead of npm'slatest. - A file in your app that re-exports a global by name no longer builds, such as
export { aws }.export const x = awsandexport default awsstill work. - A file that
app()imports can't use a provider while it loads. Providers aren't installed whenapp()is read, so a provider's module is a stub there that throws when it's used. Code that did this couldn't rely on the provider before either. - Deployed function roles no longer trust the account root, only Lambda.
sst devstill adds it. The first deploy updates every function's role in place, so a deploy role with limited permissions needsiam:UpdateAssumeRolePolicy. Add it before you update. (#95, anomalyco/sst#7026)
New
- v5 components, next to the 4.x ones. 20 are ported, as
sst.aws.v5.*:Alb,ApiGatewayV2,AppSync,Aurora,Bucket,Bus,Cluster,CognitoUserPool,CronV2,Dsql,Dynamo,Efs,Function,Mysql,Postgres,Queue,Redis,Service,SnsTopicandTask. Each declares every resource it creates as a part, and from that list gives youtransformfor any of them,existingto use one you already have, andnodesto read any of them. See the README. - Switch one component at a time and keep what's deployed. Change
sst.aws.Queuetosst.aws.v5.Queue, keep the name, and the resources stay. An objecttransformis merged deeply in v5, where 4.x replaced what it named. Each component's doc comment, inplatform/src/components/aws/v5/, has a "Switch from" section with what else is written differently. - Write your own components with
sst.component(), the way SST's own are made, from resources of any provider in your app. Whoever uses one getstransform,existingandnodesfor each of its parts, and alink()method makes it linkable. See Write a Local Component. - Share components as npm packages. A package imports
sst/componentsand its providers and lists them as peer dependencies. When an app deploys it, the package gets the app's copies. The deploy checks those peer dependencies, and says to runsst addfor a missing provider. An app without apackage.jsonlists packages in its config, underpackages. See Write a Package Component. - Test components without AWS.
mock()stands in for the deploy engine, so a test creates a component and checks what it would deploy. A package's repo imports it fromsst/testing. sst installwrites.sst/tsconfig.json, which says where the app's SST and providers are. An app'stsconfig.jsonextends it, so TypeScript reads a package's types.sst upgradeandsst initstay in the CLI's major version. This CLI upgrades to the newest 5.x, pre-releases included.- "X is not defined" in a config says how to add the provider, with
sst add. sst.aws.Rediscan create an ElastiCache Serverless cache, withserverless. (#91, anomalyco/sst#6160)
Fixes
sst devsends a function's response again when it doesn't arrive. Right after a function cold-starts, AppSync can take a response and not deliver it, and the call hung until it timed out. The CLI now sends each response and error five times, three seconds apart, and the function keeps the first to arrive. (#102, anomalyco/sst#6575)- Functions on a shared
bundleeach read their own linked resources. They shared one file, so the last one written won, and every deploy uploaded their code again. (#89, anomalyco/sst#6750) sst dev's memory stops growing as functions rebuild. It keeps at most 4 esbuild build contexts.SST_BUILD_CONTEXT_CACHEsets the number, and0turns the cache off. (#90, anomalyco/sst#6960)- A rebuild in
sst devno longer deletes a function's output from under a running worker, which broke functions with several bridge instances, such as behind CloudFront or aRouter. (#100, anomalyco/sst#6416)
Known issues
- Not ported yet: the sites (
Nextjs,Astro,StaticSiteand the rest),Vpc,Router,Cdn,MicroVm, the Cloudflare and Vercel components, and others. They work as 4.x components. The plan lists them. sst diffcan show a function as deleted that the deploy then updates, when its args hold a value that isn't known until the deploy. 4.x does the same.- Not tried in AWS yet:
sst devwith a v5ServiceorTask,getandexistingwith real resources, and a customprovider. Mysqlwithout aversioncan't be created, as RDS no longer offers its default, 8.0.40. 4.x has the same problem. Set aversion.
Install
npm install sst@npm:@sst-community/sst@5.0.0-alpha.1To try it in an existing project:
- Use a stage of its own, and check that
versioninsst.config.tsaccepts a pre-release. - Set its dependency to
"sst": "npm:@sst-community/sst@5.0.0-alpha.1"and reinstall. - To go back, set it to
4.20.0again. Switch any v5 components back to their 4.x names first.
For a project that isn't JavaScript, install the CLI globally. This replaces a global 4.x CLI:
curl -fsSL https://raw.githubusercontent.com/sst-community/sst/main/install | VERSION=5.0.0-alpha.1 bashv4.21.0
Redis on ElastiCache Serverless, function roles that stop trusting your whole AWS account outside sst dev, and fixes for sst dev and sst tunnel. Still built on upstream v4.17.2.
⚠️ Breaking changes
- The role SST creates for a function now trusts only Lambda, except in
sst dev. Before, every function role also trusted your AWS account, so anyone in it who is allowed to assume roles could take on a deployed function's permissions. The firstsst deployafter you update changes each function role in place, so a deploy role with limited permissions needsiam:UpdateAssumeRolePolicy.sst devon a deployed stage adds the account back until the next deploy. If something assumes a deployed function's role on purpose, add the trust back withtransform.role. (#95, anomalyco/sst#7026)
New
sst.aws.Rediscan create an ElastiCache Serverless cache, withserverless: trueor withstorageandecpuPerSecondlimits. It linkshost,port,usernameand a generatedpasswordlike a provisioned cluster, andserverless: { password: false }leaves the password out. A deploy role with limited permissions needs the ElastiCache user and user group actions in thepassworddocs. Turningserverlesson or off for an existing Redis replaces the cache, and its data is lost. (#91, anomalyco/sst#6219)
Fixes
- A killed
sst tunnelorsst devno longer leaves the tunnel running, which blocked the next one with "Another tunnel process is already running". The fix is in the copy at/opt/sst/tunnel, so runsudo sst tunnel installagain after you update. Run it outside a project folder: inside one, it installs thesstin that project'snode_modules. (#101, anomalyco/sst#6297) sst devno longer hangs when a function's response is lost on the way back after a cold start. The response is sent again a few times. (#102, anomalyco/sst#6575)sst devkeeps a function's build output while it rebuilds, so a running function no longer loses itsbundle.mjs. (#100, anomalyco/sst#6416)sst devno longer grows in memory as it builds functions. It keeps at most 4 esbuild build contexts.SST_BUILD_CONTEXT_CACHEchanges that; keep it at or aboveSST_BUILD_CONCURRENCY_FUNCTION. (#90, anomalyco/sst#6960)- Functions that share a
bundledirectory each get their own links. Each has its own.sst/<function name>/resource.encthere, and its zip carries only that one. A.sstfolder you keep in a bundle directory is no longer uploaded. (#89, anomalyco/sst#6772)
Also
- The README has Discord, npm and build badges. The automatic review works with its free model again (#93).
Install
npm install sst@npm:@sst-community/sst@4.21.0To switch an existing project:
- Check that
node --versionshowsv22or later, wherever you runsst, CI included. - Set its dependency to
"sst": "npm:@sst-community/sst@4.21.0"and reinstall.
For a project that isn't JavaScript, install the CLI globally. It still needs Node.js 22 or later, to run sst.config.ts:
curl -fsSL https://raw.githubusercontent.com/sst-community/sst/main/install | bashv4.20.0
A security fix for buckets served through CloudFront, EventBridge notifications for buckets, and fixes for static sites' error pages and sst dev with a custom bundle. Still built on upstream v4.17.2.
⚠️ Breaking changes
- A bucket with
access: "cloudfront"can now only be read by CloudFront distributions in your own AWS account. Before, a distribution in any account could read it through its own origin access control. This covers the assets bucket of everyStaticSiteand SSR site, and buckets routed withrouter.routeBucket. If a distribution in another account reads one of your buckets on purpose, it gets a 403 after you update. Allow it with thepolicystatement shown in theaccessdocs. (#79, anomalyco/sst#6878) - A deploy role with limited permissions needs
cloudfront:CreateOriginAccessControl,cloudfront:GetOriginAccessControlandcloudfront:DeleteOriginAccessControlto deploy aStaticSitethat has anerrorPage. Add them before you update. A site without anerrorPageneeds nothing new. (#78)
New
- Buckets can publish their events to EventBridge.
bucket.notify({ eventBridge: true })turns it on, alone or with queue, topic and function notifications.sst.aws.Bucket.subscribeEventBridge()subscribes a function to a bucket's events, filtered by event type and key, including on a bucket SST doesn't manage. (#85, anomalyco/sst#6866)
Fixes
- A
StaticSitewith anerrorPageshows that page for a missing path, instead of a 502. (#78, anomalyco/sst#7025) sst devworks with a relativebundleon a Function, such asbundle: "./dist". It crashed withERR_INVALID_ARG_TYPE. (#25, anomalyco/sst#6253)
Docs
- The bootstrap IAM policy lists everything the CLI calls:
ssm:GetParameteron/sst/bootstrap, and on/sst/bootstrap/assetto clear an older SST's bootstrap. The reset steps show the command that removes the parameter. (#81, #83)
Install
npm install sst@npm:@sst-community/sst@4.20.0To switch an existing project:
- Check that
node --versionshowsv22or later, wherever you runsst, CI included. - Set its dependency to
"sst": "npm:@sst-community/sst@4.20.0"and reinstall.
For a project that isn't JavaScript, install the CLI globally. It still needs Node.js 22 or later, to run sst.config.ts:
curl -fsSL https://raw.githubusercontent.com/sst-community/sst/main/install | bashv4.19.0
A new MicroVm component, streaming for SvelteKit, and fixes for sites with a base path and for accounts that encrypt SSM parameters. Still built on upstream v4.17.2.
⚠️ Before you upgrade
sst/aws/workflownow uses@aws/durable-execution-sdk-js2.6.0, and two errors have new classes. A step that fails insidepromise.allthrowsPromiseCombinatorError, notStepError. A failedwaitForCallbackcallback throwsCallbackExternalError, notChildContextError. Update code that checks for the old classes. (#62, anomalyco/sst#7024)
New
sst.aws.MicroVmand thesst/aws/microvmSDK, for AWS Lambda MicroVMs: isolated, stateful sandboxes with their own HTTPS endpoint. Lambda builds the image from yourDockerfile, and a linked function starts MicroVMs withmicrovm.run()and calls them withfetch(). It supports VPC egress andsst dev, and deletes old image versions. (#58)- For now every MicroVM has 2 GB and no lifecycle hooks, until the AWS provider supports them.
sst removefails while MicroVMs from the image are running. Terminate them first.- A deploy role with limited permissions needs the Lambda MicroVMs actions, including
lambda:ListMicrovms,lambda:ListMicrovmImageVersionsandlambda:DeleteMicrovmImageVersionto delete old versions.
sst.aws.SvelteKitcan stream responses. Turn it on withadapter({ streaming: true })in@sst-community/svelte-kit-sst3.1.0, out with this release. It needs this CLI or later. Update the adapter withnpm install svelte-kit-sst@npm:@sst-community/svelte-kit-sst@3.1.0. (#40, #76, anomalyco/sst#6674)
Fixes
- A site with a base path loads its static files again, instead of getting a 403 from S3. This covers Next.js
basePathand SvelteKit's and Astro'sbase. (#72, anomalyco/sst#6980) - The Router takes a base path off the start of a request path only. A request with the base text in the middle of its path, or
/administratoron a site based at/admin, got the wrong S3 key. (#75) - SST works where a policy encrypts SSM parameters. Before, every command stopped with
invalid character 'A' looking for beginning of value. With a customer managed KMS key, the role needskms:Decrypton it. (#73, anomalyco/sst#6856) - SSR sites stop right away in the 11 regions without Lambda function URLs, instead of failing minutes into the deploy. Auckland is one of them. Spain (
eu-south-2) works again. Sites without a server function aren't affected. (#60)
Examples
- The Astro examples use Astro 7, which needs Node.js 22.12 or later. Those that deploy with the adapter use
@sst-community/astro-sst. (#53, #54, #55, #56, #57)
Also
- The docs site has a logo. The workflow SDK's tests load again (#69). The automatic review asks for a
Closesline when a pull request fixes an SST issue (#71). A release that fails partway can be finished by re-running it.
Install
npm install sst@npm:@sst-community/sst@4.19.0To switch an existing project:
- Check that
node --versionshowsv22or later, wherever you runsst, CI included. - Set its dependency to
"sst": "npm:@sst-community/sst@4.19.0"and reinstall.
For a project that isn't JavaScript, install the CLI globally. It still needs Node.js 22 or later, to run sst.config.ts:
curl -fsSL https://raw.githubusercontent.com/sst-community/sst/main/install | bashv4.18.1
Now built on upstream v4.17.2, SST's latest release. 4.18.0 was built on 4.17.1. This release also fixes server routes next to prerendered pages, the visitor's address in SvelteKit apps, and JWT auth on WebSocket APIs.
⚠️ Before you upgrade
- Node.js 22 or later is still required, as since 4.18.0. The package now says so in its
enginesfield: npm, pnpm and Bun warn when you install it on an older Node.js, and Yarn 1 refuses to install it. Upgrade Node.js everywhere you runsst, CI included. - An
ApiGatewayWebSocketwith JWT auth now stops atsst diffandsst dev, not only at deploy. It could never deploy: API Gateway only supports JWT authorizers on HTTP APIs. Use a Lambda authorizer that verifies the token instead; the docs now show one. (#51, anomalyco/sst#6041)
SST 4.17.2
SST 4.17.2 has one change, which guards a function's description in sst dev against a missing value (anomalyco/sst#6984). The fork has had the same fix since 4.17.3 (#14), so nothing changes for you. sst version now shows built on SST 4.17.2.
Fixes
- Server routes in a folder with prerendered pages no longer get a 403. An
SsrSitesent a whole asset folder to S3, so when a folder held a prerendered page, the server routes in it got S3's 403. In SvelteKit, a prerendered page or endpoint in such a folder could 403 too. Those folders' files are now listed one by one, so each request goes to S3 or to the server as it should. This applies to SvelteKit, SolidStart and Astro with a server. (#35, anomalyco/sst#6143) getClientAddress()in a SvelteKit app returns the visitor's address behind CloudFront, fromCloudFront-Viewer-Address. It used to return CloudFront's own address, which changes from request to request, so rate limiting and logging saw the wrong address. It's in@sst-community/svelte-kit-sst3.0.1. The value can only be trusted when requests come through CloudFront: if you use it to allow or block clients, setprotectionon theSvelteKitcomponent, or on theRouterthat serves it. (#50)
Changes
ApiGatewayWebSocketdocuments how to accept a JWT, such as a Cognito token: a Lambda authorizer that verifies it withaws-jwt-verify. Itsjwt,payloadandresponseoptions are deprecated, since WebSocket APIs don't support or use them. (#51)- To update the SvelteKit adapter:
npm install svelte-kit-sst@npm:@sst-community/svelte-kit-sst@3.0.1.
Docs
- The landing page, the README and the docs intro say Node.js 22 or later is required.
Install
npm install sst@npm:@sst-community/sst@4.18.1To switch an existing project:
- Check that
node --versionshowsv22or later, wherever you runsst, CI included. - Set its dependency to
"sst": "npm:@sst-community/sst@4.18.1"and reinstall.
For a project that isn't JavaScript, install the CLI globally. It still needs Node.js 22 or later, to run sst.config.ts:
curl -fsSL https://raw.githubusercontent.com/sst-community/sst/main/install | bashv4.18.0
The fork's first minor release: Pulumi and the providers updated, Astro 6 and 7, and fixes for sst dev and deploys. Still built on upstream v4.17.1.
⚠️ Breaking changes
All from the Pulumi and provider update (#18):
- Node.js 22 or later is required. Pulumi's Node.js SDK, which runs your
sst.config.ts, needs it. On an older Node.js the CLI warns that SST needs Node.js 22 or later. Node.js 20 mostly works, but inline Lambda callbacks fail. Upgrade Node.js everywhere you runsst, CI included. - A deploy role with limited permissions needs
cloudfront:TagResourceandcloudfront:ListTagsForResource. The first deploy updates the tags on every site's and Router's CloudFront Functions and KV stores. Add both before you deploy. - A provider version pinned in
sst.config.tshas to be at leastaws7.48.0,command1.2.1,docker-build0.0.22,random4.21.2 ortls5.6.1. A lower pin stops withYou specified version <pin> of the "<provider>" provider. SST needs <version> or higher.Raise the pin or remove it. - The first deploy after upgrading redeploys your containers. Every image SST builds with docker-build is rebuilt once, so each
Service,Taskand containerFunctiongets a new task definition revision and a rolling deployment. Your owncommand.local.Commandandremote.Commandresources run once more too.
Fixes
sst devno longer freezes when one of its clients stops reading. A pane, a browser tab or another client that stopped reading events used to block the whole event bus, so every function invocation timed out untilsst devwas restarted. That client now misses events instead, and the log file gets a warning. (#27, anomalyco/sst#7013)sst devno longer crashes withconcurrent map read and map writewhen many invocations arrive at once. (#23, anomalyco/sst#6970)- A new function URL or SSR site no longer fails to deploy now and then with
ResourceConflictException: The function could not be updated due to a concurrent update operation. The URL's permissions are now added after the URL exists. Existing stacks get the new ordering with no resource changes. (#22, anomalyco/sst#6933) ApiGatewayV2withcors: falseleaves the CORS configuration unset, as its docs say. It used to set an empty one, under which API Gateway answers preflight requests itself and ignores the CORS headers your routes return. The next deploy removes the empty configuration from an existing API, in place. (#26, anomalyco/sst#6748)SsrSitedeploys to Auckland (ap-southeast-6). The deploy crashed, because the region had no coordinates. (#18, anomalyco/sst#6792)
Changes
- Pulumi 3.267.0, and newer providers:
@pulumi/aws7.48.0,command1.2.1,docker-build0.0.22,random4.21.2 andtls5.6.1. Cloudflare stays at 6.15.0, because from 6.18 the first deploy of an existing D1 database fails (pulumi/pulumi-cloudflare#1583). Vercel stays at 4.6.0. (#18) Functionexposes its function URL resource asnodes.url, whenurlis set. (#22)- Pulumi's log files and workspace file go to SST's folder instead of
~/.pulumi. (#18)
Astro 6 and 7
SST's astro-sst 3.x can't build an Astro 6 or 7 app. The fork now publishes the adapter as @sst-community/astro-sst 4.0.0, which works with Astro 5.6 and later, 6 and 7. Install it under the old name so import aws from "astro-sst" keeps working:
npm install astro-sst@npm:@sst-community/astro-sstsst initinstalls it for a new Astro app.sst.aws.Astrostops before the build when an Astro 6 or 7 app still has SST's adapter, and names thepackage.jsonline to change.- It fixes bugs from 3.1.4: cookies keep
Max-Age, several cookies in stream mode arrive as separate headers, binary responses such as AVIF are no longer corrupted, trailing-slash redirects andsrc/fetch.tswork, andAstro.clientAddresscan't be spoofed. The adapter's changelog has the full list, including what changes when you switch. - Astro 5.0 to 5.5 need SST's 3.x, or an Astro upgrade.
(#47)
Install
npm install sst@npm:@sst-community/sst@4.18.0To switch an existing project, set its dependency to "sst": "npm:@sst-community/sst@4.18.0" and reinstall. Without Node:
curl -fsSL https://raw.githubusercontent.com/sst-community/sst/main/install | bash