We have a huge bucket of photos on s3. We add and remove from this daily but it currently has millions of photos that we don't want to rewrite or update if possible.
We have not set any expires headers on these existing photos.
I just Spun up cloudfront and pointed it to our bucket.
I have two goals now:
- Use versioning to let older photos expire from Cloudfront.
- Set Far Future Expire headers somewhere (S3, CloudFront) to inform browsers they should keep these files forever.
This raises a few questions. Can I accomplish both goals above with one setting?
Can I make this setting(s) at a bucket level, an individual photo level, or at the cloudfront level.
It would be preferable to be able to make any cache and far future expires header settings at the cloudfront or S3 bucket level and not worry about these settings on an individual photo level, especially in light of the fact that we have millions of photos without these settings already in s3.
thnks for any help, much appreciated!