Skip to content

v4.21.2

Choose a tag to compare

@github-actions github-actions released this 16 Oct 01:31
· 122 commits to main since this release
Immutable release. Only release title and notes can be modified.
0cf1e64

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 role set, SST looked the role up once per function on every sst dev and sst 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 access nodes.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". The role docs 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 readTimeout and keepAliveTimeout options of a URL route on a Router (router.route()) now say what CloudFront does. readTimeout counts for each connection attempt, so a request to a destination that never answers can take readTimeout times connectionAttempts (3 by default) to fail. keepAliveTimeout is 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.2

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.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 | bash