I’m trying to work around this 403 issue with Stat...
# help
d
I’m trying to work around this 403 issue with StaticSite (https://github.com/serverless-stack/serverless-stack/issues/1332). I found this article (https://levelup.gitconnected.com/use-aws-cdk-to-deploy-a-s3-bucket-static-content-and-create-route53-entries-219038d43eb) that recommends you set public read access which I can do through the static site construct. But then there’s an
s3Deployment
step that I can’t really figure out how to integrate into that static site construct.
Copy code
const site = new sst.StaticSite(this, "site", {
      path: "website",
      errorPage: "404.html",
      buildOutput: "public",
      buildCommand: "npm run build",
      customDomain: getCustomDomain(scope.stage),
      s3Bucket: {
         // in here I can set publicReactAccess and removal along with moving the index doc here
      }
     s3Deployment: // does not exist, I'd expect it to but maybe I just need to call cdk directly to host a static site?
})
f
Hey @Devin, I just read ur GH issue. Sorry about the struggle. Are you just looking for a way to enable static hosting on the S3 bucket?
d
Hey Frank. Thanks! This isn't your fault but I appreciate the empathy 😅. Yes is the direct answer. I can ofc manually turn it on, or switch to Amplify or Netlify. But it seems like being able to host and deploy a static site should be pretty low stakes, which is why I'm wondering if I've done something incorrectly