AWS Next.js on EC2 caching

So here is the situation: I’m planning to use Next.js SSR/SSG/ISR on Amazon’s EC2 and store images on S3 Bucket. Also to add CloudFront CDN on top of it.

The question is:
Should I cache images from S3 in Next.js (which is in EC2) thus “doubling” images (origin in S3, optimised instances in EC2 Next.js cache), or it makes no sense, since everything is located within one cloud (AWS) and covered with CDN layer (CloudFront)?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.