Search code examples
amazon-web-servicesaws-amplify

AWS Amplify hosting performance with Cloudfront


I just tested a deployment with AWS Amplify and the Amazon console.

My app is based in Paris. I try to do a test with GTMETRIX (based in Canada), I get a bad "Largest Contentful Paint". More than 4.2s.

On the other hand, here in Europe, it loads very quickly (max 1 second).

I tested with a Canada based VPN, it is slow to load. In comparison, I hosted my application on another service (like Vercel or Netlify) and the loading is much faster.

I thought AWS Amplify was working with the Cloudfront CDN. I have the impression that it is not working properly given the slowness in other countries.

Can you tell me why ?

Thank you

PS : This is only a static vuejs application.


Solution

  • There are too many factors that leads to the slowness.

    But, Yes - AWS Amplify leverages the Amazon CloudFront Global Edge Network to distribute your web app globally. To deliver content to end users with lower latency, Amazon CloudFront uses a global network of 144 Points of Presence (133 Edge Locations and 11 Regional Edge Caches) in 65 cities across 29 countries.

    For debugging purpose, one thing that you can consider to try is by hosting your your static website in S3 and served through CloudFront (this article may help you to troubleshoot).