Reputation: 335
I am trying to implement a vue.js server(-less) side rendered webshop-a-like-site via nuxt.js on AWS Lambda backed with Cloudflare.
I prefer Cloudflare over Cloudfront because of http/3, image optimization features, safety against attacks, brotli and some more features that Cloudflare provides out-of-the-box.
Unfortunately i couldn't find any ressources if anyone did this before and what to take care of to work properly.
Right now my setup is like:
User -> Route53 -> AWS API Gateway -> AWS Lambda
-> S3 (for static files)
-> another AWS Lambda for dynamic data from Elasticsearch indexes
I am not sure where to properly integrate Cloudflare.
`I found a blogposts and threads about:
Furthermore I've read an article about the need of securing the API-Gateway against attackers by only allowing Cloudflare IPs.
Did anyone of you already setup Vue + Nuxt with Cloudflare ? Am open to any other suggestions or ideas.
Thanks a lot! Philipp
Upvotes: 1
Views: 1695
Reputation: 161
I am not sure where to properly integrate Cloudflare.
Assuming this is the crux of the question here, this is what it might look like using the notation you provided.
User -> Route53 -> Cloudflare -> AWS API Gateway -> AWS Lambda -> S3 -> Another lambda
The basic idea is that you'll want Cloudflare to be the first thing your DNS (Route53) resolves to so it can properly serve cached content before it ever reaches your application. Which, in this case, would start at API Gateway.
Upvotes: 1