Open natarius opened 4 years ago
Yes, a guide or some setup instructions would be really helpful.
We had the exact same problem to solve as you. Unfortunately, I ended up migrating the app off of Amplify onto our own Cloudfront/S3 distribution because Amplify does not support running Lambda@Edge lambdas. There are a few other lambda triggers within Amplify, but not any that are helpful for this use case. And there's no way to access the underlying Cloudfront distribution that Amplify is running.
I just added the relevant bits of the CloudFormation template to the amplify/backend/hosting/S3AndCloudFront/template.json
and that works fine.
We already had a lambda@edge function doing path rewrites/redirects, so we just added the relevant bits from this code to there as well.
@berenddeboer is there any chance you could provide a more step-by-step of what you needed to do in Amplify to get this to work? We have a full Amplify Next.js site, but have not implemented an Amplify backend because we didn't need one.
We are hosting a React single page app via AWS Amplify and need to serve crawlers (like Google search crawlers) a pre-rendered version of each page for SEO reasons.
I came across this repo here and wonder if anyone knows how would I go about configuring AWS Amplify to use it?
Thanks