ion
ion copied to clipboard
Using `transform` on a StaticSite causes `AccessDenied` errors
I added the following to the configuration of my StaticSite so that old files would be deleted when new builds are uploaded (by default, old files that were not included in new builds were still there, allowing users to navigate directly to pages we intended to remove).
export const web = new sst.aws.StaticSite("YourSite", {
path: "packages/web-directory",
transform: {
assets: {
transform: {
bucket: {
forceDestroy: true
}
}
}
});
After adding this transform, navigating to the website just returns AccessDenied
, which I'm assuming is because other options are being overridden, maybe with bucket permissions or cors? I don't think this is the expected behavior. Removing the transform fixes the issue.
Any help here is greatly appreciated!