Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does this work with AWS Amplify? #19

Open
natarius opened this issue Nov 2, 2020 · 4 comments
Open

Does this work with AWS Amplify? #19

natarius opened this issue Nov 2, 2020 · 4 comments

Comments

@natarius
Copy link

natarius commented Nov 2, 2020

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

@daltonfury42
Copy link

Yes, a guide or some setup instructions would be really helpful.

@justanotherjones
Copy link

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.

@berenddeboer
Copy link

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.

@wyckojr
Copy link

wyckojr commented Nov 30, 2021

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants