I'm a frontend developer and I'm working on a project that requires me to manually upload files to the app bucket whenever I make changes. While this isn't a huge hassle, I've noticed that it takes quite a bit of time to reflect my updates across different access points. Whether I use the standard domain name, the origin URL, or the alternate domain name, the update times vary. Is there any way to make this process quicker and more efficient?
1 Answer
Are you using CloudFront as a CDN with your S3 bucket? If you upload your files to S3 and then invalidate the CloudFront cache, that could speed things up. Just look for the Invalidations tab in the CloudFront console. Also, don’t forget about downstream caching issues. You can control cache behavior with HTTP cache headers to help the browser manage requests and responses better.
Yes I am, I always create an invalidation with just "/" as the path. When you mention cache headers, do you mean I should set those in AWS or in my project?