Skip to content

v4.21.0

Choose a tag to compare

@github-actions github-actions released this 13 Oct 23:33
· 108 commits to main since this release
Immutable release. Only release title and notes can be modified.

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 first sst deploy after you update changes each function role in place, so a deploy role with limited permissions needs iam:UpdateAssumeRolePolicy. sst dev on 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 with transform.role. (#95, anomalyco/sst#7026)

New

  • sst.aws.Redis can create an ElastiCache Serverless cache, with serverless: true or with storage and ecpuPerSecond limits. It links host, port, username and a generated password like a provisioned cluster, and serverless: { password: false } leaves the password out. A deploy role with limited permissions needs the ElastiCache user and user group actions in the password docs. Turning serverless on or off for an existing Redis replaces the cache, and its data is lost. (#91, anomalyco/sst#6219)

Fixes

  • A killed sst tunnel or sst dev no 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 run sudo sst tunnel install again after you update. Run it outside a project folder: inside one, it installs the sst in that project's node_modules. (#101, anomalyco/sst#6297)
  • sst dev no 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 dev keeps a function's build output while it rebuilds, so a running function no longer loses its bundle.mjs. (#100, anomalyco/sst#6416)
  • sst dev no longer grows in memory as it builds functions. It keeps at most 4 esbuild build contexts. SST_BUILD_CONTEXT_CACHE changes that; keep it at or above SST_BUILD_CONCURRENCY_FUNCTION. (#90, anomalyco/sst#6960)
  • Functions that share a bundle directory each get their own links. Each has its own .sst/<function name>/resource.enc there, and its zip carries only that one. A .sst folder 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.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.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 | bash