| Did this page help you? Yes No Tell us about it... |
Each Amazon S3 object has data, a key, and metadata. When you create an object you specify the key name. This key name uniquely identifies the object in the bucket. For example, in Amazon S3 console (see AWS Management Console), when you highlight a bucket, a list of objects in your bucket appear. These names are the object keys. The name for a key is a sequence of Unicode characters whose UTF-8 encoding is at most 1024 bytes long.
In addition to the key, each Amazon S3 object has metadata. It is a set of name-value pairs. There are two kinds of metadata: system metadata and user-defined metadata.
For each object stored in a bucket, Amazon S3 maintains a set of system metadata. Amazon S3 processes this system metadata as needed. For example, Amazon S3 maintains object creation date and size metadata and uses this information as part of object management.
There are two categories of system metadata. Metadata such as object creation date is system controlled where only Amazon S3 can modify the value. Other system metadata such as storage class configured for the object, whether object has server-side encryption enabled are examples of system metadata whose values you control. When you create objects you can configure values of these system metadata items or update the values when you need. For more information about storage class and server-side encryption, see Using Data Encryption.
The following table provides a list of system-defined metadata and whether you can update it.
| Name | Description | Can User Modify the Value? |
|---|---|---|
| Date | Object creation date. | No |
| Content-Length | Object size in bytes. | No |
| Last-Modified | Date the object was last modified. | No |
| Content-MD5 | The base64 encoded 128-bit MD5 digest of the object. | No |
| x-amz-server-side-encryption | Indicates whether server-side encryption is enabled for the object, that is, the object data is encrypted at rest. For more information, see Using Server-Side Encryption. | Yes |
| x-amz-version-id | Object version. When you enable versioning on a bucket, Amazon S3 assigns version number to objects added to the bucket. For more information, see Using Versioning. | No |
| x-amz-delete-marker | In a bucket that has version enabled, this boolean marker that indicates whether the object is a delete marker. | No |
| x-amz-storage-class | Storage class used for storing the object. For more information, see Using Reduced Redundancy Storage. | Yes |
When uploading an object, you can also assign metadata to the object. You provide this optional information as a name, value pair when you send a PUT or POST request to create the object. When uploading objects using the REST API the optional user-defined metadata names must begin with “x-amz-meta-“ to distinguish them from other HTTP headers. When you retrieve the object using the REST API, this prefix is returned. When uploading objects using the SOAP API, the prefix is not required. When you retrieve the object using the SOAP API, the prefix is removed, regardless of which API you used to upload the object.
When metadata is retrieved through the REST API, Amazon S3 combines headers that have the same name (ignoring case) into a comma-delimited list. If some metadata contains unprintable characters, it is not returned. Instead, the "x-amz-missing-meta" header is returned with a value of the number of the unprintable metadata entries.
Each name, value pair must conform to US-ASCII when using REST and UTF-8 when using SOAP or browser-based uploads via POST.
![]() | Note |
|---|---|
The PUT request header is limited to 8 KB in size. Within the PUT request header, the user-defined metadata is limited to 2 KB in size. User-defined metadata is a set of key-value pairs. The size of user-defined metadata is measured by taking the sum of the number of bytes in the UTF-8 encoding of each key and value. |