Major changes to StaticSite
We made some changes to the StaticSite
, ReactStaticSite
, and ViteStaticSite
constructs to speed up the deployment time.
Prior to this release, on each deployment, the site is deployed to a new folder inside the S3 bucket, and the CloudFront distribution is updated to point to the new folder. This process can sometimes take more than 5 mins. On rare occasions, this process can also causes intermittent downtime for low traffic sites. Starting with this release, the site is deployed to the root of the S3 bucket. And each subsequent deployment overwrites the files of the previous deployment.
Who is affected
This should be a seamless transition for most people without any code changes. However, if you are hardcoding the bucket name, you need to change the name because this release will replace the bucket, and CloudFormation cannot replace it with the same name. For example, change this:
new StaticSite(this, "Site", {
path: "path/to/src",
s3Bucket: {
bucketName: "my-bucket",
},
});
to
new StaticSite(this, "Site", {
path: "path/to/src",
s3Bucket: {
bucketName: "my-new-bucket",
},
});
This affects the StaticSite
, ReactStaticSite
, and ViteStaticSite
constructs.
🚀 Enhancement
- #1350 StaticSite: speed up deployment (@fwang)
- #1342 Auth Console (@thdxr)
- #1348 Auth: add custom email and sms sender triggers (@fwang)
Update using:
$ npx sst update 0.61.3
$ yarn sst update 0.61.3