I’m kind of surprised and embarrassed to only realize this now but it seems that the only way to require TLS/SSL access to an S3 bucket is with a bucket policy.
Is that correct? Seems like the kind of property that, in 2022, is enabled by default. Happy to be corrected here.
OK, so you’re confirming my suspicion. . . cause this is a major WTF for me. I should have known this but holy hell, not sure how AWS hasn’t addressed this default by now.
TL;DR direct public HTTP access to S3 objects is a bit of an anti pattern.
Apologies in advance if I’m misunderstanding what you’re trying to achieve.
You could attach an ACM certificate to a CloudFront distribution with an alias domain, with your bucket being an origin, restricted to only being accessible from the distribution. That would let you enforce TLS encryption for accessing S3 objects over HTTP. If you need to access objects via API calls, then the API endpoints are secured with TLS and your API credentials. I think that signed URLs are also protected with TLS.