开发者

What are the restrictions on object IDs in Amazon S3?

开发者 https://www.devze.com 2023-01-05 08:54 出处:网络
I recently found out 开发者_StackOverflowthat 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 s

I recently found out 开发者_StackOverflowthat 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号