Devin
02/01/2022, 12:59 AMStaticSite
and follows the Gatsby instructions pretty closely. I have a problem I don’t know how to solve so I’ll add everything that “seems” relevant.
When I look at s3 I can see two folders, which is unexpected. One folder is from the 26th and the other from the 30th (thats “correct”). Nonetheless when I navigate to <http://dev.comicshelper.com|dev.comicshelper.com>
it works, and you can click, blog, and it works great 🎉
However, if you navigate to <http://dev.comicshelper.com/blog|dev.comicshelper.com/blog>
directly, you get a 403. I do see the file /blog/index.html
in s3. Also, if I navigate to <http://dev.comicshelper.com/blog/index.html|dev.comicshelper.com/blog/index.html>
it finds the file and everything works great. Did I maybe misconfigure something in s3 or in route53? This doesn’t seem like a gatsby issue, but maybe I’m wrong or missing something goofy.Jay
Devin
02/06/2022, 10:54 PMDevin
02/06/2022, 10:55 PMconst staticSite = new sst.StaticSite(this, "Site", {
path: "website",
indexPage: "public/index.html",
errorPage: "404.html",
buildOutput: "public",
buildCommand: "npm run build",
customDomain: getCustomDomain(scope.stage, {
api: false,
app: false,
marketing: true,
}),
environment: {
GATSBY_API_URL: api.url,
},
s3Bucket: {
publicReadAccess: true,
},
cfDistribution: {
defaultBehavior: {
allowedMethods: AllowedMethods.ALLOW_ALL,
},
},
});
// in the stack:
new BucketDeployment(this, "Website Deployment", {
// Here goes the path to your website files.
// The path is relative to the root folder of your CDK app.
sources: [Source.asset("./website/public")],
destinationBucket: staticSite.s3Bucket,
autoDeleteObjects: true,
});
// Show the endpoint in the output
this.addOutputs({
// Show the url in the output
StaticSiteUrl: staticSite.url,
});
}
Devin
02/06/2022, 10:58 PMJay
Devin
02/06/2022, 11:26 PMDevin
02/06/2022, 11:27 PMJay