zlacker

[parent] [thread] 6 comments
1. mikepu+(OP)[view] [source] 2023-05-04 21:06:22
And given that bucket names are a giant shared namespace, there's absolutely an incentive toward lots of prefixing to help ensure you get the ones you want.
replies(3): >>philsn+Io >>jackso+7s >>techni+cD
2. philsn+Io[view] [source] 2023-05-04 23:46:00
>>mikepu+(OP)
> ensure you get the ones you want

Also to try to avoid having to special-case any logic in terraform etc.

Say you're working on a family of sites for tradespeople like plumber.io, electrician.io, carpenter.io, etc. A fair number of people from India have "occupational surnames" like Miller, Contractor, Builder, Sheriff, etc. Suddenly one Mr. Dev Contractor registers a bucket "contractor-dev" and you have to special-case your bucket names in your terraform.

replies(1): >>wbl+iR
3. jackso+7s[view] [source] 2023-05-05 00:12:35
>>mikepu+(OP)
Yep, when writing IaC I always just give it a prefix like "$project-web" and terraform adds a long string of numbers at the end. It's going through CloudFront anyways, so no one should be referencing the bucket name directly unless they're writing to it (and writers can just do `aws s3 ls` to find the name).
4. techni+cD[view] [source] 2023-05-05 02:10:09
>>mikepu+(OP)
A while back I made one with a name like "postgresbackups" and was floored to realise later it was a global name.
replies(1): >>vlovic+bH
◧◩
5. vlovic+bH[view] [source] [discussion] 2023-05-05 03:02:42
>>techni+cD
To this day I don't know why it's a global name. For R2 we looked at this, saw the massive annoyance picking bucket names, and made it scoped to your account. CNAME records are orthogonal and can be set up to point to your bucket with a few button clicks.
replies(1): >>vlovic+fV
◧◩
6. wbl+iR[view] [source] [discussion] 2023-05-05 05:02:49
>>philsn+Io
Yanks too. What do you think Smith, Miller, Farmer, etc. are?
◧◩◪
7. vlovic+fV[view] [source] [discussion] 2023-05-05 05:48:42
>>vlovic+bH
Oh yeah, also we're more secure by default. Granted S3 was built a long time ago maybe when security was an afterthought and such mistakes are harder to correct now.

Other things I think we do better on:

* The account is the top-level thing we publish a cert for. Without knowing the bucket name you can't really do anything. With S3's global namespace, each bucket has a cert published which makes all buckets discovered as soon as they're created.

* Not default open to the world

* The R2-managed public bucket cname is shared and the URL for the bucket is random (i.e. just a UUID). Additionally, if you delete and recreate the bucket with the same name IIRC that random UUID is changed.

* We have a lot of sensible extensions like automatically creating a bucket on upload (granted not possible for S3 since buckets are global), setting per-object TTLs, handling unicode more gracefully (I think normalizing the key name is a saner choice with fewer foot guns even if there's some potential compatibility issues when you try to synchronize from a filesystem where you have two files with different forms but same normalized), etc etc etc.

[go to top]