I recently found out that you can fake directory structure on S3 by putting slashes in your filenames. That got me thinking: are there any restrictions at all on object IDs? I'm sure there must be some. Length? Null characters (\0)? Arcane stuff like invalid UTF-8 characters?
I'm sure there must be some restrictions, but I can't seem to find them anywhere in the documentation.
Per the technical documentation:
A key is a sequence of Unicode characters whose UTF-8 encoding is at most 1024 bytes long.
Buckets names have additional restrictions:
We recommend that all bucket names comply with DNS naming conventions.
The rules for DNS-compliant bucket names are:
- Bucket names must be at least 3 and no more than 63 characters long.
- Bucket names must be a series of one or more labels. Adjacent labels are separated by a single period (.). Bucket names can contain lowercase letters, numbers, and hyphens. Each label must start and end with a lowercase letter or a number.
- Bucket names must not be formatted as an IP address (e.g., 192.168.5.4).
At this moment DNS compliant names are not enforced in the US Standard region but Amazon is moving towards that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With