Enforce SSL with S3 bucket access

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.

It’s truly baffling that it isn’t enabled by default as an option for newly created buckets but requires a policy.

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.

You are totally missing the entire point of what was asked.

The point is making it easier to secure your data.

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.

Yup, I’m misunderstanding! Nothing to see here!

Wait, does S3 accept signed URLs over HTTP?

Legacy reasons probably

Yes this is correct
I also recommend enforcing 1.2 while you are at it

https://aws.amazon.com/premiumsupport/knowledge-center/s3-enforce-modern-tls/

The statement enforces TLS requirement in general

Oh jeez, if it does, then that is crazy. I don’t think it does but I haven’t checked.