v1.16.0
版本发布时间: 2022-11-02 12:39:52
sst/sst最新发布版本:v2.41.4(2024-03-23 06:04:05)
📢 Resource Binding
We are launching Resource Binding — Access the resources in your app in a secure and typesafe way.
Here's an example:
- Create a Bucket construct in stack code.
const bucket = new Bucket(stack, "myFiles");
- Bind to a function.
myFunction.bind([bucket]);
- Access the Bucket in your function.
console.log(Bucket.myFiles.bucketName);
Learn more about Resource Binding
:warning: There are a couple of breaking changes in this release, follow the steps here to upgrade
Changes
Update using:
$ npx sst update v1.16.0
$ yarn sst update v1.16.0