Skip to content

v4.20.0

Choose a tag to compare

@github-actions github-actions released this 12 Oct 00:56
· 81 commits to main since this release
Immutable release. Only release title and notes can be modified.

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 every StaticSite and SSR site, and buckets routed with router.routeBucket. If a distribution in another account reads one of your buckets on purpose, it gets a 403 after you update. Allow it with the policy statement shown in the access docs. (#79, anomalyco/sst#6878)
  • A deploy role with limited permissions needs cloudfront:CreateOriginAccessControl, cloudfront:GetOriginAccessControl and cloudfront:DeleteOriginAccessControl to deploy a StaticSite that has an errorPage. Add them before you update. A site without an errorPage needs 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 StaticSite with an errorPage shows that page for a missing path, instead of a 502. (#78, anomalyco/sst#7025)
  • sst dev works with a relative bundle on a Function, such as bundle: "./dist". It crashed with ERR_INVALID_ARG_TYPE. (#25, anomalyco/sst#6253)

Docs

  • The bootstrap IAM policy lists everything the CLI calls: ssm:GetParameter on /sst/bootstrap, and on /sst/bootstrap/asset to 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.0

To switch an existing project:

  1. Check that node --version shows v22 or later, wherever you run sst, CI included.
  2. 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 | bash