AWS S3 Buckets have to be Unique IDs?

So while I was learning about Terraform today, the tutorial mentioned that S3 bucket names must all be unique. He acted like this wasn't a big deal and I was just in absolute shock by this.

If the tutorial is to be believed, AWS has like 90% of the market. I couldn't believe that Amazon would lump all of the buckets together, essentially making it a necessity that customers have to create their own unique IDs. Surely the lecturer was mistake right?

I went and found this doc and was appalled to see this:

Important

Bucket names must be unique across all AWS accounts in all the AWS Regions within a partition. A partition is a grouping of Regions. AWS currently has three partitions: aws (commercial Regions), aws-cn (China Regions), and aws-us-gov (AWS GovCloud (US) Regions).

A bucket name can't be used by another AWS account in the same partition until the bucket is deleted. After you delete a bucket, be aware that another AWS account in the same partition can use the same bucket name for a new bucket and can therefore potentially receive requests intended for the deleted bucket. If you want to prevent this, or if you want to continue to use the same bucket name, don't delete the bucket. We recommend that you empty the bucket and keep it, and instead, block any bucket requests as needed.

S3 is broken down into Commercial, China, and US Gov. If you're in one of those, then your bucket name HAS to be unique.

So say I spin up a S3 bucket and called it SuperSecretEncryptionKeys in the Commercial instance. No one else can have that name. That's fine. It's mine.

If I delete that bucket, anyone can take that name. Understood.

Here's the issue, if someone accidentally, in a gigantic organization, deletes a bucket, but doesn't delete anything referencing that bucket then ANYONE can take the name and start serving data from that bucket.

If a bad actor gets access they can delete your bucket and start serving the same name from their bucket.

Your site looks like it's up, your data looks like it's accessible. But yet you've been compromised and the person in the background is controlling the data in that bucket.

Someone please tell me I'm wrong, but this sounds absolutely insane to me.

Sure this can happen with DNS, right? You can only have one write.firesidefedi.live. But we have open systems in plan to help combat forgetting to renew your certs, renew your domains, getting back control, etc.

This is Amazon basically saying “we put minimal effort into this, it's your responsibility.” Amazon. Who owns 90% of this market, isn't concerned with this.

I imagine that if some large corp had an issue, Amazon would jump up and help. But if a mom & pop shop had an issue? Yeah, redirect all your code to your correct bucket, but even before that, good luck even figuring it out.

This is absolutely insane to me, and yet ANOTHER example of how this shit is NOT better, despite what everyone thinks.

I don't personally use an Amazon S3 bucket, but I do use a Hetzner S3 bucket to host my Peertube VODs. I just hope Hetzner has better systems set in place than this.

Contact

Email – ozoned@ozoned.net Socialhttps://social.ozoned.net/@ozoned Matrixhttps://matrix.to/#/#the-ozoned:matrix.org Streamhttps://stream.ozoned.net Peertubehttps://video.firesidefedi.live/@ozoned WriteFreelyhttps://write.firesidefedi.live/@ozoned Ko-Fihttps://ko-fi.com/ozoned

Fireside Fedi

Livestreamhttps://stream.firesidefedi.live VODshttps://video.firesidefedi.live/a/firesidefedi Microbloghttps://social.firesidefedi.live/@firesidefedi Bloghttps://write.firesidefedi.live/firesidefedi/ Podcasthttps://audio.firesidefedi.live Calendar of Eventshttps://events.firesidefedi.live Lemmyhttps://lemmy.world/u/firesidefedi Lemmy Communityhttps://lemmyworld/c/firesidefedi Email – firesidefedi@firesidefedi.live