Amazon Simple Storage Service – 2006-03-01 – Part 3

SSECustomerKeyMD5
  • Type: string

If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round-trip message integrity verification of the customer-provided encryption key.

SSEKMSEncryptionContext
  • Type: string

If present, specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.

SSEKMSKeyId
  • Type: string

If x-amz-server-side-encryption is present and has the value of aws:kms, this header specifies the ID of the Amazon Web Services Key Management Service (Amazon Web Services KMS) symmetric customer managed key that was used for the object.

ServerSideEncryption
  • Type: string

If you specified server-side encryption either with an Amazon Web Services KMS key or Amazon S3-managed encryption key in your PUT request, the response includes this header. It confirms the encryption algorithm that Amazon S3 used to encrypt the object.

VersionId
  • Type: string

Version of the object.

Errors

There are no errors described for this operation.

Examples

Example 1: To upload an object (specify optional headers)

The following example uploads an object. The request specifies optional request headers to directs S3 to use specific storage class and use server-side encryption.

$result = $client->putObject([
    'Body' => <BLOB>,
    'Bucket' => 'examplebucket',
    'Key' => 'HappyFace.jpg',
    'ServerSideEncryption' => 'AES256',
    'StorageClass' => 'STANDARD_IA',
]);

Result syntax:

[
    'ETag' => '"6805f2cfc46c0f04559748bb039d69ae"',
    'ServerSideEncryption' => 'AES256',
    'VersionId' => 'CG612hodqujkf8FaaNfp8U..FIhLROcp',
]
Example 2: To upload an object and specify canned ACL.

The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.

$result = $client->putObject([
    'ACL' => 'authenticated-read',
    'Body' => <BLOB>,
    'Bucket' => 'examplebucket',
    'Key' => 'exampleobject',
]);

Result syntax:

[
    'ETag' => '"6805f2cfc46c0f04559748bb039d69ae"',
    'VersionId' => 'Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr',
]
Example 3: To upload an object

The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file syntax. S3 returns VersionId of the newly created object.

$result = $client->putObject([
    'Body' => <BLOB>,
    'Bucket' => 'examplebucket',
    'Key' => 'HappyFace.jpg',
]);

Result syntax:

[
    'ETag' => '"6805f2cfc46c0f04559748bb039d69ae"',
    'VersionId' => 'tpf3zF08nBplQK1XLOefGskR7mGDwcDk',
]
Example 4: To upload an object and specify optional tags

The following example uploads an object. The request specifies optional object tags. The bucket is versioned, therefore S3 returns version ID of the newly created object.

$result = $client->putObject([
    'Body' => <BLOB>,
    'Bucket' => 'examplebucket',
    'Key' => 'HappyFace.jpg',
    'Tagging' => 'key1=value1&key2=value2',
]);

Result syntax:

[
    'ETag' => '"6805f2cfc46c0f04559748bb039d69ae"',
    'VersionId' => 'psM2sYY4.o1501dSx8wMvnkOzSBB.V4a',
]
Example 5: To upload object and specify user-defined metadata

The following example creates an object. The request also specifies optional metadata. If the bucket is versioning enabled, S3 returns version ID in response.

$result = $client->putObject([
    'Body' => <BLOB>,
    'Bucket' => 'examplebucket',
    'Key' => 'exampleobject',
    'Metadata' => [
        'metadata1' => 'value1',
        'metadata2' => 'value2',
    ],
]);

Result syntax:

[
    'ETag' => '"6805f2cfc46c0f04559748bb039d69ae"',
    'VersionId' => 'pSKidl4pHBiNwukdbcPXAIs.sshFFOc0',
]
Example 6: To upload an object and specify server-side encryption and object tags

The following example uploads and object. The request specifies the optional server-side encryption option. The request also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.

$result = $client->putObject([
    'Body' => <BLOB>,
    'Bucket' => 'examplebucket',
    'Key' => 'exampleobject',
    'ServerSideEncryption' => 'AES256',
    'Tagging' => 'key1=value1&key2=value2',
]);

Result syntax:

[
    'ETag' => '"6805f2cfc46c0f04559748bb039d69ae"',
    'ServerSideEncryption' => 'AES256',
    'VersionId' => 'Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt',
]
Example 7: To create an object.

The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response.

$result = $client->putObject([
    'Body' => <BLOB>,
    'Bucket' => 'examplebucket',
    'Key' => 'objectkey',
]);

Result syntax:

[
    'ETag' => '"6805f2cfc46c0f04559748bb039d69ae"',
    'VersionId' => 'Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ',
]
Example 8: To upload an object via an S3 access point ARN

The following example uploads an object by referencing the bucket via an S3 accesss point ARN. Result output is simplified for the example.

$result = $client->putObject([
    'Bucket' => 'arn:aws:s3:us-east-1:123456789012:accesspoint:myaccesspoint',
    'Key' => 'my-key',
    'Body' => <BLOB>,
]);

Result syntax:

[
    'ObjectURL' => 'https://my-bucket.s3.us-east-1.amazonaws.com/my-key',
]

PutObjectAcl

$result = $client->putObjectAcl([/* ... */]); $promise = $client->putObjectAclAsync([/* ... */]);

Uses the acl subresource to set the access control list (ACL) permissions for a new or existing object in an S3 bucket. You must have WRITE_ACP permission to set the ACL of an object. For more information, see What permissions can I grant? in the Amazon S3 User Guide.

This action is not supported by Amazon S3 on Outposts.

Depending on your application needs, you can choose to set the ACL on an object using either the request body or the headers. For example, if you have an existing application that updates a bucket ACL using the request body, you can continue to use that approach. For more information, see Access Control List (ACL) Overview in the Amazon S3 User Guide.

If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. You must use policies to grant access to your bucket and the objects in it. Requests to set ACLs or update ACLs fail and return the AccessControlListNotSupported error code. Requests to read ACLs are still supported. For more information, see Controlling object ownership in the Amazon S3 User Guide.

Access Permissions

You can set access permissions using one of the following methods:

  • Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined set of grantees and permissions. Specify the canned ACL name as the value of x-amz-acl. If you use this header, you cannot use other access control-specific headers in your request. For more information, see Canned ACL.
  • Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using these headers, you specify explicit access permissions and grantees (Amazon Web Services accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific headers, you cannot use x-amz-acl header to set a canned ACL. These parameters map to the set of permissions that Amazon S3 supports in an ACL. For more information, see Access Control List (ACL) Overview.You specify each grantee as a type=value pair, where the type is one of the following:
    • id – if the value specified is the canonical user ID of an Amazon Web Services account
    • uri – if you are granting permissions to a predefined group
    • emailAddress – if the value specified is the email address of an Amazon Web Services accountUsing email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:
      • US East (N. Virginia)
      • US West (N. California)
      • US West (Oregon)
      • Asia Pacific (Singapore)
      • Asia Pacific (Sydney)
      • Asia Pacific (Tokyo)
      • Europe (Ireland)
      • South America (São Paulo)

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

    For example, the following x-amz-grant-read header grants list objects permission to the two Amazon Web Services accounts identified by their email addresses.

    x-amz-grant-read: emailAddress="xyz@amazon.com", emailAddress="abc@amazon.com"

You can use either a canned ACL or specify access permissions explicitly. You cannot do both.

Grantee Values

You can specify the person (grantee) to whom you’re assigning access rights (using request elements) in the following ways:

  • By the person’s ID:<Grantee
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName>
    </Grantee>
    DisplayName is optional and ignored in the request.
  • By URI:<Grantee
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee>
  • By Email address:<Grantee
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress>lt;/Grantee>
    The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl request, appears as the CanonicalUser.

    Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

    • US East (N. Virginia)
    • US West (N. California)
    • US West (Oregon)
    • Asia Pacific (Singapore)
    • Asia Pacific (Sydney)
    • Asia Pacific (Tokyo)
    • Europe (Ireland)
    • South America (São Paulo)

    For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

Versioning

The ACL of an object is set at the object version level. By default, PUT sets the ACL of the current version of an object. To set the ACL of a different version, use the versionId subresource.

Related Resources

Parameter Syntax

$result = $client->putObjectAcl([
    'ACL' => 'private|public-read|public-read-write|authenticated-read|aws-exec-read|bucket-owner-read|bucket-owner-full-control',
    'AccessControlPolicy' => [
        'Grants' => [
            [
                'Grantee' => [
                    'DisplayName' => '<string>',
                    'EmailAddress' => '<string>',
                    'ID' => '<string>',
                    'Type' => 'CanonicalUser|AmazonCustomerByEmail|Group', // REQUIRED
                    'URI' => '<string>',
                ],
                'Permission' => 'FULL_CONTROL|WRITE|WRITE_ACP|READ|READ_ACP',
            ],
            // ...
        ],
        'Owner' => [
            'DisplayName' => '<string>',
            'ID' => '<string>',
        ],
    ],
    'Bucket' => '<string>', // REQUIRED
    'ContentMD5' => '<string>',
    'ExpectedBucketOwner' => '<string>',
    'GrantFullControl' => '<string>',
    'GrantRead' => '<string>',
    'GrantReadACP' => '<string>',
    'GrantWrite' => '<string>',
    'GrantWriteACP' => '<string>',
    'Key' => '<string>', // REQUIRED
    'RequestPayer' => 'requester',
    'VersionId' => '<string>',
]);

Parameter Details

Members
ACL
  • Type: string

The canned ACL to apply to the object. For more information, see Canned ACL.

AccessControlPolicy

Contains the elements that set the ACL permissions for an object per grantee.

Bucket
  • Required: Yes
  • Type: string

The bucket name that contains the object to which you want to attach the ACL.

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointNameAccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

ContentMD5
  • Type: string

The base64-encoded 128-bit MD5 digest of the data. This header must be used as a message integrity check to verify that the request body was not corrupted in transit. For more information, go to RFC 1864.>

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

The value will be computed on your behalf.
ExpectedBucketOwner
  • Type: string

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

GrantFullControl
  • Type: string

Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.

This action is not supported by Amazon S3 on Outposts.

GrantRead
  • Type: string

Allows grantee to list the objects in the bucket.

This action is not supported by Amazon S3 on Outposts.

GrantReadACP
  • Type: string

Allows grantee to read the bucket ACL.

This action is not supported by Amazon S3 on Outposts.

GrantWrite
  • Type: string

Allows grantee to create new objects in the bucket.

For the bucket and object owners of existing objects, also allows deletions and overwrites of those objects.

GrantWriteACP
  • Type: string

Allows grantee to write the ACL for the applicable bucket.

This action is not supported by Amazon S3 on Outposts.

Key
  • Required: Yes
  • Type: string

Key for which the PUT action was initiated.

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointNameAccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointNameAccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

RequestPayer
  • Type: string

Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. For information about downloading objects from requester pays buckets, see Downloading Objects in Requestor Pays Buckets in the Amazon S3 User Guide.

VersionId
  • Type: string

VersionId used to reference a specific version of the object.

Result Syntax

[
    'RequestCharged' => 'requester',
]

Result Details

Members
RequestCharged
  • Type: string

If present, indicates that the requester was successfully charged for the request.

Errors

Examples

Example 1: To grant permissions using object ACL

The following example adds grants to an object ACL. The first permission grants user1 and user2 FULL_CONTROL and the AllUsers group READ permission.

$result = $client->putObjectAcl([
    'AccessControlPolicy' => [
    ],
    'Bucket' => 'examplebucket',
    'GrantFullControl' => 'emailaddress=user1@example.com,emailaddress=user2@example.com',
    'GrantRead' => 'uri=http://acs.amazonaws.com/groups/global/AllUsers',
    'Key' => 'HappyFace.jpg',
]);

Result syntax:

[
]

PutObjectLegalHold

$result = $client->putObjectLegalHold([/* ... */]); $promise = $client->putObjectLegalHoldAsync([/* ... */]);

Applies a Legal Hold configuration to the specified object. For more information, see Locking Objects.

This action is not supported by Amazon S3 on Outposts.

Parameter Syntax

$result = $client->putObjectLegalHold([
    'Bucket' => '<string>', // REQUIRED
    'ContentMD5' => '<string>',
    'ExpectedBucketOwner' => '<string>',
    'Key' => '<string>', // REQUIRED
    'LegalHold' => [
        'Status' => 'ON|OFF',
    ],
    'RequestPayer' => 'requester',
    'VersionId' => '<string>',
]);

Parameter Details

Members
Bucket
  • Required: Yes
  • Type: string

The bucket name containing the object that you want to place a Legal Hold on.

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointNameAccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

ContentMD5
  • Type: string

The MD5 hash for the request body.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

The value will be computed on your behalf.
ExpectedBucketOwner
  • Type: string

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

Key
  • Required: Yes
  • Type: string

The key name for the object that you want to place a Legal Hold on.

LegalHold

Container element for the Legal Hold configuration you want to apply to the specified object.

RequestPayer
  • Type: string

Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. For information about downloading objects from requester pays buckets, see Downloading Objects in Requestor Pays Buckets in the Amazon S3 User Guide.

VersionId
  • Type: string

The version ID of the object that you want to place a Legal Hold on.

Result Syntax

[
    'RequestCharged' => 'requester',
]

Result Details

Members
RequestCharged
  • Type: string

If present, indicates that the requester was successfully charged for the request.

Errors

There are no errors described for this operation.

PutObjectLockConfiguration

$result = $client->putObjectLockConfiguration([/* ... */]); $promise = $client->putObjectLockConfigurationAsync([/* ... */]);

Places an Object Lock configuration on the specified bucket. The rule specified in the Object Lock configuration will be applied by default to every new object placed in the specified bucket. For more information, see Locking Objects.

  • The DefaultRetention settings require both a mode and a period.
  • The DefaultRetention period can be either Days or Years but you must select one. You cannot specify Days and Years at the same time.
  • You can only enable Object Lock for new buckets. If you want to turn on Object Lock for an existing bucket, contact Amazon Web Services Support.

Parameter Syntax

$result = $client->putObjectLockConfiguration([
    'Bucket' => '<string>', // REQUIRED
    'ContentMD5' => '<string>',
    'ExpectedBucketOwner' => '<string>',
    'ObjectLockConfiguration' => [
        'ObjectLockEnabled' => 'Enabled',
        'Rule' => [
            'DefaultRetention' => [
                'Days' => <integer>,
                'Mode' => 'GOVERNANCE|COMPLIANCE',
                'Years' => <integer>,
            ],
        ],
    ],
    'RequestPayer' => 'requester',
    'Token' => '<string>',
]);

Parameter Details

Members
Bucket
  • Required: Yes
  • Type: string

The bucket whose Object Lock configuration you want to create or replace.

ContentMD5
  • Type: string

The MD5 hash for the request body.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

The value will be computed on your behalf.
ExpectedBucketOwner
  • Type: string

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

ObjectLockConfiguration

The Object Lock configuration that you want to apply to the specified bucket.

RequestPayer
  • Type: string

Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. For information about downloading objects from requester pays buckets, see Downloading Objects in Requestor Pays Buckets in the Amazon S3 User Guide.

Token
  • Type: string

A token to allow Object Lock to be enabled for an existing bucket.

Result Syntax

[
    'RequestCharged' => 'requester',
]

Result Details

Members
RequestCharged
  • Type: string

If present, indicates that the requester was successfully charged for the request.

Errors

There are no errors described for this operation.

PutObjectRetention

$result = $client->putObjectRetention([/* ... */]); $promise = $client->putObjectRetentionAsync([/* ... */]);

Places an Object Retention configuration on an object. For more information, see Locking Objects. Users or accounts require the s3:PutObjectRetention permission in order to place an Object Retention configuration on objects. Bypassing a Governance Retention configuration requires the s3:BypassGovernanceRetention permission.

This action is not supported by Amazon S3 on Outposts.

Permissions

When the Object Lock retention mode is set to compliance, you need s3:PutObjectRetention and s3:BypassGovernanceRetention permissions. For other requests to PutObjectRetention, only s3:PutObjectRetention permissions are required.

Parameter Syntax

$result = $client->putObjectRetention([
    'Bucket' => '<string>', // REQUIRED
    'BypassGovernanceRetention' => true || false,
    'ContentMD5' => '<string>',
    'ExpectedBucketOwner' => '<string>',
    'Key' => '<string>', // REQUIRED
    'RequestPayer' => 'requester',
    'Retention' => [
        'Mode' => 'GOVERNANCE|COMPLIANCE',
        'RetainUntilDate' => <integer || string || DateTime>,
    ],
    'VersionId' => '<string>',
]);

Parameter Details

Members
Bucket
  • Required: Yes
  • Type: string

The bucket name that contains the object you want to apply this Object Retention configuration to.

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointNameAccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

BypassGovernanceRetention
  • Type: boolean

Indicates whether this action should bypass Governance-mode restrictions.

ContentMD5
  • Type: string

The MD5 hash for the request body.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

The value will be computed on your behalf.
ExpectedBucketOwner
  • Type: string

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

Key
  • Required: Yes
  • Type: string

The key name for the object that you want to apply this Object Retention configuration to.

RequestPayer
  • Type: string

Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. For information about downloading objects from requester pays buckets, see Downloading Objects in Requestor Pays Buckets in the Amazon S3 User Guide.

Retention

The container element for the Object Retention configuration.

VersionId
  • Type: string

The version ID for the object that you want to apply this Object Retention configuration to.

Result Syntax

[
    'RequestCharged' => 'requester',
]

Result Details

Members
RequestCharged
  • Type: string

If present, indicates that the requester was successfully charged for the request.

Errors

There are no errors described for this operation.

PutObjectTagging

$result = $client->putObjectTagging([/* ... */]); $promise = $client->putObjectTaggingAsync([/* ... */]);

Sets the supplied tag-set to an object that already exists in a bucket.

A tag is a key-value pair. You can associate tags with an object by sending a PUT request against the tagging subresource that is associated with the object. You can retrieve tags by sending a GET request. For more information, see GetObjectTagging.

For tagging-related restrictions related to characters and encodings, see Tag Restrictions. Note that Amazon S3 limits the maximum number of tags to 10 tags per object.

To use this operation, you must have permission to perform the s3:PutObjectTagging action. By default, the bucket owner has this permission and can grant this permission to others.

To put tags of any other version, use the versionId query parameter. You also need permission for the s3:PutObjectVersionTagging action.

For information about the Amazon S3 object tagging feature, see Object Tagging.

Special Errors

    • Code: InvalidTagError
    • Cause: The tag provided was not a valid tag. This error can occur if the tag did not pass input validation. For more information, see Object Tagging.
    • Code: MalformedXMLError
    • Cause: The XML provided does not match the schema.
    • Code: OperationAbortedError
    • Cause: A conflicting conditional action is currently in progress against this resource. Please try again.
    • Code: InternalError
    • Cause: The service was unable to apply the provided tag to the object.

Related Resources

Parameter Syntax

$result = $client->putObjectTagging([
    'Bucket' => '<string>', // REQUIRED
    'ContentMD5' => '<string>',
    'ExpectedBucketOwner' => '<string>',
    'Key' => '<string>', // REQUIRED
    'RequestPayer' => 'requester',
    'Tagging' => [ // REQUIRED
        'TagSet' => [ // REQUIRED
            [
                'Key' => '<string>', // REQUIRED
                'Value' => '<string>', // REQUIRED
            ],
            // ...
        ],
    ],
    'VersionId' => '<string>',
]);

Parameter Details

Members
Bucket
  • Required: Yes
  • Type: string

The bucket name containing the object.

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointNameAccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointNameAccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

ContentMD5
  • Type: string

The MD5 hash for the request body.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

The value will be computed on your behalf.
ExpectedBucketOwner
  • Type: string

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

Key
  • Required: Yes
  • Type: string

Name of the object key.

RequestPayer
  • Type: string

Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. For information about downloading objects from requester pays buckets, see Downloading Objects in Requestor Pays Buckets in the Amazon S3 User Guide.

Tagging
  • Required: Yes
  • Type: Tagging structure

Container for the TagSet and Tag elements

VersionId
  • Type: string

The versionId of the object that the tag-set will be added to.

Result Syntax

[
    'VersionId' => '<string>',
]

Result Details

Members
VersionId
  • Type: string

The versionId of the object the tag-set was added to.

Errors

There are no errors described for this operation.

Examples

Example 1: To add tags to an existing object

The following example adds tags to an existing object.

$result = $client->putObjectTagging([
    'Bucket' => 'examplebucket',
    'Key' => 'HappyFace.jpg',
    'Tagging' => [
        'TagSet' => [
            [
                'Key' => 'Key3',
                'Value' => 'Value3',
            ],
            [
                'Key' => 'Key4',
                'Value' => 'Value4',
            ],
        ],
    ],
]);

Result syntax:

[
    'VersionId' => 'null',
]

PutPublicAccessBlock

$result = $client->putPublicAccessBlock([/* ... */]); $promise = $client->putPublicAccessBlockAsync([/* ... */]);

Creates or modifies the PublicAccessBlock configuration for an Amazon S3 bucket. To use this operation, you must have the s3:PutBucketPublicAccessBlock permission. For more information about Amazon S3 permissions, see Specifying Permissions in a Policy.

When Amazon S3 evaluates the PublicAccessBlock configuration for a bucket or an object, it checks the PublicAccessBlock configuration for both the bucket (or the bucket that contains the object) and the bucket owner’s account. If the PublicAccessBlock configurations are different between the bucket and the account, Amazon S3 uses the most restrictive combination of the bucket-level and account-level settings.

For more information about when Amazon S3 considers a bucket or an object public, see The Meaning of “Public”.

Related Resources

Parameter Syntax

$result = $client->putPublicAccessBlock([
    'Bucket' => '<string>', // REQUIRED
    'ContentMD5' => '<string>',
    'ExpectedBucketOwner' => '<string>',
    'PublicAccessBlockConfiguration' => [ // REQUIRED
        'BlockPublicAcls' => true || false,
        'BlockPublicPolicy' => true || false,
        'IgnorePublicAcls' => true || false,
        'RestrictPublicBuckets' => true || false,
    ],
]);

Parameter Details

Members
Bucket
  • Required: Yes
  • Type: string

The name of the Amazon S3 bucket whose PublicAccessBlock configuration you want to set.

ContentMD5
  • Type: string

The MD5 hash of the PutPublicAccessBlock request body.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

The value will be computed on your behalf.
ExpectedBucketOwner
  • Type: string

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

PublicAccessBlockConfiguration

The PublicAccessBlock configuration that you want to apply to this Amazon S3 bucket. You can enable the configuration options in any combination. For more information about when Amazon S3 considers a bucket or object public, see The Meaning of “Public” in the Amazon S3 User Guide.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

There are no errors described for this operation.

RestoreObject

$result = $client->restoreObject([/* ... */]); $promise = $client->restoreObjectAsync([/* ... */]);

Restores an archived copy of an object back into Amazon S3

This action is not supported by Amazon S3 on Outposts.

This action performs the following types of requests:

  • select – Perform a select query on an archived object
  • restore an archive – Restore an archived object

To use this operation, you must have permissions to perform the s3:RestoreObject action. The bucket owner has this permission by default and can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources in the Amazon S3 User Guide.

Querying Archives with Select Requests

You use a select type of request to perform SQL queries on archived objects. The archived objects that are being queried by the select request must be formatted as uncompressed comma-separated values (CSV) files. You can run queries and custom analytics on your archived data without having to restore your data to a hotter Amazon S3 tier. For an overview about select requests, see Querying Archived Objects in the Amazon S3 User Guide.

When making a select request, do the following:

  • Define an output location for the select query’s output. This must be an Amazon S3 bucket in the same Amazon Web Services Region as the bucket that contains the archive object that is being queried. The Amazon Web Services account that initiates the job must have permissions to write to the S3 bucket. You can specify the storage class and encryption for the output objects stored in the bucket. For more information about output, see Querying Archived Objects in the Amazon S3 User Guide.For more information about the S3 structure in the request body, see the following:
  • Define the SQL expression for the SELECT type of restoration for your query in the request body’s SelectParameters structure. You can use expressions like the following examples.
    • The following expression returns all records from the specified object.SELECT * FROM Object
    • Assuming that you are not using any headers for data stored in the object, you can specify columns with positional headers.SELECT s._1, s._2 FROM Object s WHERE s._3 > 100
    • If you have headers and you set the fileHeaderInfo in the CSV structure in the request body to USE, you can specify headers in the query. (If you set the fileHeaderInfo field to IGNORE, the first row is skipped for the query.) You cannot mix ordinal positions with header column names.SELECT s.Id, s.FirstName, s.SSN FROM S3Object s

For more information about using SQL with S3 Glacier Select restore, see SQL Reference for Amazon S3 Select and S3 Glacier Select in the Amazon S3 User Guide.

When making a select request, you can also do the following:

  • To expedite your queries, specify the Expedited tier. For more information about tiers, see “Restoring Archives,” later in this topic.
  • Specify details about the data serialization format of both the input object that is being queried and the serialization of the CSV-encoded query results.

The following are additional important facts about the select feature:

  • The output results are new Amazon S3 objects. Unlike archive retrievals, they are stored until explicitly deleted-manually or through a lifecycle policy.
  • You can issue more than one select request on the same Amazon S3 object. Amazon S3 doesn’t deduplicate requests, so avoid issuing duplicate requests.
  • Amazon S3 accepts a select request even if the object has already been restored. A select request doesn’t return error response 409.

Restoring objects

Objects that you archive to the S3 Glacier or S3 Glacier Deep Archive storage class, and S3 Intelligent-Tiering Archive or S3 Intelligent-Tiering Deep Archive tiers are not accessible in real time. For objects in Archive Access or Deep Archive Access tiers you must first initiate a restore request, and then wait until the object is moved into the Frequent Access tier. For objects in S3 Glacier or S3 Glacier Deep Archive storage classes you must first initiate a restore request, and then wait until a temporary copy of the object is available. To access an archived object, you must restore the object for the duration (number of days) that you specify.

To restore a specific object version, you can provide a version ID. If you don’t provide a version ID, Amazon S3 restores the current version.

When restoring an archived object (or using a select request), you can specify one of the following data access tier options in the Tier element of the request body:

  • Expedited – Expedited retrievals allow you to quickly access your data stored in the S3 Glacier storage class or S3 Intelligent-Tiering Archive tier when occasional urgent requests for a subset of archives are required. For all but the largest archived objects (250 MB+), data accessed using Expedited retrievals is typically made available within 1–5 minutes. Provisioned capacity ensures that retrieval capacity for Expedited retrievals is available when you need it. Expedited retrievals and provisioned capacity are not available for objects stored in the S3 Glacier Deep Archive storage class or S3 Intelligent-Tiering Deep Archive tier.
  • Standard – Standard retrievals allow you to access any of your archived objects within several hours. This is the default option for retrieval requests that do not specify the retrieval option. Standard retrievals typically finish within 3–5 hours for objects stored in the S3 Glacier storage class or S3 Intelligent-Tiering Archive tier. They typically finish within 12 hours for objects stored in the S3 Glacier Deep Archive storage class or S3 Intelligent-Tiering Deep Archive tier. Standard retrievals are free for objects stored in S3 Intelligent-Tiering.
  • Bulk – Bulk retrievals are the lowest-cost retrieval option in S3 Glacier, enabling you to retrieve large amounts, even petabytes, of data inexpensively. Bulk retrievals typically finish within 5–12 hours for objects stored in the S3 Glacier storage class or S3 Intelligent-Tiering Archive tier. They typically finish within 48 hours for objects stored in the S3 Glacier Deep Archive storage class or S3 Intelligent-Tiering Deep Archive tier. Bulk retrievals are free for objects stored in S3 Intelligent-Tiering.

For more information about archive retrieval options and provisioned capacity for Expedited data access, see Restoring Archived Objects in the Amazon S3 User Guide.

You can use Amazon S3 restore speed upgrade to change the restore speed to a faster speed while it is in progress. For more information, see Upgrading the speed of an in-progress restore in the Amazon S3 User Guide.

To get the status of object restoration, you can send a HEAD request. Operations return the x-amz-restore header, which provides information about the restoration status, in the response. You can use Amazon S3 event notifications to notify you when a restore is initiated or completed. For more information, see Configuring Amazon S3 Event Notifications in the Amazon S3 User Guide.

After restoring an archived object, you can update the restoration period by reissuing the request with a new period. Amazon S3 updates the restoration period relative to the current time and charges only for the request-there are no data transfer charges. You cannot update the restoration period when Amazon S3 is actively processing your current restore request for the object.

If your bucket has a lifecycle configuration with a rule that includes an expiration action, the object expiration overrides the life span that you specify in a restore request. For example, if you restore an object copy for 10 days, but the object is scheduled to expire in 3 days, Amazon S3 deletes the object in 3 days. For more information about lifecycle configuration, see PutBucketLifecycleConfiguration and Object Lifecycle Management in Amazon S3 User Guide.

Responses

A successful action returns either the 200 OK or 202 Accepted status code.

  • If the object is not previously restored, then Amazon S3 returns 202 Accepted in the response.
  • If the object is previously restored, Amazon S3 returns 200 OK in the response.

Special Errors

    • Code: RestoreAlreadyInProgress
    • Cause: Object restore is already in progress. (This error does not apply to SELECT type requests.)
    • HTTP Status Code: 409 Conflict
    • SOAP Fault Code Prefix: Client
    • Code: GlacierExpeditedRetrievalNotAvailable
    • Cause: expedited retrievals are currently not available. Try again later. (Returned if there is insufficient capacity to process the Expedited request. This error applies only to Expedited retrievals and not to S3 Standard or Bulk retrievals.)
    • HTTP Status Code: 503
    • SOAP Fault Code Prefix: N/A

Related Resources

Parameter Syntax

$result = $client->restoreObject([
    'Bucket' => '<string>', // REQUIRED
    'ExpectedBucketOwner' => '<string>',
    'Key' => '<string>', // REQUIRED
    'RequestPayer' => 'requester',
    'RestoreRequest' => [
        'Days' => <integer>,
        'Description' => '<string>',
        'GlacierJobParameters' => [
            'Tier' => 'Standard|Bulk|Expedited', // REQUIRED
        ],
        'OutputLocation' => [
            'S3' => [
                'AccessControlList' => [
                    [
                        'Grantee' => [
                            'DisplayName' => '<string>',
                            'EmailAddress' => '<string>',
                            'ID' => '<string>',
                            'Type' => 'CanonicalUser|AmazonCustomerByEmail|Group', // REQUIRED
                            'URI' => '<string>',
                        ],
                        'Permission' => 'FULL_CONTROL|WRITE|WRITE_ACP|READ|READ_ACP',
                    ],
                    // ...
                ],
                'BucketName' => '<string>', // REQUIRED
                'CannedACL' => 'private|public-read|public-read-write|authenticated-read|aws-exec-read|bucket-owner-read|bucket-owner-full-control',
                'Encryption' => [
                    'EncryptionType' => 'AES256|aws:kms', // REQUIRED
                    'KMSContext' => '<string>',
                    'KMSKeyId' => '<string>',
                ],
                'Prefix' => '<string>', // REQUIRED
                'StorageClass' => 'STANDARD|REDUCED_REDUNDANCY|STANDARD_IA|ONEZONE_IA|INTELLIGENT_TIERING|GLACIER|DEEP_ARCHIVE|OUTPOSTS|GLACIER_IR',
                'Tagging' => [
                    'TagSet' => [ // REQUIRED
                        [
                            'Key' => '<string>', // REQUIRED
                            'Value' => '<string>', // REQUIRED
                        ],
                        // ...
                    ],
                ],
                'UserMetadata' => [
                    [
                        'Name' => '<string>',
                        'Value' => '<string>',
                    ],
                    // ...
                ],
            ],
        ],
        'SelectParameters' => [
            'Expression' => '<string>', // REQUIRED
            'ExpressionType' => 'SQL', // REQUIRED
            'InputSerialization' => [ // REQUIRED
                'CSV' => [
                    'AllowQuotedRecordDelimiter' => true || false,
                    'Comments' => '<string>',
                    'FieldDelimiter' => '<string>',
                    'FileHeaderInfo' => 'USE|IGNORE|NONE',
                    'QuoteCharacter' => '<string>',
                    'QuoteEscapeCharacter' => '<string>',
                    'RecordDelimiter' => '<string>',
                ],
                'CompressionType' => 'NONE|GZIP|BZIP2',
                'JSON' => [
                    'Type' => 'DOCUMENT|LINES',
                ],
                'Parquet' => [
                ],
            ],
            'OutputSerialization' => [ // REQUIRED
                'CSV' => [
                    'FieldDelimiter' => '<string>',
                    'QuoteCharacter' => '<string>',
                    'QuoteEscapeCharacter' => '<string>',
                    'QuoteFields' => 'ALWAYS|ASNEEDED',
                    'RecordDelimiter' => '<string>',
                ],
                'JSON' => [
                    'RecordDelimiter' => '<string>',
                ],
            ],
        ],
        'Tier' => 'Standard|Bulk|Expedited',
        'Type' => 'SELECT',
    ],
    'VersionId' => '<string>',
]);

Parameter Details

Members
Bucket
  • Required: Yes
  • Type: string

The bucket name containing the object to restore.

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointNameAccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointNameAccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

ExpectedBucketOwner
  • Type: string

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

Key
  • Required: Yes
  • Type: string

Object key for which the action was initiated.

RequestPayer
  • Type: string

Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. For information about downloading objects from requester pays buckets, see Downloading Objects in Requestor Pays Buckets in the Amazon S3 User Guide.

RestoreRequest

Container for restore job parameters.

VersionId
  • Type: string

VersionId used to reference a specific version of the object.

Result Syntax

[
    'RequestCharged' => 'requester',
    'RestoreOutputPath' => '<string>',
]

Result Details

Members
RequestCharged
  • Type: string

If present, indicates that the requester was successfully charged for the request.

RestoreOutputPath
  • Type: string

Indicates the path in the provided S3 output location where Select results will be restored to.

Errors

Examples

Example 1: To restore an archived object

The following example restores for one day an archived copy of an object back into Amazon S3 bucket.

$result = $client->restoreObject([
    'Bucket' => 'examplebucket',
    'Key' => 'archivedobjectkey',
    'RestoreRequest' => [
        'Days' => 1,
        'GlacierJobParameters' => [
            'Tier' => 'Expedited',
        ],
    ],
]);

Result syntax:

[
]

SelectObjectContent

$result = $client->selectObjectContent([/* ... */]); $promise = $client->selectObjectContentAsync([/* ... */]);

This action filters the contents of an Amazon S3 object based on a simple structured query language (SQL) statement. In the request, along with the SQL expression, you must also specify a data serialization format (JSON, CSV, or Apache Parquet) of the object. Amazon S3 uses this format to parse object data into records, and returns only records that match the specified SQL expression. You must also specify the data serialization format for the response.

This action is not supported by Amazon S3 on Outposts.

For more information about Amazon S3 Select, see Selecting Content from Objects in the Amazon S3 User Guide.

For more information about using SQL with Amazon S3 Select, see SQL Reference for Amazon S3 Select and S3 Glacier Select in the Amazon S3 User Guide.

 

Permissions

You must have s3:GetObject permission for this operation. Amazon S3 Select does not support anonymous access. For more information about permissions, see Specifying Permissions in a Policy in the Amazon S3 User Guide.

 

Object Data Formats

You can use Amazon S3 Select to query objects that have the following format properties:

  • CSV, JSON, and Parquet – Objects must be in CSV, JSON, or Parquet format.
  • UTF-8 – UTF-8 is the only encoding type Amazon S3 Select supports.
  • GZIP or BZIP2 – CSV and JSON files can be compressed using GZIP or BZIP2. GZIP and BZIP2 are the only compression formats that Amazon S3 Select supports for CSV and JSON files. Amazon S3 Select supports columnar compression for Parquet using GZIP or Snappy. Amazon S3 Select does not support whole-object compression for Parquet objects.
  • Server-side encryption – Amazon S3 Select supports querying objects that are protected with server-side encryption.For objects that are encrypted with customer-provided encryption keys (SSE-C), you must use HTTPS, and you must use the headers that are documented in the GetObject. For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided Encryption Keys) in the Amazon S3 User Guide.For objects that are encrypted with Amazon S3 managed encryption keys (SSE-S3) and Amazon Web Services KMS keys (SSE-KMS), server-side encryption is handled transparently, so you don’t need to specify anything. For more information about server-side encryption, including SSE-S3 and SSE-KMS, see Protecting Data Using Server-Side Encryption in the Amazon S3 User Guide.

Working with the Response Body

Given the response size is unknown, Amazon S3 Select streams the response as a series of messages and includes a Transfer-Encoding header with chunked as its value in the response. For more information, see Appendix: SelectObjectContent Response.

 

GetObject Support

The SelectObjectContent action does not support the following GetObject functionality. For more information, see GetObject.

  • Range: Although you can specify a scan range for an Amazon S3 Select request (see SelectObjectContentRequest – ScanRange in the request parameters), you cannot specify the range of bytes of an object to return.
  • GLACIER, DEEP_ARCHIVE and REDUCED_REDUNDANCY storage classes: You cannot specify the GLACIER, DEEP_ARCHIVE, or REDUCED_REDUNDANCY storage classes. For more information, about storage classes see Storage Classes in the Amazon S3 User Guide.

 

Special Errors

For a list of special errors for this operation, see List of SELECT Object Content Error Codes

Related Resources

Parameter Syntax

$result = $client->selectObjectContent([
    'Bucket' => '<string>', // REQUIRED
    'ExpectedBucketOwner' => '<string>',
    'Expression' => '<string>', // REQUIRED
    'ExpressionType' => 'SQL', // REQUIRED
    'InputSerialization' => [ // REQUIRED
        'CSV' => [
            'AllowQuotedRecordDelimiter' => true || false,
            'Comments' => '<string>',
            'FieldDelimiter' => '<string>',
            'FileHeaderInfo' => 'USE|IGNORE|NONE',
            'QuoteCharacter' => '<string>',
            'QuoteEscapeCharacter' => '<string>',
            'RecordDelimiter' => '<string>',
        ],
        'CompressionType' => 'NONE|GZIP|BZIP2',
        'JSON' => [
            'Type' => 'DOCUMENT|LINES',
        ],
        'Parquet' => [
        ],
    ],
    'Key' => '<string>', // REQUIRED
    'OutputSerialization' => [ // REQUIRED
        'CSV' => [
            'FieldDelimiter' => '<string>',
            'QuoteCharacter' => '<string>',
            'QuoteEscapeCharacter' => '<string>',
            'QuoteFields' => 'ALWAYS|ASNEEDED',
            'RecordDelimiter' => '<string>',
        ],
        'JSON' => [
            'RecordDelimiter' => '<string>',
        ],
    ],
    'RequestProgress' => [
        'Enabled' => true || false,
    ],
    'SSECustomerAlgorithm' => '<string>',
    'SSECustomerKey' => '<string>',
    'SSECustomerKeyMD5' => '<string>',
    'ScanRange' => [
        'End' => <integer>,
        'Start' => <integer>,
    ],
]);

Parameter Details

Members
Bucket
  • Required: Yes
  • Type: string

The S3 bucket.

ExpectedBucketOwner
  • Type: string

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

Expression
  • Required: Yes
  • Type: string

The expression that is used to query the object.

ExpressionType
  • Required: Yes
  • Type: string

The type of the provided expression (for example, SQL).

InputSerialization

Describes the format of the data in the object that is being queried.

Key
  • Required: Yes
  • Type: string

The object key.

OutputSerialization

Describes the format of the data that you want Amazon S3 to return in response.

RequestProgress

Specifies if periodic request progress information should be enabled.

SSECustomerAlgorithm
  • Type: string

The SSE Algorithm used to encrypt the object. For more information, see Server-Side Encryption (Using Customer-Provided Encryption Keys.

SSECustomerKey
  • Type: string

The SSE Customer Key. For more information, see Server-Side Encryption (Using Customer-Provided Encryption Keys.

This value will be base64 encoded on your behalf.
SSECustomerKeyMD5
  • Type: string

The SSE Customer Key MD5. For more information, see Server-Side Encryption (Using Customer-Provided Encryption Keys.

ScanRange

Specifies the byte range of the object to get the records from. A record is processed when its first byte is contained by the range. This parameter is optional, but when specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the start and end of the range.

ScanRangemay be used in the following ways:

  • <scanrange><start>50</start><end>100</end></scanrange> – process only the records starting between the bytes 50 and 100 (inclusive, counting from zero)
  • <scanrange><start>50</start></scanrange> – process only the records starting after the byte 50
  • <scanrange><end>50</end></scanrange> – process only the records within the last 50 bytes of the file.

Result Syntax

[
    'Payload' => [ // EventParsingIterator
        'Cont' => [
        ],
        'End' => [
        ],
        'Progress' => [
            'Details' => [
                'BytesProcessed' => <integer>,
                'BytesReturned' => <integer>,
                'BytesScanned' => <integer>,
            ],
        ],
        'Records' => [
            'Payload' => <string || resource || Psr\Http\Message\StreamInterface>,
        ],
        'Stats' => [
            'Details' => [
                'BytesProcessed' => <integer>,
                'BytesReturned' => <integer>,
                'BytesScanned' => <integer>,
            ],
        ],
    ],
]

Result Details

Members
Payload

The array of results.

Using an EventParsingIterator

To use an EventParsingIterator, you will need to loop over the events it will generate and check the top-level field to determine which type of event it is.

foreach($result['Payload'] as $event) {
    if (isset($event['Cont'])) {
        // Handle the 'Cont' event.
    } else if (isset($event['End'])) {
        // Handle the 'End' event.
    } else if (isset($event['Progress'])) {
        // Handle the 'Progress' event.
    } else if (isset($event['Records'])) {
        // Handle the 'Records' event.
    } else if (isset($event['Stats'])) {
        // Handle the 'Stats' event.
    }
}

Errors

There are no errors described for this operation.

UploadPart

$result = $client->uploadPart([/* ... */]); $promise = $client->uploadPartAsync([/* ... */]);

Uploads a part in a multipart upload.

In this operation, you provide part data in your request. However, you have an option to specify your existing Amazon S3 object as a data source for the part you are uploading. To upload a part from an existing object, you use the UploadPartCopy operation.

You must initiate a multipart upload (see CreateMultipartUpload) before you can upload any part. In response to your initiate request, Amazon S3 returns an upload ID, a unique identifier, that you must include in your upload part request.

Part numbers can be any number from 1 to 10,000, inclusive. A part number uniquely identifies a part and also defines its position within the object being created. If you upload a new part using the same part number that was used with a previous part, the previously uploaded part is overwritten. Each part must be at least 5 MB in size, except the last part. There is no size limit on the last part of your multipart upload.

To ensure that data is not corrupted when traversing the network, specify the Content-MD5 header in the upload part request. Amazon S3 checks the part data against the provided MD5 value. If they do not match, Amazon S3 returns an error.

If the upload request is signed with Signature Version 4, then Amazon Web Services S3 uses the x-amz-content-sha256 header as a checksum instead of Content-MD5. For more information see Authenticating Requests: Using the Authorization Header (Amazon Web Services Signature Version 4).

Note: After you initiate multipart upload and upload one or more parts, you must either complete or abort multipart upload in order to stop getting charged for storage of the uploaded parts. Only after you either complete or abort multipart upload, Amazon S3 frees up the parts storage and stops charging you for the parts storage.

For more information on multipart uploads, go to Multipart Upload Overview in the Amazon S3 User Guide .

For information on the permissions required to use the multipart upload API, go to Multipart Upload and Permissions in the Amazon S3 User Guide.

You can optionally request server-side encryption where Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts it for you when you access it. You have the option of providing your own encryption key, or you can use the Amazon Web Services managed encryption keys. If you choose to provide your own encryption key, the request headers you provide in the request must match the headers you used in the request to initiate the upload by using CreateMultipartUpload. For more information, go to Using Server-Side Encryption in the Amazon S3 User Guide.

Server-side encryption is supported by the S3 Multipart Upload actions. Unless you are using a customer-provided encryption key, you don’t need to specify the encryption parameters in each UploadPart request. Instead, you only need to specify the server-side encryption parameters in the initial Initiate Multipart request. For more information, see CreateMultipartUpload.

If you requested server-side encryption using a customer-provided encryption key in your initiate multipart upload request, you must provide identical encryption information in each part upload using the following headers.

  • x-amz-server-side-encryption-customer-algorithm
  • x-amz-server-side-encryption-customer-key
  • x-amz-server-side-encryption-customer-key-MD5

Special Errors

    • Code: NoSuchUpload
    • Cause: The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed.
    • HTTP Status Code: 404 Not Found
    • SOAP Fault Code Prefix: Client

Related Resources

Additional info on response behavior: if there is an internal error in S3 after the request was successfully recieved, a 200 response will be returned with an S3Exception embedded in it; this will still be caught and retried by RetryMiddleware.

Parameter Syntax

$result = $client->uploadPart([
    'Body' => <string || resource || Psr\Http\Message\StreamInterface>,
    'Bucket' => '<string>', // REQUIRED
    'ContentLength' => <integer>,
    'ContentSHA256' => '<string>',
    'ExpectedBucketOwner' => '<string>',
    'Key' => '<string>', // REQUIRED
    'PartNumber' => <integer>, // REQUIRED
    'RequestPayer' => 'requester',
    'SSECustomerAlgorithm' => '<string>',
    'SSECustomerKey' => '<string>',
    'SSECustomerKeyMD5' => '<string>',
    'SourceFile' => '<string>',
    'UploadId' => '<string>', // REQUIRED
]);

Parameter Details

Members
Body
  • Type: blob (string|resource|Psr\Http\Message\StreamInterface)

Object data.

Bucket
  • Required: Yes
  • Type: string

The name of the bucket to which the multipart upload was initiated.

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointNameAccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointNameAccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

ContentLength
  • Type: long (int|float)

Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically.

ContentSHA256
  • Type: string

A SHA256 hash of the body content of the request.

This value will be computed for you it is not supplied.
ExpectedBucketOwner
  • Type: string

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

Key
  • Required: Yes
  • Type: string

Object key for which the multipart upload was initiated.

PartNumber
  • Required: Yes
  • Type: int

Part number of part being uploaded. This is a positive integer between 1 and 10,000.

RequestPayer
  • Type: string

Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. For information about downloading objects from requester pays buckets, see Downloading Objects in Requestor Pays Buckets in the Amazon S3 User Guide.

SSECustomerAlgorithm
  • Type: string

Specifies the algorithm to use to when encrypting the object (for example, AES256).

SSECustomerKey
  • Type: string

Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm header. This must be the same encryption key specified in the initiate multipart upload request.

This value will be base64 encoded on your behalf.
SSECustomerKeyMD5
  • Type: string

Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.

SourceFile
  • Type: string
The path to a file on disk to use instead of the Body parameter.
UploadId
  • Required: Yes
  • Type: string

Upload ID identifying the multipart upload whose part is being uploaded.

Result Syntax

[
    'BucketKeyEnabled' => true || false,
    'ETag' => '<string>',
    'RequestCharged' => 'requester',
    'SSECustomerAlgorithm' => '<string>',
    'SSECustomerKeyMD5' => '<string>',
    'SSEKMSKeyId' => '<string>',
    'ServerSideEncryption' => 'AES256|aws:kms',
]

Result Details

Members
BucketKeyEnabled
  • Type: boolean

Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with Amazon Web Services KMS (SSE-KMS).

ETag
  • Type: string

Entity tag for the uploaded object.

RequestCharged
  • Type: string

If present, indicates that the requester was successfully charged for the request.

SSECustomerAlgorithm
  • Type: string

If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.

SSECustomerKeyMD5
  • Type: string

If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round-trip message integrity verification of the customer-provided encryption key.

SSEKMSKeyId
  • Type: string

If present, specifies the ID of the Amazon Web Services Key Management Service (Amazon Web Services KMS) symmetric customer managed key was used for the object.

ServerSideEncryption
  • Type: string

The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).

Errors

There are no errors described for this operation.

Examples

Example 1: To upload a part

The following example uploads part 1 of a multipart upload. The example specifies a file name for the part data. The Upload ID is same that is returned by the initiate multipart upload.

$result = $client->uploadPart([
    'Body' => <BLOB>,
    'Bucket' => 'examplebucket',
    'Key' => 'examplelargeobject',
    'PartNumber' => 1,
    'UploadId' => 'xadcOB_7YPBOJuoFiQ9cz4P3Pe6FIZwO4f7wN93uHsNBEw97pl5eNwzExg0LAT2dUN91cOmrEQHDsP3WA60CEg--',
]);

Result syntax:

[
    'ETag' => '"d8c2eafd90c266e19ab9dcacc479f8af"',
]

UploadPartCopy

$result = $client->uploadPartCopy([/* ... */]); $promise = $client->uploadPartCopyAsync([/* ... */]);

Uploads a part by copying data from an existing object as data source. You specify the data source by adding the request header x-amz-copy-source in your request and a byte range by adding the request header x-amz-copy-source-range in your request.

The minimum allowable part size for a multipart upload is 5 MB. For more information about multipart upload limits, go to Quick Facts in the Amazon S3 User Guide.

Instead of using an existing object as part data, you might use the UploadPart action and provide data in your request.

You must initiate a multipart upload before you can upload any part. In response to your initiate request. Amazon S3 returns a unique identifier, the upload ID, that you must include in your upload part request.

For more information about using the UploadPartCopy operation, see the following:

  • For conceptual information about multipart uploads, see Uploading Objects Using Multipart Upload in the Amazon S3 User Guide.
  • For information about permissions required to use the multipart upload API, see Multipart Upload and Permissions in the Amazon S3 User Guide.
  • For information about copying objects using a single atomic action vs. the multipart upload, see Operations on Objects in the Amazon S3 User Guide.
  • For information about using server-side encryption with customer-provided encryption keys with the UploadPartCopy operation, see CopyObject and UploadPart.

Note the following additional considerations about the request headers x-amz-copy-source-if-match, x-amz-copy-source-if-none-match, x-amz-copy-source-if-unmodified-since, and x-amz-copy-source-if-modified-since:

 

  • Consideration 1 – If both of the x-amz-copy-source-if-match and x-amz-copy-source-if-unmodified-since headers are present in the request as follows:x-amz-copy-source-if-match condition evaluates to true, and;x-amz-copy-source-if-unmodified-since condition evaluates to false;

    Amazon S3 returns 200 OK and copies the data.

  • Consideration 2 – If both of the x-amz-copy-source-if-none-match and x-amz-copy-source-if-modified-since headers are present in the request as follows:x-amz-copy-source-if-none-match condition evaluates to false, and;x-amz-copy-source-if-modified-since condition evaluates to true;

    Amazon S3 returns 412 Precondition Failed response code.

Versioning

If your bucket has versioning enabled, you could have multiple versions of the same object. By default, x-amz-copy-source identifies the current version of the object to copy. If the current version is a delete marker and you don’t specify a versionId in the x-amz-copy-source, Amazon S3 returns a 404 error, because the object does not exist. If you specify versionId in the x-amz-copy-source and the versionId is a delete marker, Amazon S3 returns an HTTP 400 error, because you are not allowed to specify a delete marker as a version for the x-amz-copy-source.

You can optionally specify a specific version of the source object to copy by adding the versionId subresource as shown in the following example:

x-amz-copy-source: /bucket/object?versionId=version id

Special Errors

    • Code: NoSuchUpload
    • Cause: The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed.
    • HTTP Status Code: 404 Not Found
    • Code: InvalidRequest
    • Cause: The specified copy source is not supported as a byte-range copy source.
    • HTTP Status Code: 400 Bad Request

Related Resources

Additional info on response behavior: if there is an internal error in S3 after the request was successfully recieved, a 200 response will be returned with an S3Exception embedded in it; this will still be caught and retried by RetryMiddleware.

Parameter Syntax

$result = $client->uploadPartCopy([
    'Bucket' => '<string>', // REQUIRED
    'CopySource' => '<string>', // REQUIRED
    'CopySourceIfMatch' => '<string>',
    'CopySourceIfModifiedSince' => <integer || string || DateTime>,
    'CopySourceIfNoneMatch' => '<string>',
    'CopySourceIfUnmodifiedSince' => <integer || string || DateTime>,
    'CopySourceRange' => '<string>',
    'CopySourceSSECustomerAlgorithm' => '<string>',
    'CopySourceSSECustomerKey' => '<string>',
    'CopySourceSSECustomerKeyMD5' => '<string>',
    'ExpectedBucketOwner' => '<string>',
    'ExpectedSourceBucketOwner' => '<string>',
    'Key' => '<string>', // REQUIRED
    'PartNumber' => <integer>, // REQUIRED
    'RequestPayer' => 'requester',
    'SSECustomerAlgorithm' => '<string>',
    'SSECustomerKey' => '<string>',
    'SSECustomerKeyMD5' => '<string>',
    'UploadId' => '<string>', // REQUIRED
]);

Parameter Details

Members
Bucket
  • Required: Yes
  • Type: string

The bucket name.

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointNameAccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointNameAccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.

CopySource
  • Required: Yes
  • Type: string

Specifies the source object for the copy operation. You specify the value in one of two formats, depending on whether you want to access the source object through an access point:

  • For objects not accessed through an access point, specify the name of the source bucket and key of the source object, separated by a slash (/). For example, to copy the object reports/january.pdf from the bucket awsexamplebucket, use awsexamplebucket/reports/january.pdf. The value must be URL encoded.
  • For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>. For example, to copy the object reports/january.pdf through access point my-access-point owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf. The value must be URL encoded.Amazon S3 supports copy operations using access points only when the source and destination buckets are in the same Amazon Web Services Region.Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>. For example, to copy the object reports/january.pdf through outpost my-outpost owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf. The value must be URL encoded.

To copy a specific version of an object, append ?versionId=<version-id> to the value (for example, awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893). If you don’t specify a version ID, Amazon S3 copies the latest version of the source object.

CopySourceIfMatch
  • Type: string

Copies the object if its entity tag (ETag) matches the specified tag.

CopySourceIfModifiedSince
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

Copies the object if it has been modified since the specified time.

CopySourceIfNoneMatch
  • Type: string

Copies the object if its entity tag (ETag) is different than the specified ETag.

CopySourceIfUnmodifiedSince
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

Copies the object if it hasn’t been modified since the specified time.

CopySourceRange
  • Type: string

The range of bytes to copy from the source object. The range value must use the form bytes=first-last, where the first and last are the zero-based byte offsets to copy. For example, bytes=0-9 indicates that you want to copy the first 10 bytes of the source. You can copy a range only if the source object is greater than 5 MB.

CopySourceSSECustomerAlgorithm
  • Type: string

Specifies the algorithm to use when decrypting the source object (for example, AES256).

CopySourceSSECustomerKey
  • Type: string

Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source object. The encryption key provided in this header must be one that was used when the source object was created.

This value will be base64 encoded on your behalf.
CopySourceSSECustomerKeyMD5
  • Type: string

Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.

ExpectedBucketOwner
  • Type: string

The account ID of the expected destination bucket owner. If the destination bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

ExpectedSourceBucketOwner
  • Type: string

The account ID of the expected source bucket owner. If the source bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

Key
  • Required: Yes
  • Type: string

Object key for which the multipart upload was initiated.

PartNumber
  • Required: Yes
  • Type: int

Part number of part being copied. This is a positive integer between 1 and 10,000.

RequestPayer
  • Type: string

Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. For information about downloading objects from requester pays buckets, see Downloading Objects in Requestor Pays Buckets in the Amazon S3 User Guide.

SSECustomerAlgorithm
  • Type: string

Specifies the algorithm to use to when encrypting the object (for example, AES256).

SSECustomerKey
  • Type: string

Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm header. This must be the same encryption key specified in the initiate multipart upload request.

This value will be base64 encoded on your behalf.
SSECustomerKeyMD5
  • Type: string

Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.

UploadId
  • Required: Yes
  • Type: string

Upload ID identifying the multipart upload whose part is being copied.

Result Syntax

[
    'BucketKeyEnabled' => true || false,
    'CopyPartResult' => [
        'ETag' => '<string>',
        'LastModified' => <DateTime>,
    ],
    'CopySourceVersionId' => '<string>',
    'RequestCharged' => 'requester',
    'SSECustomerAlgorithm' => '<string>',
    'SSECustomerKeyMD5' => '<string>',
    'SSEKMSKeyId' => '<string>',
    'ServerSideEncryption' => 'AES256|aws:kms',
]

Result Details

Members
BucketKeyEnabled
  • Type: boolean

Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with Amazon Web Services KMS (SSE-KMS).

CopyPartResult

Container for all response elements.

CopySourceVersionId
  • Type: string

The version of the source object that was copied, if you have enabled versioning on the source bucket.

RequestCharged
  • Type: string

If present, indicates that the requester was successfully charged for the request.

SSECustomerAlgorithm
  • Type: string

If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.

SSECustomerKeyMD5
  • Type: string

If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round-trip message integrity verification of the customer-provided encryption key.

SSEKMSKeyId
  • Type: string

If present, specifies the ID of the Amazon Web Services Key Management Service (Amazon Web Services KMS) symmetric customer managed key that was used for the object.

ServerSideEncryption
  • Type: string

The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).

Errors

There are no errors described for this operation.

Examples

Example 1: To upload a part by copying data from an existing object as data source

The following example uploads a part of a multipart upload by copying data from an existing object as data source.

$result = $client->uploadPartCopy([
    'Bucket' => 'examplebucket',
    'CopySource' => '/bucketname/sourceobjectkey',
    'Key' => 'examplelargeobject',
    'PartNumber' => 1,
    'UploadId' => 'exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--',
]);

Result syntax:

[
    'CopyPartResult' => [
        'ETag' => '"b0c6f0e7e054ab8fa2536a2677f8734d"',
        'LastModified' => ,
    ],
]
Example 2: To upload a part by copying byte range from an existing object as data source

The following example uploads a part of a multipart upload by copying a specified byte range from an existing object as data source.

$result = $client->uploadPartCopy([
    'Bucket' => 'examplebucket',
    'CopySource' => '/bucketname/sourceobjectkey',
    'CopySourceRange' => 'bytes=1-100000',
    'Key' => 'examplelargeobject',
    'PartNumber' => 2,
    'UploadId' => 'exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--',
]);

Result syntax:

[
    'CopyPartResult' => [
        'ETag' => '"65d16d19e65a7508a51f043180edcc36"',
        'LastModified' => ,
    ],
]

WriteGetObjectResponse

$result = $client->writeGetObjectResponse([/* ... */]); $promise = $client->writeGetObjectResponseAsync([/* ... */]);

Passes transformed objects to a GetObject operation when using Object Lambda access points. For information about Object Lambda access points, see Transforming objects with Object Lambda access points in the Amazon S3 User Guide.

This operation supports metadata that can be returned by GetObject, in addition to RequestRoute, RequestToken, StatusCode, ErrorCode, and ErrorMessage. The GetObject response metadata is supported so that the WriteGetObjectResponse caller, typically an Lambda function, can provide the same metadata when it internally invokes GetObject. When WriteGetObjectResponse is called by a customer-owned Lambda function, the metadata returned to the end user GetObject call might differ from what Amazon S3 would normally return.

You can include any number of metadata headers. When including a metadata header, it should be prefaced with x-amz-meta. For example, x-amz-meta-my-custom-header: MyCustomValue. The primary use case for this is to forward GetObject metadata.

Amazon Web Services provides some prebuilt Lambda functions that you can use with S3 Object Lambda to detect and redact personally identifiable information (PII) and decompress S3 objects. These Lambda functions are available in the Amazon Web Services Serverless Application Repository, and can be selected through the Amazon Web Services Management Console when you create your Object Lambda access point.

Example 1: PII Access Control – This Lambda function uses Amazon Comprehend, a natural language processing (NLP) service using machine learning to find insights and relationships in text. It automatically detects personally identifiable information (PII) such as names, addresses, dates, credit card numbers, and social security numbers from documents in your Amazon S3 bucket.

Example 2: PII Redaction – This Lambda function uses Amazon Comprehend, a natural language processing (NLP) service using machine learning to find insights and relationships in text. It automatically redacts personally identifiable information (PII) such as names, addresses, dates, credit card numbers, and social security numbers from documents in your Amazon S3 bucket.

Example 3: Decompression – The Lambda function S3ObjectLambdaDecompression, is equipped to decompress objects stored in S3 in one of six compressed file formats including bzip2, gzip, snappy, zlib, zstandard and ZIP.

For information on how to view and use these functions, see Using Amazon Web Services built Lambda functions in the Amazon S3 User Guide.

Parameter Syntax

$result = $client->writeGetObjectResponse([
    'AcceptRanges' => '<string>',
    'Body' => <string || resource || Psr\Http\Message\StreamInterface>,
    'BucketKeyEnabled' => true || false,
    'CacheControl' => '<string>',
    'ContentDisposition' => '<string>',
    'ContentEncoding' => '<string>',
    'ContentLanguage' => '<string>',
    'ContentLength' => <integer>,
    'ContentRange' => '<string>',
    'ContentType' => '<string>',
    'DeleteMarker' => true || false,
    'ETag' => '<string>',
    'ErrorCode' => '<string>',
    'ErrorMessage' => '<string>',
    'Expiration' => '<string>',
    'Expires' => <integer || string || DateTime>,
    'LastModified' => <integer || string || DateTime>,
    'Metadata' => ['<string>', ...],
    'MissingMeta' => <integer>,
    'ObjectLockLegalHoldStatus' => 'ON|OFF',
    'ObjectLockMode' => 'GOVERNANCE|COMPLIANCE',
    'ObjectLockRetainUntilDate' => <integer || string || DateTime>,
    'PartsCount' => <integer>,
    'ReplicationStatus' => 'COMPLETE|PENDING|FAILED|REPLICA',
    'RequestCharged' => 'requester',
    'RequestRoute' => '<string>', // REQUIRED
    'RequestToken' => '<string>', // REQUIRED
    'Restore' => '<string>',
    'SSECustomerAlgorithm' => '<string>',
    'SSECustomerKeyMD5' => '<string>',
    'SSEKMSKeyId' => '<string>',
    'ServerSideEncryption' => 'AES256|aws:kms',
    'StatusCode' => <integer>,
    'StorageClass' => 'STANDARD|REDUCED_REDUNDANCY|STANDARD_IA|ONEZONE_IA|INTELLIGENT_TIERING|GLACIER|DEEP_ARCHIVE|OUTPOSTS|GLACIER_IR',
    'TagCount' => <integer>,
    'VersionId' => '<string>',
]);

Parameter Details

Members
AcceptRanges
  • Type: string

Indicates that a range of bytes was specified.

Body
  • Type: blob (string|resource|Psr\Http\Message\StreamInterface)

The object data.

BucketKeyEnabled
  • Type: boolean

Indicates whether the object stored in Amazon S3 uses an S3 bucket key for server-side encryption with Amazon Web Services KMS (SSE-KMS).

CacheControl
  • Type: string

Specifies caching behavior along the request/reply chain.

ContentDisposition
  • Type: string

Specifies presentational information for the object.

ContentEncoding
  • Type: string

Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.

ContentLanguage
  • Type: string

The language the content is in.

ContentLength
  • Type: long (int|float)

The size of the content body in bytes.

ContentRange
  • Type: string

The portion of the object returned in the response.

ContentType
  • Type: string

A standard MIME type describing the format of the object data.

DeleteMarker
  • Type: boolean

Specifies whether an object stored in Amazon S3 is (true) or is not (false) a delete marker.

ETag
  • Type: string

An opaque identifier assigned by a web server to a specific version of a resource found at a URL.

ErrorCode
  • Type: string

A string that uniquely identifies an error condition. Returned in the <Code> tag of the error XML response for a corresponding GetObject call. Cannot be used with a successful StatusCode header or when the transformed object is provided in the body. All error codes from S3 are sentence-cased. Regex value is “^[A-Z][a-zA-Z]+$”.

ErrorMessage
  • Type: string

Contains a generic description of the error condition. Returned in the <Message> tag of the error XML response for a corresponding GetObject call. Cannot be used with a successful StatusCode header or when the transformed object is provided in body.

Expiration
  • Type: string

If object stored in Amazon S3 expiration is configured (see PUT Bucket lifecycle) it includes expiry-date and rule-id key-value pairs providing object expiration information. The value of the rule-id is URL encoded.

Expires
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time at which the object is no longer cacheable.

LastModified
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the object was last modified.

Metadata
  • Type: Associative array of custom strings keys (MetadataKey) to strings

A map of metadata to store with the object in S3.

MissingMeta
  • Type: int

Set to the number of metadata entries not returned in x-amz-meta headers. This can happen if you create metadata using an API like SOAP that supports more flexible metadata than the REST API. For example, using SOAP, you can create metadata whose values are not legal HTTP headers.

ObjectLockLegalHoldStatus
  • Type: string

Indicates whether an object stored in Amazon S3 has an active legal hold.

ObjectLockMode
  • Type: string

Indicates whether an object stored in Amazon S3 has Object Lock enabled. For more information about S3 Object Lock, see Object Lock.

ObjectLockRetainUntilDate
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when Object Lock is configured to expire.

PartsCount
  • Type: int

The count of parts this object has.

ReplicationStatus
  • Type: string

Indicates if request involves bucket that is either a source or destination in a Replication rule. For more information about S3 Replication, see Replication.

RequestCharged
  • Type: string

If present, indicates that the requester was successfully charged for the request.

RequestRoute
  • Required: Yes
  • Type: string

Route prefix to the HTTP URL generated.

RequestToken
  • Required: Yes
  • Type: string

A single use encrypted token that maps WriteGetObjectResponse to the end user GetObject request.

Restore
  • Type: string

Provides information about object restoration operation and expiration time of the restored object copy.

SSECustomerAlgorithm
  • Type: string

Encryption algorithm used if server-side encryption with a customer-provided encryption key was specified for object stored in Amazon S3.

SSECustomerKeyMD5
  • Type: string

128-bit MD5 digest of customer-provided encryption key used in Amazon S3 to encrypt data stored in S3. For more information, see Protecting data using server-side encryption with customer-provided encryption keys (SSE-C).

SSEKMSKeyId
  • Type: string

If present, specifies the ID of the Amazon Web Services Key Management Service (Amazon Web Services KMS) symmetric customer managed key that was used for stored in Amazon S3 object.

ServerSideEncryption
  • Type: string

The server-side encryption algorithm used when storing requested object in Amazon S3 (for example, AES256, aws:kms).

StatusCode
  • Type: int

The integer status code for an HTTP response of a corresponding GetObject request.

Status Codes

  • 200 – OK
  • 206 – Partial Content
  • 304 – Not Modified
  • 400 – Bad Request
  • 401 – Unauthorized
  • 403 – Forbidden
  • 404 – Not Found
  • 405 – Method Not Allowed
  • 409 – Conflict
  • 411 – Length Required
  • 412 – Precondition Failed
  • 416 – Range Not Satisfiable
  • 500 – Internal Server Error
  • 503 – Service Unavailable
StorageClass
  • Type: string

The class of storage used to store object in Amazon S3.

TagCount
  • Type: int

The number of tags, if any, on the object.

VersionId
  • Type: string

An ID used to reference a specific version of the object.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

There are no errors described for this operation.

Shapes

AbortIncompleteMultipartUpload

Description

Specifies the days since the initiation of an incomplete multipart upload that Amazon S3 will wait before permanently removing all parts of the upload. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Policy in the Amazon S3 User Guide.

Members
DaysAfterInitiation
  • Type: int

Specifies the number of days after which Amazon S3 aborts an incomplete multipart upload.

AccelerateConfiguration

Description

Configures the transfer acceleration state for an Amazon S3 bucket. For more information, see Amazon S3 Transfer Acceleration in the Amazon S3 User Guide.

Members
Status
  • Type: string

Specifies the transfer acceleration status of the bucket.

AccessControlPolicy

Description

Contains the elements that set the ACL permissions for an object per grantee.

Members
Grants
  • Type: Array of Grant structures

A list of grants.

Owner

Container for the bucket owner’s display name and ID.

AccessControlTranslation

Description

A container for information about access control for replicas.

Members
Owner
  • Required: Yes
  • Type: string

Specifies the replica ownership. For default and valid values, see PUT bucket replication in the Amazon S3 API Reference.

AnalyticsAndOperator

Description

A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. The operator must have at least two predicates in any combination, and an object must match all of the predicates for the filter to apply.

Members
Prefix
  • Type: string

The prefix to use when evaluating an AND predicate: The prefix that an object must have to be included in the metrics results.

Tags
  • Type: Array of Tag structures

The list of tags to use when evaluating an AND predicate.

AnalyticsConfiguration

Description

Specifies the configuration and any analyses for the analytics filter of an Amazon S3 bucket.

Members
Filter

The filter used to describe a set of objects for analyses. A filter must have exactly one prefix, one tag, or one conjunction (AnalyticsAndOperator). If no filter is provided, all objects will be considered in any analysis.

Id
  • Required: Yes
  • Type: string

The ID that identifies the analytics configuration.

StorageClassAnalysis

Contains data related to access patterns to be collected and made available to analyze the tradeoffs between different storage classes.

AnalyticsExportDestination

Description

Where to publish the analytics results.

Members
S3BucketDestination

A destination signifying output to an S3 bucket.

AnalyticsFilter

Description

The filter used to describe a set of objects for analyses. A filter must have exactly one prefix, one tag, or one conjunction (AnalyticsAndOperator). If no filter is provided, all objects will be considered in any analysis.

Members
And

A conjunction (logical AND) of predicates, which is used in evaluating an analytics filter. The operator must have at least two predicates.

Prefix
  • Type: string

The prefix to use when evaluating an analytics filter.

Tag
  • Type: Tag structure

The tag to use when evaluating an analytics filter.

AnalyticsS3BucketDestination

Description

Contains information about where to publish the analytics results.

Members
Bucket
  • Required: Yes
  • Type: string

The Amazon Resource Name (ARN) of the bucket to which data is exported.

BucketAccountId
  • Type: string

The account ID that owns the destination S3 bucket. If no account ID is provided, the owner is not validated before exporting data.

Although this value is optional, we strongly recommend that you set it to help prevent problems if the destination bucket ownership changes.

Format
  • Required: Yes
  • Type: string

Specifies the file format used when exporting data to Amazon S3.

Prefix
  • Type: string

The prefix to use when exporting data. The prefix is prepended to all results.

Bucket

Description

In terms of implementation, a Bucket is a resource. An Amazon S3 bucket name is globally unique, and the namespace is shared by all Amazon Web Services accounts.

Members
CreationDate
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

Date the bucket was created. This date can change when making changes to your bucket, such as editing its bucket policy.

Name
  • Type: string

The name of the bucket.

BucketAlreadyExists

Description

The requested bucket name is not available. The bucket namespace is shared by all users of the system. Select a different name and try again.

Members

BucketAlreadyOwnedByYou

Description

The bucket you tried to create already exists, and you own it. Amazon S3 returns this error in all Amazon Web Services Regions except in the North Virginia Region. For legacy compatibility, if you re-create an existing bucket that you already own in the North Virginia Region, Amazon S3 returns 200 OK and resets the bucket access control lists (ACLs).

Members

BucketLifecycleConfiguration

Description

Specifies the lifecycle configuration for objects in an Amazon S3 bucket. For more information, see Object Lifecycle Management in the Amazon S3 User Guide.

Members
Rules

A lifecycle rule for individual objects in an Amazon S3 bucket.

BucketLoggingStatus

Description

Container for logging status information.

Members
LoggingEnabled

Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys for a bucket. For more information, see PUT Bucket logging in the Amazon S3 API Reference.

CORSConfiguration

Description

Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more information, see Enabling Cross-Origin Resource Sharing in the Amazon S3 User Guide.

Members
CORSRules
  • Required: Yes
  • Type: Array of CORSRule structures

A set of origins and methods (cross-origin access that you want to allow). You can add up to 100 rules to the configuration.

CORSRule

Description

Specifies a cross-origin access rule for an Amazon S3 bucket.

Members
AllowedHeaders
  • Type: Array of strings

Headers that are specified in the Access-Control-Request-Headers header. These headers are allowed in a preflight OPTIONS request. In response to any preflight OPTIONS request, Amazon S3 returns any requested headers that are allowed.

AllowedMethods
  • Required: Yes
  • Type: Array of strings

An HTTP method that you allow the origin to execute. Valid values are GET, PUT, HEAD, POST, and DELETE.

AllowedOrigins
  • Required: Yes
  • Type: Array of strings

One or more origins you want customers to be able to access the bucket from.

ExposeHeaders
  • Type: Array of strings

One or more headers in the response that you want customers to be able to access from their applications (for example, from a JavaScript XMLHttpRequest object).

ID
  • Type: string

Unique identifier for the rule. The value cannot be longer than 255 characters.

MaxAgeSeconds
  • Type: int

The time in seconds that your browser is to cache the preflight response for the specified resource.

CSVInput

Description

Describes how an uncompressed comma-separated values (CSV)-formatted input object is formatted.

Members
AllowQuotedRecordDelimiter
  • Type: boolean

Specifies that CSV field values may contain quoted record delimiters and such records should be allowed. Default value is FALSE. Setting this value to TRUE may lower performance.

Comments
  • Type: string

A single character used to indicate that a row should be ignored when the character is present at the start of that row. You can specify any character to indicate a comment line.

FieldDelimiter
  • Type: string

A single character used to separate individual fields in a record. You can specify an arbitrary delimiter.

FileHeaderInfo
  • Type: string

Describes the first line of input. Valid values are:

  • NONE: First line is not a header.
  • IGNORE: First line is a header, but you can’t use the header values to indicate the column in an expression. You can use column position (such as _1, _2, …) to indicate the column (SELECT s._1 FROM OBJECT s).
  • Use: First line is a header, and you can use the header value to identify a column in an expression (SELECT "name" FROM OBJECT).
QuoteCharacter
  • Type: string

A single character used for escaping when the field delimiter is part of the value. For example, if the value is a, b, Amazon S3 wraps this field value in quotation marks, as follows: " a , b ".

Type: String

Default: "

Ancestors: CSV

QuoteEscapeCharacter
  • Type: string

A single character used for escaping the quotation mark character inside an already escaped value. For example, the value “”” a , b “”” is parsed as ” a , b “.

RecordDelimiter
  • Type: string

A single character used to separate individual records in the input. Instead of the default value, you can specify an arbitrary delimiter.

CSVOutput

Description

Describes how uncompressed comma-separated values (CSV)-formatted results are formatted.

Members
FieldDelimiter
  • Type: string

The value used to separate individual fields in a record. You can specify an arbitrary delimiter.

QuoteCharacter
  • Type: string

A single character used for escaping when the field delimiter is part of the value. For example, if the value is a, b, Amazon S3 wraps this field value in quotation marks, as follows: " a , b ".

QuoteEscapeCharacter
  • Type: string

The single character used for escaping the quote character inside an already escaped value.

QuoteFields
  • Type: string

Indicates whether to use quotation marks around output fields.

  • ALWAYS: Always use quotation marks for output fields.
  • ASNEEDED: Use quotation marks for output fields when needed.
RecordDelimiter
  • Type: string

A single character used to separate individual records in the output. Instead of the default value, you can specify an arbitrary delimiter.

CloudFunctionConfiguration

Description

Container for specifying the Lambda notification configuration.

Members
CloudFunction
  • Type: string

Lambda cloud function ARN that Amazon S3 can invoke when it detects events of the specified type.

Event
  • Type: string

The bucket event for which to send notifications.

Events
  • Type: Array of strings

Bucket events for which to send notifications.

Id
  • Type: string

An optional unique identifier for configurations in a notification configuration. If you don’t provide one, Amazon S3 will assign an ID.

InvocationRole
  • Type: string

The role supporting the invocation of the Lambda function

CommonPrefix

Description

Container for all (if there are any) keys between Prefix and the next occurrence of the string specified by a delimiter. CommonPrefixes lists keys that act like subdirectories in the directory specified by Prefix. For example, if the prefix is notes/ and the delimiter is a slash (/) as in notes/summer/july, the common prefix is notes/summer/.

Members
Prefix
  • Type: string

Container for the specified common prefix.

CompletedMultipartUpload

Description

The container for the completed multipart upload details.

Members
Parts

Array of CompletedPart data types.

If you do not supply a valid Part with your request, the service sends back an HTTP 400 response.

CompletedPart

Description

Details of the parts that were uploaded.

Members
ETag
  • Type: string

Entity tag returned when the part was uploaded.

PartNumber
  • Type: int

Part number that identifies the part. This is a positive integer between 1 and 10,000.

Condition

Description

A container for describing a condition that must be met for the specified redirect to apply. For example, 1. If request is for pages in the /docs folder, redirect to the /documents folder. 2. If request results in HTTP error 4xx, redirect request to another host where you might process the error.

Members
HttpErrorCodeReturnedEquals
  • Type: string

The HTTP error code when the redirect is applied. In the event of an error, if the error code equals this value, then the specified redirect is applied. Required when parent element Condition is specified and sibling KeyPrefixEquals is not specified. If both are specified, then both must be true for the redirect to be applied.

KeyPrefixEquals
  • Type: string

The object key name prefix when the redirect is applied. For example, to redirect requests for ExamplePage.html, the key prefix will be ExamplePage.html. To redirect request for all pages with the prefix docs/, the key prefix will be /docs, which identifies all objects in the docs/ folder. Required when the parent element Condition is specified and sibling HttpErrorCodeReturnedEquals is not specified. If both conditions are specified, both must be true for the redirect to be applied.

Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints.

ContinuationEvent

Description

 

Members

CopyObjectResult

Description

Container for all response elements.

Members
ETag
  • Type: string

Returns the ETag of the new object. The ETag reflects only changes to the contents of an object, not its metadata.

LastModified
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

Creation date of the object.

CopyPartResult

Description

Container for all response elements.

Members
ETag
  • Type: string

Entity tag of the object.

LastModified
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

Date and time at which the object was uploaded.

CreateBucketConfiguration

Description

The configuration information for the bucket.

Members
LocationConstraint
  • Type: string

Specifies the Region where the bucket will be created. If you don’t specify a Region, the bucket is created in the US East (N. Virginia) Region (us-east-1).

DefaultRetention

Description

The container element for specifying the default Object Lock retention settings for new objects placed in the specified bucket.

  • The DefaultRetention settings require both a mode and a period.
  • The DefaultRetention period can be either Days or Years but you must select one. You cannot specify Days and Years at the same time.
Members
Days
  • Type: int

The number of days that you want to specify for the default retention period. Must be used with Mode.

Mode
  • Type: string

The default Object Lock retention mode you want to apply to new objects placed in the specified bucket. Must be used with either Days or Years.

Years
  • Type: int

The number of years that you want to specify for the default retention period. Must be used with Mode.

Delete

Description

Container for the objects to delete.

Members
Objects

The objects to delete.

Quiet
  • Type: boolean

Element to enable quiet mode for the request. When you add this element, you must set its value to true.

DeleteMarkerEntry

Description

Information about the delete marker.

Members
IsLatest
  • Type: boolean

Specifies whether the object is (true) or is not (false) the latest version of an object.

Key
  • Type: string

The object key.

LastModified
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

Date and time the object was last modified.

Owner

The account that created the delete marker.>

VersionId
  • Type: string

Version ID of an object.

DeleteMarkerReplication

Description

Specifies whether Amazon S3 replicates delete markers. If you specify a Filter in your replication configuration, you must also include a DeleteMarkerReplication element. If your Filter includes a Tag element, the DeleteMarkerReplication Status must be set to Disabled, because Amazon S3 does not support replicating delete markers for tag-based rules. For an example configuration, see Basic Rule Configuration.

For more information about delete marker replication, see Basic Rule Configuration.

If you are using an earlier version of the replication configuration, Amazon S3 handles replication of delete markers differently. For more information, see Backward Compatibility.

Members
Status
  • Type: string

Indicates whether to replicate delete markers.

Indicates whether to replicate delete markers.

DeletedObject

Description

Information about the deleted object.

Members
DeleteMarker
  • Type: boolean

Specifies whether the versioned object that was permanently deleted was (true) or was not (false) a delete marker. In a simple DELETE, this header indicates whether (true) or not (false) a delete marker was created.

DeleteMarkerVersionId
  • Type: string

The version ID of the delete marker created as a result of the DELETE operation. If you delete a specific object version, the value returned by this header is the version ID of the object version deleted.

Key
  • Type: string

The name of the deleted object.

VersionId
  • Type: string

The version ID of the deleted object.

Destination

Description

Specifies information about where to publish analysis or configuration results for an Amazon S3 bucket and S3 Replication Time Control (S3 RTC).

Members
AccessControlTranslation

Specify this only in a cross-account scenario (where source and destination bucket owners are not the same), and you want to change replica ownership to the Amazon Web Services account that owns the destination bucket. If this is not specified in the replication configuration, the replicas are owned by same Amazon Web Services account that owns the source object.

Account
  • Type: string

Destination bucket owner account ID. In a cross-account scenario, if you direct Amazon S3 to change replica ownership to the Amazon Web Services account that owns the destination bucket by specifying the AccessControlTranslation property, this is the account ID of the destination bucket owner. For more information, see Replication Additional Configuration: Changing the Replica Owner in the Amazon S3 User Guide.

Bucket
  • Required: Yes
  • Type: string

The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to store the results.

EncryptionConfiguration

A container that provides information about encryption. If SourceSelectionCriteria is specified, you must specify this element.

Metrics

A container specifying replication metrics-related settings enabling replication metrics and events.

ReplicationTime

A container specifying S3 Replication Time Control (S3 RTC), including whether S3 RTC is enabled and the time when all objects and operations on objects must be replicated. Must be specified together with a Metrics block.

StorageClass
  • Type: string

The storage class to use when replicating objects, such as S3 Standard or reduced redundancy. By default, Amazon S3 uses the storage class of the source object to create the object replica.

For valid values, see the StorageClass element of the PUT Bucket replication action in the Amazon S3 API Reference.

Encryption

Description

Contains the type of server-side encryption used.

Members
EncryptionType
  • Required: Yes
  • Type: string

The server-side encryption algorithm used when storing job results in Amazon S3 (for example, AES256, aws:kms).

KMSContext
  • Type: string

If the encryption type is aws:kms, this optional value can be used to specify the encryption context for the restore results.

KMSKeyId
  • Type: string

If the encryption type is aws:kms, this optional value specifies the ID of the symmetric customer managed key to use for encryption of job results. Amazon S3 only supports symmetric keys. For more information, see Using symmetric and asymmetric keys in the Amazon Web Services Key Management Service Developer Guide.

EncryptionConfiguration

Description

Specifies encryption-related information for an Amazon S3 bucket that is a destination for replicated objects.

Members
ReplicaKmsKeyID
  • Type: string

Specifies the ID (Key ARN or Alias ARN) of the customer managed Amazon Web Services KMS key stored in Amazon Web Services Key Management Service (KMS) for the destination bucket. Amazon S3 uses this key to encrypt replica objects. Amazon S3 only supports symmetric, customer managed KMS keys. For more information, see Using symmetric and asymmetric keys in the Amazon Web Services Key Management Service Developer Guide.

EndEvent

Description

A message that indicates the request is complete and no more messages will be sent. You should not assume that the request is complete until the client receives an EndEvent.

Members

Error

Description

Container for all error elements.

Members
Code
  • Type: string

The error code is a string that uniquely identifies an error condition. It is meant to be read and understood by programs that detect and handle errors by type.

Amazon S3 error codes

    • Code: AccessDenied
    • Description: Access Denied
    • HTTP Status Code: 403 Forbidden
    • SOAP Fault Code Prefix: Client
    • Code: AccountProblem
    • Description: There is a problem with your Amazon Web Services account that prevents the action from completing successfully. Contact Amazon Web Services Support for further assistance.
    • HTTP Status Code: 403 Forbidden
    • SOAP Fault Code Prefix: Client
    • Code: AllAccessDisabled
    • Description: All access to this Amazon S3 resource has been disabled. Contact Amazon Web Services Support for further assistance.
    • HTTP Status Code: 403 Forbidden
    • SOAP Fault Code Prefix: Client
    • Code: AmbiguousGrantByEmailAddress
    • Description: The email address you provided is associated with more than one account.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: AuthorizationHeaderMalformed
    • Description: The authorization header you provided is invalid.
    • HTTP Status Code: 400 Bad Request
    • HTTP Status Code: N/A
    • Code: BadDigest
    • Description: The Content-MD5 you specified did not match what we received.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: BucketAlreadyExists
    • Description: The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again.
    • HTTP Status Code: 409 Conflict
    • SOAP Fault Code Prefix: Client
    • Code: BucketAlreadyOwnedByYou
    • Description: The bucket you tried to create already exists, and you own it. Amazon S3 returns this error in all Amazon Web Services Regions except in the North Virginia Region. For legacy compatibility, if you re-create an existing bucket that you already own in the North Virginia Region, Amazon S3 returns 200 OK and resets the bucket access control lists (ACLs).
    • Code: 409 Conflict (in all Regions except the North Virginia Region)
    • SOAP Fault Code Prefix: Client
    • Code: BucketNotEmpty
    • Description: The bucket you tried to delete is not empty.
    • HTTP Status Code: 409 Conflict
    • SOAP Fault Code Prefix: Client
    • Code: CredentialsNotSupported
    • Description: This request does not support credentials.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: CrossLocationLoggingProhibited
    • Description: Cross-location logging not allowed. Buckets in one geographic location cannot log information to a bucket in another location.
    • HTTP Status Code: 403 Forbidden
    • SOAP Fault Code Prefix: Client
    • Code: EntityTooSmall
    • Description: Your proposed upload is smaller than the minimum allowed object size.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: EntityTooLarge
    • Description: Your proposed upload exceeds the maximum allowed object size.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: ExpiredToken
    • Description: The provided token has expired.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: IllegalVersioningConfigurationException
    • Description: Indicates that the versioning configuration specified in the request is invalid.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: IncompleteBody
    • Description: You did not provide the number of bytes specified by the Content-Length HTTP header
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: IncorrectNumberOfFilesInPostRequest
    • Description: POST requires exactly one file upload per request.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: InlineDataTooLarge
    • Description: Inline data exceeds the maximum allowed size.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: InternalError
    • Description: We encountered an internal error. Please try again.
    • HTTP Status Code: 500 Internal Server Error
    • SOAP Fault Code Prefix: Server
    • Code: InvalidAccessKeyId
    • Description: The Amazon Web Services access key ID you provided does not exist in our records.
    • HTTP Status Code: 403 Forbidden
    • SOAP Fault Code Prefix: Client
    • Code: InvalidAddressingHeader
    • Description: You must specify the Anonymous role.
    • HTTP Status Code: N/A
    • SOAP Fault Code Prefix: Client
    • Code: InvalidArgument
    • Description: Invalid Argument
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: InvalidBucketName
    • Description: The specified bucket is not valid.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: InvalidBucketState
    • Description: The request is not valid with the current state of the bucket.
    • HTTP Status Code: 409 Conflict
    • SOAP Fault Code Prefix: Client
    • Code: InvalidDigest
    • Description: The Content-MD5 you specified is not valid.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: InvalidEncryptionAlgorithmError
    • Description: The encryption request you specified is not valid. The valid value is AES256.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: InvalidLocationConstraint
    • Description: The specified location constraint is not valid. For more information about Regions, see How to Select a Region for Your Buckets.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: InvalidObjectState
    • Description: The action is not valid for the current state of the object.
    • HTTP Status Code: 403 Forbidden
    • SOAP Fault Code Prefix: Client
    • Code: InvalidPart
    • Description: One or more of the specified parts could not be found. The part might not have been uploaded, or the specified entity tag might not have matched the part’s entity tag.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: InvalidPartOrder
    • Description: The list of parts was not in ascending order. Parts list must be specified in order by part number.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: InvalidPayer
    • Description: All access to this object has been disabled. Please contact Amazon Web Services Support for further assistance.
    • HTTP Status Code: 403 Forbidden
    • SOAP Fault Code Prefix: Client
    • Code: InvalidPolicyDocument
    • Description: The content of the form does not meet the conditions specified in the policy document.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: InvalidRange
    • Description: The requested range cannot be satisfied.
    • HTTP Status Code: 416 Requested Range Not Satisfiable
    • SOAP Fault Code Prefix: Client
    • Code: InvalidRequest
    • Description: Please use AWS4-HMAC-SHA256.
    • HTTP Status Code: 400 Bad Request
    • Code: N/A
    • Code: InvalidRequest
    • Description: SOAP requests must be made over an HTTPS connection.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: InvalidRequest
    • Description: Amazon S3 Transfer Acceleration is not supported for buckets with non-DNS compliant names.
    • HTTP Status Code: 400 Bad Request
    • Code: N/A
    • Code: InvalidRequest
    • Description: Amazon S3 Transfer Acceleration is not supported for buckets with periods (.) in their names.
    • HTTP Status Code: 400 Bad Request
    • Code: N/A
    • Code: InvalidRequest
    • Description: Amazon S3 Transfer Accelerate endpoint only supports virtual style requests.
    • HTTP Status Code: 400 Bad Request
    • Code: N/A
    • Code: InvalidRequest
    • Description: Amazon S3 Transfer Accelerate is not configured on this bucket.
    • HTTP Status Code: 400 Bad Request
    • Code: N/A
    • Code: InvalidRequest
    • Description: Amazon S3 Transfer Accelerate is disabled on this bucket.
    • HTTP Status Code: 400 Bad Request
    • Code: N/A
    • Code: InvalidRequest
    • Description: Amazon S3 Transfer Acceleration is not supported on this bucket. Contact Amazon Web Services Support for more information.
    • HTTP Status Code: 400 Bad Request
    • Code: N/A
    • Code: InvalidRequest
    • Description: Amazon S3 Transfer Acceleration cannot be enabled on this bucket. Contact Amazon Web Services Support for more information.
    • HTTP Status Code: 400 Bad Request
    • Code: N/A
    • Code: InvalidSecurity
    • Description: The provided security credentials are not valid.
    • HTTP Status Code: 403 Forbidden
    • SOAP Fault Code Prefix: Client
    • Code: InvalidSOAPRequest
    • Description: The SOAP request body is invalid.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: InvalidStorageClass
    • Description: The storage class you specified is not valid.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: InvalidTargetBucketForLogging
    • Description: The target bucket for logging does not exist, is not owned by you, or does not have the appropriate grants for the log-delivery group.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: InvalidToken
    • Description: The provided token is malformed or otherwise invalid.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: InvalidURI
    • Description: Couldn’t parse the specified URI.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: KeyTooLongError
    • Description: Your key is too long.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: MalformedACLError
    • Description: The XML you provided was not well-formed or did not validate against our published schema.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: MalformedPOSTRequest
    • Description: The body of your POST request is not well-formed multipart/form-data.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: MalformedXML
    • Description: This happens when the user sends malformed XML (XML that doesn’t conform to the published XSD) for the configuration. The error message is, “The XML you provided was not well-formed or did not validate against our published schema.”
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: MaxMessageLengthExceeded
    • Description: Your request was too big.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: MaxPostPreDataLengthExceededError
    • Description: Your POST request fields preceding the upload file were too large.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: MetadataTooLarge
    • Description: Your metadata headers exceed the maximum allowed metadata size.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: MethodNotAllowed
    • Description: The specified method is not allowed against this resource.
    • HTTP Status Code: 405 Method Not Allowed
    • SOAP Fault Code Prefix: Client
    • Code: MissingAttachment
    • Description: A SOAP attachment was expected, but none were found.
    • HTTP Status Code: N/A
    • SOAP Fault Code Prefix: Client
    • Code: MissingContentLength
    • Description: You must provide the Content-Length HTTP header.
    • HTTP Status Code: 411 Length Required
    • SOAP Fault Code Prefix: Client
    • Code: MissingRequestBodyError
    • Description: This happens when the user sends an empty XML document as a request. The error message is, “Request body is empty.”
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: MissingSecurityElement
    • Description: The SOAP 1.1 request is missing a security element.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: MissingSecurityHeader
    • Description: Your request is missing a required header.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: NoLoggingStatusForKey
    • Description: There is no such thing as a logging status subresource for a key.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: NoSuchBucket
    • Description: The specified bucket does not exist.
    • HTTP Status Code: 404 Not Found
    • SOAP Fault Code Prefix: Client
    • Code: NoSuchBucketPolicy
    • Description: The specified bucket does not have a bucket policy.
    • HTTP Status Code: 404 Not Found
    • SOAP Fault Code Prefix: Client
    • Code: NoSuchKey
    • Description: The specified key does not exist.
    • HTTP Status Code: 404 Not Found
    • SOAP Fault Code Prefix: Client
    • Code: NoSuchLifecycleConfiguration
    • Description: The lifecycle configuration does not exist.
    • HTTP Status Code: 404 Not Found
    • SOAP Fault Code Prefix: Client
    • Code: NoSuchUpload
    • Description: The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed.
    • HTTP Status Code: 404 Not Found
    • SOAP Fault Code Prefix: Client
    • Code: NoSuchVersion
    • Description: Indicates that the version ID specified in the request does not match an existing version.
    • HTTP Status Code: 404 Not Found
    • SOAP Fault Code Prefix: Client
    • Code: NotImplemented
    • Description: A header you provided implies functionality that is not implemented.
    • HTTP Status Code: 501 Not Implemented
    • SOAP Fault Code Prefix: Server
    • Code: NotSignedUp
    • Description: Your account is not signed up for the Amazon S3 service. You must sign up before you can use Amazon S3. You can sign up at the following URL: Amazon S3
    • HTTP Status Code: 403 Forbidden
    • SOAP Fault Code Prefix: Client
    • Code: OperationAborted
    • Description: A conflicting conditional action is currently in progress against this resource. Try again.
    • HTTP Status Code: 409 Conflict
    • SOAP Fault Code Prefix: Client
    • Code: PermanentRedirect
    • Description: The bucket you are attempting to access must be addressed using the specified endpoint. Send all future requests to this endpoint.
    • HTTP Status Code: 301 Moved Permanently
    • SOAP Fault Code Prefix: Client
    • Code: PreconditionFailed
    • Description: At least one of the preconditions you specified did not hold.
    • HTTP Status Code: 412 Precondition Failed
    • SOAP Fault Code Prefix: Client
    • Code: Redirect
    • Description: Temporary redirect.
    • HTTP Status Code: 307 Moved Temporarily
    • SOAP Fault Code Prefix: Client
    • Code: RestoreAlreadyInProgress
    • Description: Object restore is already in progress.
    • HTTP Status Code: 409 Conflict
    • SOAP Fault Code Prefix: Client
    • Code: RequestIsNotMultiPartContent
    • Description: Bucket POST must be of the enclosure-type multipart/form-data.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: RequestTimeout
    • Description: Your socket connection to the server was not read from or written to within the timeout period.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: RequestTimeTooSkewed
    • Description: The difference between the request time and the server’s time is too large.
    • HTTP Status Code: 403 Forbidden
    • SOAP Fault Code Prefix: Client
    • Code: RequestTorrentOfBucketError
    • Description: Requesting the torrent file of a bucket is not permitted.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: SignatureDoesNotMatch
    • Description: The request signature we calculated does not match the signature you provided. Check your Amazon Web Services secret access key and signing method. For more information, see REST Authentication and SOAP Authentication for details.
    • HTTP Status Code: 403 Forbidden
    • SOAP Fault Code Prefix: Client
    • Code: ServiceUnavailable
    • Description: Reduce your request rate.
    • HTTP Status Code: 503 Service Unavailable
    • SOAP Fault Code Prefix: Server
    • Code: SlowDown
    • Description: Reduce your request rate.
    • HTTP Status Code: 503 Slow Down
    • SOAP Fault Code Prefix: Server
    • Code: TemporaryRedirect
    • Description: You are being redirected to the bucket while DNS updates.
    • HTTP Status Code: 307 Moved Temporarily
    • SOAP Fault Code Prefix: Client
    • Code: TokenRefreshRequired
    • Description: The provided token must be refreshed.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: TooManyBuckets
    • Description: You have attempted to create more buckets than allowed.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: UnexpectedContent
    • Description: This request does not support content.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: UnresolvableGrantByEmailAddress
    • Description: The email address you provided does not match any account on record.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client
    • Code: UserKeyMustBeSpecified
    • Description: The bucket POST must contain the specified field name. If it is specified, check the order of the fields.
    • HTTP Status Code: 400 Bad Request
    • SOAP Fault Code Prefix: Client

 

Key
  • Type: string

The error key.

Message
  • Type: string

The error message contains a generic description of the error condition in English. It is intended for a human audience. Simple programs display the message directly to the end user if they encounter an error condition they don’t know how or don’t care to handle. Sophisticated programs with more exhaustive error handling and proper internationalization are more likely to ignore the error message.

VersionId
  • Type: string

The version ID of the error.

ErrorDocument

Description

The error information.

Members
Key
  • Required: Yes
  • Type: string

The object key name to use when a 4XX class error occurs.

Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints.

EventBridgeConfiguration

Description

A container for specifying the configuration for Amazon EventBridge.

Members

ExistingObjectReplication

Description

Optional configuration to replicate existing source bucket objects. For more information, see Replicating Existing Objects in the Amazon S3 User Guide.

Members
Status
  • Required: Yes
  • Type: string

 

FilterRule

Description

Specifies the Amazon S3 object key name to filter on and whether to filter on the suffix or prefix of the key name.

Members
Name
  • Type: string

The object key name prefix or suffix identifying one or more objects to which the filtering rule applies. The maximum length is 1,024 characters. Overlapping prefixes and suffixes are not supported. For more information, see Configuring Event Notifications in the Amazon S3 User Guide.

Value
  • Type: string

The value that the filter searches for in object key names.

GlacierJobParameters

Description

Container for S3 Glacier job parameters.

Members
Tier
  • Required: Yes
  • Type: string

Retrieval tier at which the restore will be processed.

Grant

Description

Container for grant information.

Members
Grantee

The person being granted permissions.

Permission
  • Type: string

Specifies the permission given to the grantee.

Grantee

Description

Container for the person being granted permissions.

Members
DisplayName
  • Type: string

Screen name of the grantee.

EmailAddress
  • Type: string

Email address of the grantee.

Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

  • US East (N. Virginia)
  • US West (N. California)
  • US West (Oregon)
  • Asia Pacific (Singapore)
  • Asia Pacific (Sydney)
  • Asia Pacific (Tokyo)
  • Europe (Ireland)
  • South America (São Paulo)

For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

ID
  • Type: string

The canonical user ID of the grantee.

Type
  • Required: Yes
  • Type: string

Type of grantee

URI
  • Type: string

URI of the grantee group.

IndexDocument

Description

Container for the Suffix element.

Members
Suffix
  • Required: Yes
  • Type: string

A suffix that is appended to a request that is for a directory on the website endpoint (for example,if the suffix is index.html and you make a request to samplebucket/images/ the data that is returned will be for the object with the key name images/index.html) The suffix must not be empty and must not include a slash character.

Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints.

Initiator

Description

Container element that identifies who initiated the multipart upload.

Members
DisplayName
  • Type: string

Name of the Principal.

ID
  • Type: string

If the principal is an Amazon Web Services account, it provides the Canonical User ID. If the principal is an IAM User, it provides a user ARN value.

InputSerialization

Description

Describes the serialization format of the object.

Members
CSV

Describes the serialization of a CSV-encoded object.

CompressionType
  • Type: string

Specifies object’s compression format. Valid values: NONE, GZIP, BZIP2. Default Value: NONE.

JSON

Specifies JSON as object’s input serialization format.

Parquet

Specifies Parquet as object’s input serialization format.

IntelligentTieringAndOperator

Description

A container for specifying S3 Intelligent-Tiering filters. The filters determine the subset of objects to which the rule applies.

Members
Prefix
  • Type: string

An object key name prefix that identifies the subset of objects to which the configuration applies.

Tags
  • Type: Array of Tag structures

All of these tags must exist in the object’s tag set in order for the configuration to apply.

IntelligentTieringConfiguration

Description

Specifies the S3 Intelligent-Tiering configuration for an Amazon S3 bucket.

For information about the S3 Intelligent-Tiering storage class, see Storage class for automatically optimizing frequently and infrequently accessed objects.

Members
Filter

Specifies a bucket filter. The configuration only includes objects that meet the filter’s criteria.

Id
  • Required: Yes
  • Type: string

The ID used to identify the S3 Intelligent-Tiering configuration.

Status
  • Required: Yes
  • Type: string

Specifies the status of the configuration.

Tierings
  • Required: Yes
  • Type: Array of Tiering structures

Specifies the S3 Intelligent-Tiering storage class tier of the configuration.

IntelligentTieringFilter

Description

The Filter is used to identify objects that the S3 Intelligent-Tiering configuration applies to.

Members
And

A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. The operator must have at least two predicates, and an object must match all of the predicates in order for the filter to apply.

Prefix
  • Type: string

An object key name prefix that identifies the subset of objects to which the rule applies.

Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints.

Tag
  • Type: Tag structure

A container of a key value name pair.

InvalidObjectState

Description

Object is archived and inaccessible until restored.

Members
AccessTier
  • Type: string
StorageClass
  • Type: string

InventoryConfiguration

Description

Specifies the inventory configuration for an Amazon S3 bucket. For more information, see GET Bucket inventory in the Amazon S3 API Reference.

Members
Destination

Contains information about where to publish the inventory results.

Filter

Specifies an inventory filter. The inventory only includes objects that meet the filter’s criteria.

Id
  • Required: Yes
  • Type: string

The ID used to identify the inventory configuration.

IncludedObjectVersions
  • Required: Yes
  • Type: string

Object versions to include in the inventory list. If set to All, the list includes all the object versions, which adds the version-related fields VersionId, IsLatest, and DeleteMarker to the list. If set to Current, the list does not contain these version-related fields.

IsEnabled
  • Required: Yes
  • Type: boolean

Specifies whether the inventory is enabled or disabled. If set to True, an inventory list is generated. If set to False, no inventory list is generated.

OptionalFields
  • Type: Array of strings

Contains the optional fields that are included in the inventory results.

Schedule

Specifies the schedule for generating inventory results.

InventoryDestination

Description

Specifies the inventory configuration for an Amazon S3 bucket.

Members
S3BucketDestination

Contains the bucket name, file format, bucket owner (optional), and prefix (optional) where inventory results are published.

InventoryEncryption

Description

Contains the type of server-side encryption used to encrypt the inventory results.

Members
SSEKMS

Specifies the use of SSE-KMS to encrypt delivered inventory reports.

SSES3

Specifies the use of SSE-S3 to encrypt delivered inventory reports.

InventoryFilter

Description

Specifies an inventory filter. The inventory only includes objects that meet the filter’s criteria.

Members
Prefix
  • Required: Yes
  • Type: string

The prefix that an object must have to be included in the inventory results.

InventoryS3BucketDestination

Description

Contains the bucket name, file format, bucket owner (optional), and prefix (optional) where inventory results are published.

Members
AccountId
  • Type: string

The account ID that owns the destination S3 bucket. If no account ID is provided, the owner is not validated before exporting data.

Although this value is optional, we strongly recommend that you set it to help prevent problems if the destination bucket ownership changes.

Bucket
  • Required: Yes
  • Type: string

The Amazon Resource Name (ARN) of the bucket where inventory results will be published.

Encryption

Contains the type of server-side encryption used to encrypt the inventory results.

Format
  • Required: Yes
  • Type: string

Specifies the output format of the inventory results.

Prefix
  • Type: string

The prefix that is prepended to all inventory results.

InventorySchedule

Description

Specifies the schedule for generating inventory results.

Members
Frequency
  • Required: Yes
  • Type: string

Specifies how frequently inventory results are produced.

JSONInput

Description

Specifies JSON as object’s input serialization format.

Members
Type
  • Type: string

The type of JSON. Valid values: Document, Lines.

JSONOutput

Description

Specifies JSON as request’s output serialization format.

Members
RecordDelimiter
  • Type: string

The value used to separate individual records in the output. If no value is specified, Amazon S3 uses a newline character (‘\n’).

LambdaFunctionConfiguration

Description

A container for specifying the configuration for Lambda notifications.

Members
Events
  • Required: Yes
  • Type: Array of strings

The Amazon S3 bucket event for which to invoke the Lambda function. For more information, see Supported Event Types in the Amazon S3 User Guide.

Filter

Specifies object key name filtering rules. For information about key name filtering, see Configuring Event Notifications in the Amazon S3 User Guide.

Id
  • Type: string

An optional unique identifier for configurations in a notification configuration. If you don’t provide one, Amazon S3 will assign an ID.

LambdaFunctionArn
  • Required: Yes
  • Type: string

The Amazon Resource Name (ARN) of the Lambda function that Amazon S3 invokes when the specified event type occurs.

LifecycleConfiguration

Description

Container for lifecycle rules. You can add as many as 1000 rules.

Members
Rules
  • Required: Yes
  • Type: Array of Rule structures

Specifies lifecycle configuration rules for an Amazon S3 bucket.

LifecycleExpiration

Description

Container for the expiration for the lifecycle of the object.

Members
Date
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

Indicates at what date the object is to be moved or deleted. Should be in GMT ISO 8601 Format.

Days
  • Type: int

Indicates the lifetime, in days, of the objects that are subject to the rule. The value must be a non-zero positive integer.

ExpiredObjectDeleteMarker
  • Type: boolean

Indicates whether Amazon S3 will remove a delete marker with no noncurrent versions. If set to true, the delete marker will be expired; if set to false the policy takes no action. This cannot be specified with Days or Date in a Lifecycle Expiration Policy.

LifecycleRule

Description

A lifecycle rule for individual objects in an Amazon S3 bucket.

Members
AbortIncompleteMultipartUpload

Specifies the days since the initiation of an incomplete multipart upload that Amazon S3 will wait before permanently removing all parts of the upload. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Policy in the Amazon S3 User Guide.

Expiration

Specifies the expiration for the lifecycle of the object in the form of date, days and, whether the object has a delete marker.

Filter

The Filter is used to identify objects that a Lifecycle Rule applies to. A Filter must have exactly one of Prefix, Tag, or And specified. Filter is required if the LifecycleRule does not containt a Prefix element.

ID
  • Type: string

Unique identifier for the rule. The value cannot be longer than 255 characters.

NoncurrentVersionExpiration

Specifies when noncurrent object versions expire. Upon expiration, Amazon S3 permanently deletes the noncurrent object versions. You set this lifecycle configuration action on a bucket that has versioning enabled (or suspended) to request that Amazon S3 delete noncurrent object versions at a specific period in the object’s lifetime.

NoncurrentVersionTransitions

Specifies the transition rule for the lifecycle rule that describes when noncurrent objects transition to a specific storage class. If your bucket is versioning-enabled (or versioning is suspended), you can set this action to request that Amazon S3 transition noncurrent object versions to a specific storage class at a set period in the object’s lifetime.

Prefix
  • Type: string

Prefix identifying one or more objects to which the rule applies. This is no longer used; use Filter instead.

Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints.

Status
  • Required: Yes
  • Type: string

If ‘Enabled’, the rule is currently being applied. If ‘Disabled’, the rule is not currently being applied.

Transitions

Specifies when an Amazon S3 object transitions to a specified storage class.

LifecycleRuleAndOperator

Description

This is used in a Lifecycle Rule Filter to apply a logical AND to two or more predicates. The Lifecycle Rule will apply to any object matching all of the predicates configured inside the And operator.

Members
ObjectSizeGreaterThan
  • Type: long (int|float)

Minimum object size to which the rule applies.

ObjectSizeLessThan
  • Type: long (int|float)

Maximum object size to which the rule applies.

Prefix
  • Type: string

Prefix identifying one or more objects to which the rule applies.

Tags
  • Type: Array of Tag structures

All of these tags must exist in the object’s tag set in order for the rule to apply.

LifecycleRuleFilter

Description

The Filter is used to identify objects that a Lifecycle Rule applies to. A Filter must have exactly one of Prefix, Tag, or And specified.

Members
And

This is used in a Lifecycle Rule Filter to apply a logical AND to two or more predicates. The Lifecycle Rule will apply to any object matching all of the predicates configured inside the And operator.

ObjectSizeGreaterThan
  • Type: long (int|float)

Minimum object size to which the rule applies.

ObjectSizeLessThan
  • Type: long (int|float)

Maximum object size to which the rule applies.

Prefix
  • Type: string

Prefix identifying one or more objects to which the rule applies.

Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints.

Tag
  • Type: Tag structure

This tag must exist in the object’s tag set in order for the rule to apply.

LoggingEnabled

Description

Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys for a bucket. For more information, see PUT Bucket logging in the Amazon S3 API Reference.

Members
TargetBucket
  • Required: Yes
  • Type: string

Specifies the bucket where you want Amazon S3 to store server access logs. You can have your logs delivered to any bucket that you own, including the same bucket that is being logged. You can also configure multiple buckets to deliver their logs to the same target bucket. In this case, you should choose a different TargetPrefix for each source bucket so that the delivered log files can be distinguished by key.

TargetGrants

Container for granting information.

Buckets that use the bucket owner enforced setting for Object Ownership don’t support target grants. For more information, see Permissions for server access log delivery in the Amazon S3 User Guide.

TargetPrefix
  • Required: Yes
  • Type: string

A prefix for all log object keys. If you store log files from multiple Amazon S3 buckets in a single bucket, you can use a prefix to distinguish which log files came from which bucket.

MetadataEntry

Description

A metadata key-value pair to store with an object.

Members
Name
  • Type: string

Name of the Object.

Value
  • Type: string

Value of the Object.

Metrics

Description

A container specifying replication metrics-related settings enabling replication metrics and events.

Members
EventThreshold

A container specifying the time threshold for emitting the s3:Replication:OperationMissedThreshold event.

Status
  • Required: Yes
  • Type: string

Specifies whether the replication metrics are enabled.

MetricsAndOperator

Description

A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. The operator must have at least two predicates, and an object must match all of the predicates in order for the filter to apply.

Members
AccessPointArn
  • Type: string

The access point ARN used when evaluating an AND predicate.

Prefix
  • Type: string

The prefix used when evaluating an AND predicate.

Tags
  • Type: Array of Tag structures

The list of tags used when evaluating an AND predicate.

MetricsConfiguration

Description

Specifies a metrics configuration for the CloudWatch request metrics (specified by the metrics configuration ID) from an Amazon S3 bucket. If you’re updating an existing metrics configuration, note that this is a full replacement of the existing metrics configuration. If you don’t include the elements you want to keep, they are erased. For more information, see PutBucketMetricsConfiguration.

Members
Filter

Specifies a metrics configuration filter. The metrics configuration will only include objects that meet the filter’s criteria. A filter must be a prefix, an object tag, an access point ARN, or a conjunction (MetricsAndOperator).

Id
  • Required: Yes
  • Type: string

The ID used to identify the metrics configuration.

MetricsFilter

Description

Specifies a metrics configuration filter. The metrics configuration only includes objects that meet the filter’s criteria. A filter must be a prefix, an object tag, an access point ARN, or a conjunction (MetricsAndOperator). For more information, see PutBucketMetricsConfiguration.

Members
AccessPointArn
  • Type: string

The access point ARN used when evaluating a metrics filter.

And

A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. The operator must have at least two predicates, and an object must match all of the predicates in order for the filter to apply.

Prefix
  • Type: string

The prefix used when evaluating a metrics filter.

Tag
  • Type: Tag structure

The tag used when evaluating a metrics filter.

MultipartUpload

Description

Container for the MultipartUpload for the Amazon S3 object.

Members
Initiated
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

Date and time at which the multipart upload was initiated.

Initiator

Identifies who initiated the multipart upload.

Key
  • Type: string

Key of the object for which the multipart upload was initiated.

Owner

Specifies the owner of the object that is part of the multipart upload.

StorageClass
  • Type: string

The class of storage used to store the object.

UploadId
  • Type: string

Upload ID that identifies the multipart upload.

NoSuchBucket

Description

The specified bucket does not exist.

Members

NoSuchKey

Description

The specified key does not exist.

Members

NoSuchUpload

Description

The specified multipart upload does not exist.

Members

NoncurrentVersionExpiration

Description

Specifies when noncurrent object versions expire. Upon expiration, Amazon S3 permanently deletes the noncurrent object versions. You set this lifecycle configuration action on a bucket that has versioning enabled (or suspended) to request that Amazon S3 delete noncurrent object versions at a specific period in the object’s lifetime.

Members
NewerNoncurrentVersions
  • Type: int

Specifies how many noncurrent versions Amazon S3 will retain. If there are this many more recent noncurrent versions, Amazon S3 will take the associated action. For more information about noncurrent versions, see Lifecycle configuration elements in the Amazon S3 User Guide.

NoncurrentDays
  • Type: int

Specifies the number of days an object is noncurrent before Amazon S3 can perform the associated action. For information about the noncurrent days calculations, see How Amazon S3 Calculates When an Object Became Noncurrent in the Amazon S3 User Guide.

NoncurrentVersionTransition

Description

Container for the transition rule that describes when noncurrent objects transition to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage class. If your bucket is versioning-enabled (or versioning is suspended), you can set this action to request that Amazon S3 transition noncurrent object versions to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage class at a specific period in the object’s lifetime.

Members
NewerNoncurrentVersions
  • Type: int

Specifies how many noncurrent versions Amazon S3 will retain. If there are this many more recent noncurrent versions, Amazon S3 will take the associated action. For more information about noncurrent versions, see Lifecycle configuration elements in the Amazon S3 User Guide.

NoncurrentDays
  • Type: int

Specifies the number of days an object is noncurrent before Amazon S3 can perform the associated action. For information about the noncurrent days calculations, see How Amazon S3 Calculates How Long an Object Has Been Noncurrent in the Amazon S3 User Guide.

StorageClass
  • Type: string

The class of storage used to store the object.

NotificationConfigurationFilter

Description

Specifies object key name filtering rules. For information about key name filtering, see Configuring Event Notifications in the Amazon S3 User Guide.

Members
Key

A container for object key name prefix and suffix filtering rules.

Object

Description

An object consists of data and its descriptive metadata.

Members
ETag
  • Type: string

The entity tag is a hash of the object. The ETag reflects changes only to the contents of an object, not its metadata. The ETag may or may not be an MD5 digest of the object data. Whether or not it is depends on how the object was created and how it is encrypted as described below:

  • Objects created by the PUT Object, POST Object, or Copy operation, or through the Amazon Web Services Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that are an MD5 digest of their object data.
  • Objects created by the PUT Object, POST Object, or Copy operation, or through the Amazon Web Services Management Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are not an MD5 digest of their object data.
  • If an object is created by either the Multipart Upload or Part Copy operation, the ETag is not an MD5 digest, regardless of the method of encryption.
Key
  • Type: string

The name that you assign to an object. You use the object key to retrieve the object.

LastModified
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

Creation date of the object.

Owner

The owner of the object

Size
  • Type: long (int|float)

Size in bytes of the object

StorageClass
  • Type: string

The class of storage used to store the object.

ObjectAlreadyInActiveTierError

Description

This action is not allowed against this storage tier.

Members

ObjectIdentifier

Description

Object Identifier is unique value to identify objects.

Members
Key
  • Required: Yes
  • Type: string

Key name of the object.

Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints.

VersionId
  • Type: string

VersionId for the specific version of the object to delete.

ObjectLockConfiguration

Description

The container element for Object Lock configuration parameters.

Members
ObjectLockEnabled
  • Type: string

Indicates whether this bucket has an Object Lock configuration enabled. Enable ObjectLockEnabled when you apply ObjectLockConfiguration to a bucket.

Rule

Specifies the Object Lock rule for the specified object. Enable the this rule when you apply ObjectLockConfiguration to a bucket. Bucket settings require both a mode and a period. The period can be either Days or Years but you must select one. You cannot specify Days and Years at the same time.

ObjectLockLegalHold

Description

A Legal Hold configuration for an object.

Members
Status
  • Type: string

Indicates whether the specified object has a Legal Hold in place.

ObjectLockRetention

Description

A Retention configuration for an object.

Members
Mode
  • Type: string

Indicates the Retention mode for the specified object.

RetainUntilDate
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

The date on which this Object Lock Retention will expire.

ObjectLockRule

Description

The container element for an Object Lock rule.

Members
DefaultRetention

The default Object Lock retention mode and period that you want to apply to new objects placed in the specified bucket. Bucket settings require both a mode and a period. The period can be either Days or Years but you must select one. You cannot specify Days and Years at the same time.

ObjectNotInActiveTierError

Description

The source object of the COPY action is not in the active tier and is only stored in Amazon S3 Glacier.

Members

ObjectVersion

Description

The version of an object.

Members
ETag
  • Type: string

The entity tag is an MD5 hash of that version of the object.

IsLatest
  • Type: boolean

Specifies whether the object is (true) or is not (false) the latest version of an object.

Key
  • Type: string

The object key.

LastModified
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

Date and time the object was last modified.

Owner

Specifies the owner of the object.

Size
  • Type: long (int|float)

Size in bytes of the object.

StorageClass
  • Type: string

The class of storage used to store the object.

VersionId
  • Type: string

Version ID of an object.

OutputLocation

Description

Describes the location where the restore job’s output is stored.

Members
S3

Describes an S3 location that will receive the results of the restore request.

OutputSerialization

Description

Describes how results of the Select job are serialized.

Members
CSV

Describes the serialization of CSV-encoded Select results.

JSON

Specifies JSON as request’s output serialization format.

Owner

Description

Container for the owner’s display name and ID.

Members
DisplayName
  • Type: string

Container for the display name of the owner.

ID
  • Type: string

Container for the ID of the owner.

OwnershipControls

Description

The container element for a bucket’s ownership controls.

Members
Rules

The container element for an ownership control rule.

OwnershipControlsRule

Description

The container element for an ownership control rule.

Members
ObjectOwnership
  • Required: Yes
  • Type: string

The container element for object ownership for a bucket’s ownership controls.

BucketOwnerPreferred – Objects uploaded to the bucket change ownership to the bucket owner if the objects are uploaded with the bucket-owner-full-control canned ACL.

ObjectWriter – The uploading account will own the object if the object is uploaded with the bucket-owner-full-control canned ACL.

BucketOwnerEnforced – Access control lists (ACLs) are disabled and no longer affect permissions. The bucket owner automatically owns and has full control over every object in the bucket. The bucket only accepts PUT requests that don’t specify an ACL or bucket owner full control ACLs, such as the bucket-owner-full-control canned ACL or an equivalent form of this ACL expressed in the XML format.

ParquetInput

Description

Container for Parquet.

Members

Part

Description

Container for elements related to a part.

Members
ETag
  • Type: string

Entity tag returned when the part was uploaded.

LastModified
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

Date and time at which the part was uploaded.

PartNumber
  • Type: int

Part number identifying the part. This is a positive integer between 1 and 10,000.

Size
  • Type: long (int|float)

Size in bytes of the uploaded part data.

PolicyStatus

Description

The container element for a bucket’s policy status.

Members
IsPublic
  • Type: boolean

The policy status for this bucket. TRUE indicates that this bucket is public. FALSE indicates that the bucket is not public.

Progress

Description

This data type contains information about progress of an operation.

Members
BytesProcessed
  • Type: long (int|float)

The current number of uncompressed object bytes processed.

BytesReturned
  • Type: long (int|float)

The current number of bytes of records payload data returned.

BytesScanned
  • Type: long (int|float)

The current number of object bytes scanned.

ProgressEvent

Description

This data type contains information about the progress event of an operation.

Members
Details

The Progress event details.

PublicAccessBlockConfiguration

Description

The PublicAccessBlock configuration that you want to apply to this Amazon S3 bucket. You can enable the configuration options in any combination. For more information about when Amazon S3 considers a bucket or object public, see The Meaning of “Public” in the Amazon S3 User Guide.

Members
BlockPublicAcls
  • Type: boolean

Specifies whether Amazon S3 should block public access control lists (ACLs) for this bucket and objects in this bucket. Setting this element to TRUE causes the following behavior:

  • PUT Bucket acl and PUT Object acl calls fail if the specified ACL is public.
  • PUT Object calls fail if the request includes a public ACL.
  • PUT Bucket calls fail if the request includes a public ACL.

Enabling this setting doesn’t affect existing policies or ACLs.

BlockPublicPolicy
  • Type: boolean

Specifies whether Amazon S3 should block public bucket policies for this bucket. Setting this element to TRUE causes Amazon S3 to reject calls to PUT Bucket policy if the specified bucket policy allows public access.

Enabling this setting doesn’t affect existing bucket policies.

IgnorePublicAcls
  • Type: boolean

Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this bucket. Setting this element to TRUE causes Amazon S3 to ignore all public ACLs on this bucket and objects in this bucket.

Enabling this setting doesn’t affect the persistence of any existing ACLs and doesn’t prevent new public ACLs from being set.

RestrictPublicBuckets
  • Type: boolean

Specifies whether Amazon S3 should restrict public bucket policies for this bucket. Setting this element to TRUE restricts access to this bucket to only Amazon Web Service principals and authorized users within this account if the bucket has a public policy.

Enabling this setting doesn’t affect previously stored bucket policies, except that public and cross-account access within any public bucket policy, including non-public delegation to specific accounts, is blocked.

QueueConfiguration

Description

Specifies the configuration for publishing messages to an Amazon Simple Queue Service (Amazon SQS) queue when Amazon S3 detects specified events.

Members
Events
  • Required: Yes
  • Type: Array of strings

A collection of bucket events for which to send notifications

Filter

Specifies object key name filtering rules. For information about key name filtering, see Configuring Event Notifications in the Amazon S3 User Guide.

Id
  • Type: string

An optional unique identifier for configurations in a notification configuration. If you don’t provide one, Amazon S3 will assign an ID.

QueueArn
  • Required: Yes
  • Type: string

The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3 publishes a message when it detects events of the specified type.

QueueConfigurationDeprecated

Description

This data type is deprecated. Use QueueConfiguration for the same purposes. This data type specifies the configuration for publishing messages to an Amazon Simple Queue Service (Amazon SQS) queue when Amazon S3 detects specified events.

Members
Event
  • Type: string

The bucket event for which to send notifications.

Events
  • Type: Array of strings

A collection of bucket events for which to send notifications.

Id
  • Type: string

An optional unique identifier for configurations in a notification configuration. If you don’t provide one, Amazon S3 will assign an ID.

Queue
  • Type: string

The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3 publishes a message when it detects events of the specified type.

RecordsEvent

Description

The container for the records event.

Members
Payload
  • Type: blob (string|resource|Psr\Http\Message\StreamInterface)

The byte array of partial, one or more result records.

Redirect

Description

Specifies how requests are redirected. In the event of an error, you can specify a different error code to return.

Members
HostName
  • Type: string

The host name to use in the redirect request.

HttpRedirectCode
  • Type: string

The HTTP redirect code to use on the response. Not required if one of the siblings is present.

Protocol
  • Type: string

Protocol to use when redirecting requests. The default is the protocol that is used in the original request.

ReplaceKeyPrefixWith
  • Type: string

The object key prefix to use in the redirect request. For example, to redirect requests for all pages with prefix docs/ (objects in the docs/ folder) to documents/, you can set a condition block with KeyPrefixEquals set to docs/ and in the Redirect set ReplaceKeyPrefixWith to /documents. Not required if one of the siblings is present. Can be present only if ReplaceKeyWith is not provided.

Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints.

ReplaceKeyWith
  • Type: string

The specific object key to use in the redirect request. For example, redirect request to error.html. Not required if one of the siblings is present. Can be present only if ReplaceKeyPrefixWith is not provided.

Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints.

RedirectAllRequestsTo

Description

Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 bucket.

Members
HostName
  • Required: Yes
  • Type: string

Name of the host where requests are redirected.

Protocol
  • Type: string

Protocol to use when redirecting requests. The default is the protocol that is used in the original request.

ReplicaModifications

Description

A filter that you can specify for selection for modifications on replicas. Amazon S3 doesn’t replicate replica modifications by default. In the latest version of replication configuration (when Filter is specified), you can specify this element and set the status to Enabled to replicate modifications on replicas.

If you don’t specify the Filter element, Amazon S3 assumes that the replication configuration is the earlier version, V1. In the earlier version, this element is not allowed.

Members
Status
  • Required: Yes
  • Type: string

Specifies whether Amazon S3 replicates modifications on replicas.

ReplicationConfiguration

Description

A container for replication rules. You can add up to 1,000 rules. The maximum size of a replication configuration is 2 MB.

Members
Role
  • Required: Yes
  • Type: string

The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that Amazon S3 assumes when replicating objects. For more information, see How to Set Up Replication in the Amazon S3 User Guide.

Rules

A container for one or more replication rules. A replication configuration must have at least one rule and can contain a maximum of 1,000 rules.

ReplicationRule

Description

Specifies which Amazon S3 objects to replicate and where to store the replicas.

Members
DeleteMarkerReplication

Specifies whether Amazon S3 replicates delete markers. If you specify a Filter in your replication configuration, you must also include a DeleteMarkerReplication element. If your Filter includes a Tag element, the DeleteMarkerReplication Status must be set to Disabled, because Amazon S3 does not support replicating delete markers for tag-based rules. For an example configuration, see Basic Rule Configuration.

For more information about delete marker replication, see Basic Rule Configuration.

If you are using an earlier version of the replication configuration, Amazon S3 handles replication of delete markers differently. For more information, see Backward Compatibility.

Destination

A container for information about the replication destination and its configurations including enabling the S3 Replication Time Control (S3 RTC).

ExistingObjectReplication

 

Filter

A filter that identifies the subset of objects to which the replication rule applies. A Filter must specify exactly one Prefix, Tag, or an And child element.

ID
  • Type: string

A unique identifier for the rule. The maximum value is 255 characters.

Prefix
  • Type: string

An object key name prefix that identifies the object or objects to which the rule applies. The maximum prefix length is 1,024 characters. To include all objects in a bucket, specify an empty string.

Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints.

Priority
  • Type: int

The priority indicates which rule has precedence whenever two or more replication rules conflict. Amazon S3 will attempt to replicate objects according to all replication rules. However, if there are two or more rules with the same destination bucket, then objects will be replicated according to the rule with the highest priority. The higher the number, the higher the priority.

For more information, see Replication in the Amazon S3 User Guide.

SourceSelectionCriteria

A container that describes additional filters for identifying the source objects that you want to replicate. You can choose to enable or disable the replication of these objects. Currently, Amazon S3 supports only the filter that you can specify for objects created with server-side encryption using a customer managed key stored in Amazon Web Services Key Management Service (SSE-KMS).

Status
  • Required: Yes
  • Type: string

Specifies whether the rule is enabled.

ReplicationRuleAndOperator

Description

A container for specifying rule filters. The filters determine the subset of objects to which the rule applies. This element is required only if you specify more than one filter.

For example:

  • If you specify both a Prefix and a Tag filter, wrap these filters in an And tag.
  • If you specify a filter based on multiple tags, wrap the Tag elements in an And tag.
Members
Prefix
  • Type: string

An object key name prefix that identifies the subset of objects to which the rule applies.

Tags
  • Type: Array of Tag structures

An array of tags containing key and value pairs.

ReplicationRuleFilter

Description

A filter that identifies the subset of objects to which the replication rule applies. A Filter must specify exactly one Prefix, Tag, or an And child element.

Members
And

A container for specifying rule filters. The filters determine the subset of objects to which the rule applies. This element is required only if you specify more than one filter. For example:

  • If you specify both a Prefix and a Tag filter, wrap these filters in an And tag.
  • If you specify a filter based on multiple tags, wrap the Tag elements in an And tag.
Prefix
  • Type: string

An object key name prefix that identifies the subset of objects to which the rule applies.

Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints.

Tag
  • Type: Tag structure

A container for specifying a tag key and value.

The rule applies only to objects that have the tag in their tag set.

ReplicationTime

Description

A container specifying S3 Replication Time Control (S3 RTC) related information, including whether S3 RTC is enabled and the time when all objects and operations on objects must be replicated. Must be specified together with a Metrics block.

Members
Status
  • Required: Yes
  • Type: string

Specifies whether the replication time is enabled.

Time

A container specifying the time by which replication should be complete for all objects and operations on objects.

ReplicationTimeValue

Description

A container specifying the time value for S3 Replication Time Control (S3 RTC) and replication metrics EventThreshold.

Members
Minutes
  • Type: int

Contains an integer specifying time in minutes.

Valid value: 15

RequestPaymentConfiguration

Description

Container for Payer.

Members
Payer
  • Required: Yes
  • Type: string

Specifies who pays for the download and request fees.

RequestProgress

Description

Container for specifying if periodic QueryProgress messages should be sent.

Members
Enabled
  • Type: boolean

Specifies whether periodic QueryProgress frames should be sent. Valid values: TRUE, FALSE. Default value: FALSE.

RestoreRequest

Description

Container for restore job parameters.

Members
Days
  • Type: int

Lifetime of the active copy in days. Do not use with restores that specify OutputLocation.

The Days element is required for regular restores, and must not be provided for select requests.

Description
  • Type: string

The optional description for the job.

GlacierJobParameters

S3 Glacier related parameters pertaining to this job. Do not use with restores that specify OutputLocation.

OutputLocation

Describes the location where the restore job’s output is stored.

SelectParameters

Describes the parameters for Select job types.

Tier
  • Type: string

Retrieval tier at which the restore will be processed.

Type
  • Type: string

Type of restore request.

RoutingRule

Description

Specifies the redirect behavior and when a redirect is applied. For more information about routing rules, see Configuring advanced conditional redirects in the Amazon S3 User Guide.

Members
Condition

A container for describing a condition that must be met for the specified redirect to apply. For example, 1. If request is for pages in the /docs folder, redirect to the /documents folder. 2. If request results in HTTP error 4xx, redirect request to another host where you might process the error.

Redirect
  • Required: Yes
  • Type: Redirect structure

Container for redirect information. You can redirect requests to another host, to another page, or with another protocol. In the event of an error, you can specify a different error code to return.

Rule

Description

Specifies lifecycle rules for an Amazon S3 bucket. For more information, see Put Bucket Lifecycle Configuration in the Amazon S3 API Reference. For examples, see Put Bucket Lifecycle Configuration Examples.

Members
AbortIncompleteMultipartUpload

Specifies the days since the initiation of an incomplete multipart upload that Amazon S3 will wait before permanently removing all parts of the upload. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Policy in the Amazon S3 User Guide.

Expiration

Specifies the expiration for the lifecycle of the object.

ID
  • Type: string

Unique identifier for the rule. The value can’t be longer than 255 characters.

NoncurrentVersionExpiration

Specifies when noncurrent object versions expire. Upon expiration, Amazon S3 permanently deletes the noncurrent object versions. You set this lifecycle configuration action on a bucket that has versioning enabled (or suspended) to request that Amazon S3 delete noncurrent object versions at a specific period in the object’s lifetime.

NoncurrentVersionTransition

Container for the transition rule that describes when noncurrent objects transition to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage class. If your bucket is versioning-enabled (or versioning is suspended), you can set this action to request that Amazon S3 transition noncurrent object versions to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage class at a specific period in the object’s lifetime.

Prefix
  • Required: Yes
  • Type: string

Object key prefix that identifies one or more objects to which this rule applies.

Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints.

Status
  • Required: Yes
  • Type: string

If Enabled, the rule is currently being applied. If Disabled, the rule is not currently being applied.

Transition

Specifies when an object transitions to a specified storage class. For more information about Amazon S3 lifecycle configuration rules, see Transitioning Objects Using Amazon S3 Lifecycle in the Amazon S3 User Guide.

S3KeyFilter

Description

A container for object key name prefix and suffix filtering rules.

Members
FilterRules

A list of containers for the key-value pair that defines the criteria for the filter rule.

S3Location

Description

Describes an Amazon S3 location that will receive the results of the restore request.

Members
AccessControlList
  • Type: Array of Grant structures

A list of grants that control access to the staged results.

BucketName
  • Required: Yes
  • Type: string

The name of the bucket where the restore results will be placed.

CannedACL
  • Type: string

The canned ACL to apply to the restore results.

Encryption

Contains the type of server-side encryption used.

Prefix
  • Required: Yes
  • Type: string

The prefix that is prepended to the restore results for this request.

StorageClass
  • Type: string

The class of storage used to store the restore results.

Tagging

The tag-set that is applied to the restore results.

UserMetadata

A list of metadata to store with the restore results in S3.

SSEKMS

Description

Specifies the use of SSE-KMS to encrypt delivered inventory reports.

Members
KeyId
  • Required: Yes
  • Type: string

Specifies the ID of the Amazon Web Services Key Management Service (Amazon Web Services KMS) symmetric customer managed key to use for encrypting inventory reports.

SSES3

Description

Specifies the use of SSE-S3 to encrypt delivered inventory reports.

Members

ScanRange

Description

Specifies the byte range of the object to get the records from. A record is processed when its first byte is contained by the range. This parameter is optional, but when specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the start and end of the range.

Members
End
  • Type: long (int|float)

Specifies the end of the byte range. This parameter is optional. Valid values: non-negative integers. The default value is one less than the size of the object being queried. If only the End parameter is supplied, it is interpreted to mean scan the last N bytes of the file. For example, <scanrange><end>50</end></scanrange> means scan the last 50 bytes.

Start
  • Type: long (int|float)

Specifies the start of the byte range. This parameter is optional. Valid values: non-negative integers. The default value is 0. If only start is supplied, it means scan from that point to the end of the file.For example; <scanrange><start>50</start></scanrange> means scan from byte 50 until the end of the file.

SelectObjectContentEventStream

Description

The container for selecting objects from a content event stream.

Members
Cont

The Continuation Event.

End

The End Event.

Progress

The Progress Event.

Records

The Records Event.

Stats

The Stats Event.

SelectObjectContentRequest

Description

Request to filter the contents of an Amazon S3 object based on a simple Structured Query Language (SQL) statement. In the request, along with the SQL expression, you must specify a data serialization format (JSON or CSV) of the object. Amazon S3 uses this to parse object data into records. It returns only records that match the specified SQL expression. You must also specify the data serialization format for the response. For more information, see S3Select API Documentation.

Members
Bucket
  • Required: Yes
  • Type: string

The S3 bucket.

ExpectedBucketOwner
  • Type: string

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

Expression
  • Required: Yes
  • Type: string

The expression that is used to query the object.

ExpressionType
  • Required: Yes
  • Type: string

The type of the provided expression (for example, SQL).

InputSerialization

Describes the format of the data in the object that is being queried.

Key
  • Required: Yes
  • Type: string

The object key.

OutputSerialization

Describes the format of the data that you want Amazon S3 to return in response.

RequestProgress

Specifies if periodic request progress information should be enabled.

SSECustomerAlgorithm
  • Type: string

The SSE Algorithm used to encrypt the object. For more information, see Server-Side Encryption (Using Customer-Provided Encryption Keys.

SSECustomerKey
  • Type: string

The SSE Customer Key. For more information, see Server-Side Encryption (Using Customer-Provided Encryption Keys.

This value will be base64 encoded on your behalf.
SSECustomerKeyMD5
  • Type: string

The SSE Customer Key MD5. For more information, see Server-Side Encryption (Using Customer-Provided Encryption Keys.

ScanRange

Specifies the byte range of the object to get the records from. A record is processed when its first byte is contained by the range. This parameter is optional, but when specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the start and end of the range.

ScanRangemay be used in the following ways:

  • <scanrange><start>50</start><end>100</end></scanrange> – process only the records starting between the bytes 50 and 100 (inclusive, counting from zero)
  • <scanrange><start>50</start></scanrange> – process only the records starting after the byte 50
  • <scanrange><end>50</end></scanrange> – process only the records within the last 50 bytes of the file.

SelectParameters

Description

Describes the parameters for Select job types.

Members
Expression
  • Required: Yes
  • Type: string

The expression that is used to query the object.

ExpressionType
  • Required: Yes
  • Type: string

The type of the provided expression (for example, SQL).

InputSerialization

Describes the serialization format of the object.

OutputSerialization

Describes how the results of the Select job are serialized.

ServerSideEncryptionByDefault

Description

Describes the default server-side encryption to apply to new objects in the bucket. If a PUT Object request doesn’t specify any server-side encryption, this default encryption will be applied. For more information, see PUT Bucket encryption in the Amazon S3 API Reference.

Members
KMSMasterKeyID
  • Type: string

Amazon Web Services Key Management Service (KMS) customer Amazon Web Services KMS key ID to use for the default encryption. This parameter is allowed if and only if SSEAlgorithm is set to aws:kms.

You can specify the key ID or the Amazon Resource Name (ARN) of the KMS key. However, if you are using encryption with cross-account operations, you must use a fully qualified KMS key ARN. For more information, see Using encryption for cross-account operations.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

Amazon S3 only supports symmetric KMS keys and not asymmetric KMS keys. For more information, see Using symmetric and asymmetric keys in the Amazon Web Services Key Management Service Developer Guide.

SSEAlgorithm
  • Required: Yes
  • Type: string

Server-side encryption algorithm to use for the default encryption.

ServerSideEncryptionConfiguration

Description

Specifies the default server-side-encryption configuration.

Members
Rules

Container for information about a particular server-side encryption configuration rule.

ServerSideEncryptionRule

Description

Specifies the default server-side encryption configuration.

Members
ApplyServerSideEncryptionByDefault

Specifies the default server-side encryption to apply to new objects in the bucket. If a PUT Object request doesn’t specify any server-side encryption, this default encryption will be applied.

BucketKeyEnabled
  • Type: boolean

Specifies whether Amazon S3 should use an S3 Bucket Key with server-side encryption using KMS (SSE-KMS) for new objects in the bucket. Existing objects are not affected. Setting the BucketKeyEnabled element to true causes Amazon S3 to use an S3 Bucket Key. By default, S3 Bucket Key is not enabled.

For more information, see Amazon S3 Bucket Keys in the Amazon S3 User Guide.

SourceSelectionCriteria

Description

A container that describes additional filters for identifying the source objects that you want to replicate. You can choose to enable or disable the replication of these objects. Currently, Amazon S3 supports only the filter that you can specify for objects created with server-side encryption using a customer managed key stored in Amazon Web Services Key Management Service (SSE-KMS).

Members
ReplicaModifications

A filter that you can specify for selections for modifications on replicas. Amazon S3 doesn’t replicate replica modifications by default. In the latest version of replication configuration (when Filter is specified), you can specify this element and set the status to Enabled to replicate modifications on replicas.

If you don’t specify the Filter element, Amazon S3 assumes that the replication configuration is the earlier version, V1. In the earlier version, this element is not allowed

SseKmsEncryptedObjects

A container for filter information for the selection of Amazon S3 objects encrypted with Amazon Web Services KMS. If you include SourceSelectionCriteria in the replication configuration, this element is required.

SseKmsEncryptedObjects

Description

A container for filter information for the selection of S3 objects encrypted with Amazon Web Services KMS.

Members
Status
  • Required: Yes
  • Type: string

Specifies whether Amazon S3 replicates objects created with server-side encryption using an Amazon Web Services KMS key stored in Amazon Web Services Key Management Service.

Stats

Description

Container for the stats details.

Members
BytesProcessed
  • Type: long (int|float)

The total number of uncompressed object bytes processed.

BytesReturned
  • Type: long (int|float)

The total number of bytes of records payload data returned.

BytesScanned
  • Type: long (int|float)

The total number of object bytes scanned.

StatsEvent

Description

Container for the Stats Event.

Members
Details

The Stats event details.

StorageClassAnalysis

Description

Specifies data related to access patterns to be collected and made available to analyze the tradeoffs between different storage classes for an Amazon S3 bucket.

Members
DataExport

Specifies how data related to the storage class analysis for an Amazon S3 bucket should be exported.

StorageClassAnalysisDataExport

Description

Container for data related to the storage class analysis for an Amazon S3 bucket for export.

Members
Destination

The place to store the data for an analysis.

OutputSchemaVersion
  • Required: Yes
  • Type: string

The version of the output schema to use when exporting data. Must be V_1.

Tag

Description

A container of a key value name pair.

Members
Key
  • Required: Yes
  • Type: string

Name of the object key.

Value
  • Required: Yes
  • Type: string

Value of the tag.

Tagging

Description

Container for TagSet elements.

Members
TagSet
  • Required: Yes
  • Type: Array of Tag structures

A collection for a set of tags

TargetGrant

Description

Container for granting information.

Buckets that use the bucket owner enforced setting for Object Ownership don’t support target grants. For more information, see Permissions server access log delivery in the Amazon S3 User Guide.

Members
Grantee

Container for the person being granted permissions.

Permission
  • Type: string

Logging permissions assigned to the grantee for the bucket.

Tiering

Description

The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without additional operational overhead.

Members
AccessTier
  • Required: Yes
  • Type: string

S3 Intelligent-Tiering access tier. See Storage class for automatically optimizing frequently and infrequently accessed objects for a list of access tiers in the S3 Intelligent-Tiering storage class.

Days
  • Required: Yes
  • Type: int

The number of consecutive days of no access after which an object will be eligible to be transitioned to the corresponding tier. The minimum number of days specified for Archive Access tier must be at least 90 days and Deep Archive Access tier must be at least 180 days. The maximum can be up to 2 years (730 days).

TopicConfiguration

Description

A container for specifying the configuration for publication of messages to an Amazon Simple Notification Service (Amazon SNS) topic when Amazon S3 detects specified events.

Members
Events
  • Required: Yes
  • Type: Array of strings

The Amazon S3 bucket event about which to send notifications. For more information, see Supported Event Types in the Amazon S3 User Guide.

Filter

Specifies object key name filtering rules. For information about key name filtering, see Configuring Event Notifications in the Amazon S3 User Guide.

Id
  • Type: string

An optional unique identifier for configurations in a notification configuration. If you don’t provide one, Amazon S3 will assign an ID.

TopicArn
  • Required: Yes
  • Type: string

The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3 publishes a message when it detects events of the specified type.

TopicConfigurationDeprecated

Description

A container for specifying the configuration for publication of messages to an Amazon Simple Notification Service (Amazon SNS) topic when Amazon S3 detects specified events. This data type is deprecated. Use TopicConfiguration instead.

Members
Event
  • Type: string

Bucket event for which to send notifications.

Events
  • Type: Array of strings

A collection of events related to objects

Id
  • Type: string

An optional unique identifier for configurations in a notification configuration. If you don’t provide one, Amazon S3 will assign an ID.

Topic
  • Type: string

Amazon SNS topic to which Amazon S3 will publish a message to report the specified events for the bucket.

Transition

Description

Specifies when an object transitions to a specified storage class. For more information about Amazon S3 lifecycle configuration rules, see Transitioning Objects Using Amazon S3 Lifecycle in the Amazon S3 User Guide.

Members
Date
  • Type: timestamp (string|DateTime or anything parsable by strtotime)

Indicates when objects are transitioned to the specified storage class. The date value must be in ISO 8601 format. The time is always midnight UTC.

Days
  • Type: int

Indicates the number of days after creation when objects are transitioned to the specified storage class. The value must be a positive integer.

StorageClass
  • Type: string

The storage class to which you want the object to transition.

VersioningConfiguration

Description

Describes the versioning state of an Amazon S3 bucket. For more information, see PUT Bucket versioning in the Amazon S3 API Reference.

Members
MFADelete
  • Type: string

Specifies whether MFA delete is enabled in the bucket versioning configuration. This element is only returned if the bucket has been configured with MFA delete. If the bucket has never been so configured, this element is not returned.

Status
  • Type: string

The versioning state of the bucket.

WebsiteConfiguration

Description

Specifies website configuration parameters for an Amazon S3 bucket.

Members
ErrorDocument

The name of the error document for the website.

IndexDocument

The name of the index document for the website.

RedirectAllRequestsTo

The redirect behavior for every request to this bucket’s website endpoint.

If you specify this property, you can’t specify any other property.

RoutingRules

Rules that define when a redirect is applied and the redirect behavior.

 

https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-s3-2006-03-01.html