Class: AWS.S3
- Inherits:
-
AWS.Service
- Object
- AWS.Service
- AWS.S3
- Identifier:
- s3
- API Version:
- 2006-03-01
- Defined in:
- (unknown)
Overview
Constructs a service interface object. Each API operation is exposed as a function on service.
Service Description
Sending a Request Using S3
var s3 = new AWS.S3();
s3.abortMultipartUpload(params, function (err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Locking the API Version
In order to ensure that the S3 object uses this specific API, you can
construct the object by passing the apiVersion option to the constructor:
var s3 = new AWS.S3({apiVersion: '2006-03-01'});
You can also set the API version globally in AWS.config.apiVersions using
the s3 service identifier:
AWS.config.apiVersions = {
s3: '2006-03-01',
// other service API versions
};
var s3 = new AWS.S3();
Defined Under Namespace
Classes: ManagedUpload
Waiter Resource States
This service supports a list of resource states that can be polled using the waitFor() method. The resource states are:
bucketExists, bucketNotExists, objectExists, objectNotExists
Constructor Summary collapse
-
new AWS.S3(options = {}) ⇒ Object
constructor
Constructs a service object.
Property Summary collapse
-
endpoint ⇒ AWS.Endpoint
readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summary collapse
-
abortMultipartUpload(params = {}, callback) ⇒ AWS.Request
This operation aborts a multipart upload.
-
addLegalHold(params = {}, callback) ⇒ AWS.Request
Add a legal hold on an object.
-
completeMultipartUpload(params = {}, callback) ⇒ AWS.Request
Completes a multipart upload by assembling previously uploaded parts.
You first initiate the multipart upload and then upload all parts using the UploadPart operation.
-
copyObject(params = {}, callback) ⇒ AWS.Request
Creates a copy of an object that is already stored in Amazon S3.
Note: You can store individual objects of up to 5 TB in Amazon S3.- createBucket(params, callback) ⇒ AWS.Request
Note: This action creates an Amazon S3 bucket.- createMultipartUpload(params = {}, callback) ⇒ AWS.Request
This action initiates a multipart upload and returns an upload ID.
- createPresignedPost(params, callback) ⇒ map?
Get a pre-signed POST policy to support uploading to S3 directly from an HTML form.
- deleteBucket(params = {}, callback) ⇒ AWS.Request
Deletes the S3 bucket.
- deleteBucketCors(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- deleteBucketLifecycle(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- deleteBucketReplication(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- deleteBucketTagging(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- deleteBucketWebsite(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- deleteLegalHold(params = {}, callback) ⇒ AWS.Request
Remove Legal hold on an object.
- deleteObject(params = {}, callback) ⇒ AWS.Request
Removes an object from a bucket.
- deleteObjects(params = {}, callback) ⇒ AWS.Request
This operation enables you to delete multiple objects from a bucket using a single HTTP request.
- deleteObjectTagging(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- deletePublicAccessBlock(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- extendObjectRetention(params = {}, callback) ⇒ AWS.Request
This implementation of the POST operation uses the extendRetention sub-resource to extend the retention period of a protected object in a protected vault.
- getBucketAcl(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- getBucketCors(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- getBucketLifecycle(params = {}, callback) ⇒ AWS.Request
For an updated version of this API, see GetBucketLifecycleConfiguration.
- getBucketLifecycleConfiguration(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- getBucketLocation(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- getBucketProtectionConfiguration(params = {}, callback) ⇒ AWS.Request
Returns the protection configuration of a bucket.
- getBucketReplication(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- getBucketTagging(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- getBucketVersioning(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- getBucketWebsite(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- getObject(params = {}, callback) ⇒ AWS.Request
Retrieves an object from Amazon S3.
In the
GetObjectrequest, specify the full key name for the object.General purpose buckets - Both the virtual-hosted-style requests and the path-style requests are supported.
- getObjectAcl(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- getObjectLegalHold(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- getObjectLockConfiguration(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- getObjectRetention(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- getObjectTagging(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- getPublicAccessBlock(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- getSignedUrl(operation, params, callback) ⇒ String?
Get a pre-signed URL for a given operation name.
- getSignedUrlPromise() ⇒ Promise
Returns a 'thenable' promise that will be resolved with a pre-signed URL for a given operation name.
- headBucket(params = {}, callback) ⇒ AWS.Request
You can use this operation to determine if a bucket exists and if you have permission to access it.
- headObject(params = {}, callback) ⇒ AWS.Request
The
HEADoperation retrieves metadata from an object without returning the object itself.- listBuckets(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- listBucketsExtended(params = {}, callback) ⇒ AWS.Request
Returns a list of all buckets owned by the authenticated sender of the request, along with the LocationConstraint describing the region that the bucket resides in and the bucket's storage tier.
- listLegalHolds(params = {}, callback) ⇒ AWS.Request
Returns a list of legal holds on an object.
- listMultipartUploads(params = {}, callback) ⇒ AWS.Request
This operation lists in-progress multipart uploads in a bucket.
- listObjects(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- listObjectsV2(params = {}, callback) ⇒ AWS.Request
Returns some or all (up to 1,000) of the objects in a bucket with each request.
- listObjectVersions(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- listParts(params = {}, callback) ⇒ AWS.Request
Lists the parts that have been uploaded for a specific multipart upload.
To use this operation, you must provide the
upload IDin the request.- putBucketAcl(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- putBucketCors(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- putBucketLifecycle(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- putBucketLifecycleConfiguration(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- putBucketProtectionConfiguration(params = {}, callback) ⇒ AWS.Request
Sets the protection configuration of an existing bucket.
- putBucketReplication(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- putBucketTagging(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- putBucketVersioning(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- putBucketWebsite(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- putObject(params = {}, callback) ⇒ AWS.Request
Adds an object to a bucket.
Note:- Amazon S3 never adds partial objects; if you receive a success response, Amazon S3 added the entire object to the bucket.
- putObjectAcl(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- putObjectLegalHold(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- putObjectLockConfiguration(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- putObjectRetention(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- putObjectTagging(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- putPublicAccessBlock(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- restoreObject(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.- upload(params = {}, [options], [callback]) ⇒ AWS.S3.ManagedUpload
Uploads an arbitrarily sized buffer, blob, or stream, using intelligent concurrent handling of parts if the payload is large enough.
- uploadPart(params = {}, callback) ⇒ AWS.Request
Uploads a part in a multipart upload.
Note: In this operation, you provide new data as a part of an object in your request.- uploadPartCopy(params = {}, callback) ⇒ AWS.Request
Uploads a part by copying data from an existing object as data source.
- waitFor(state, params = {}, callback) ⇒ AWS.Request
Waits for a given S3 resource.
Methods inherited from AWS.Service
makeRequest, makeUnauthenticatedRequest, defineService
Constructor Details
new AWS.S3(options = {}) ⇒ Object
Constructs a service object. This object has one method for each API operation.
Property Details
Method Details
abortMultipartUpload(params = {}, callback) ⇒ AWS.Request
This operation aborts a multipart upload. After a multipart upload is aborted, no additional parts can be uploaded using that upload ID. The storage consumed by any previously uploaded parts will be freed. However, if any part uploads are currently in progress, those part uploads might or might not succeed. As a result, it might be necessary to abort a given multipart upload multiple times in order to completely free all storage consumed by all parts.
To verify that all parts have been removed and prevent getting charged for the part storage, you should call the ListParts API operation and ensure that the parts list is empty.
Note:- Directory buckets - If multipart uploads in a directory bucket are in progress, you can't delete the bucket until all the in-progress multipart uploads are aborted or completed. To delete these in-progress multipart uploads, use the
ListMultipartUploadsoperation to list the in-progress multipart uploads in the bucket and use theAbortMultupartUploadoperation to abort all the in-progress multipart uploads. - Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format
https://bucket_name.s3express-az_id.region.amazonaws.com/key-name. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the Amazon S3 User Guide.
- Permissions
-
-
General purpose bucket permissions - For information about permissions required to use the multipart upload, see Multipart Upload and Permissions in the Amazon S3 User Guide.
-
Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the
CreateSessionAPI operation for session-based authorization. Specifically, you grant thes3express:CreateSessionpermission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make theCreateSessionAPI call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make anotherCreateSessionAPI call to generate a new session token for use. Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, seeCreateSession.
-
- HTTP Host header syntax
-
Directory buckets - The HTTP Host header syntax is
Bucket_name.s3express-az_id.region.amazonaws.com.
The following operations are related to
AbortMultipartUpload:addLegalHold(params = {}, callback) ⇒ AWS.Request
Add a legal hold on an object. The legal hold identifiers are stored in the object metadata along with the timestamp of when they are POSTed to the object. The presence of any legal hold identifiers prevents the modification or deletion of the object data, even if the retention period has expired. The presence of a retention period header is required, otherwise a 400 error is returned.
completeMultipartUpload(params = {}, callback) ⇒ AWS.Request
Completes a multipart upload by assembling previously uploaded parts.
You first initiate the multipart upload and then upload all parts using the UploadPart operation. After successfully uploading all relevant parts of an upload, you call this action to complete the upload. Upon receiving this request, Amazon S3 concatenates all the parts in ascending order by part number to create a new object. In the Complete Multipart Upload request, you must provide the parts list. You must ensure that the parts list is complete. This action concatenates the parts that you provide in the list. For each part in the list, you must provide the part number and the
ETagvalue, returned after that part was uploaded.Processing of a Complete Multipart Upload request could take several minutes to complete. After Amazon S3 begins processing the request, it sends an HTTP response header that specifies a 200 OK response. While processing is in progress, Amazon S3 periodically sends white space characters to keep the connection from timing out. A request could fail after the initial 200 OK response has been sent. This means that a
200 OKresponse can contain either a success or an error. If you call the S3 API directly, make sure to design your application to parse the contents of the response and handle it appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition. The SDKs detect the embedded error and apply error handling per your configuration settings (including automatically retrying the request as appropriate). If the condition persists, the SDKs throws an exception (or, for the SDKs that don't use exceptions, they return the error).Note that if
CompleteMultipartUploadfails, applications should be prepared to retry the failed requests. For more information, see Amazon S3 Error Best Practices.You cannot use
Content-Type: application/x-www-form-urlencodedwith Complete Multipart Upload requests. Also, if you do not provide aContent-Typeheader,CompleteMultipartUploadreturns a 200 OK response.For more information about multipart uploads, see Uploading Objects Using Multipart Upload.
For information about permissions required to use the multipart upload API, see Multipart Upload and Permissions.
CompleteMultipartUploadhas the following special errors:-
Error code:
EntityTooSmall-
Description: Your proposed upload is smaller than the minimum allowed object size. Each part must be at least 5 MB in size, except the last part.
-
400 Bad Request
-
-
Error 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.
-
400 Bad Request
-
-
Error code:
InvalidPartOrder-
Description: The list of parts was not in ascending order. The parts list must be specified in order by part number.
-
400 Bad Request
-
-
Error 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.
-
404 Not Found
-
The following operations are related to
CompleteMultipartUpload:copyObject(params = {}, callback) ⇒ AWS.Request
Creates a copy of an object that is already stored in Amazon S3.
Note: You can store individual objects of up to 5 TB in Amazon S3. You create a copy of your object up to 5 GB in size in a single atomic action using this API. However, to copy an object greater than 5 GB, you must use the multipart upload Upload Part - Copy (UploadPartCopy) API. For more information, see Copy Object Using the REST Multipart Upload API.You can copy individual objects between general purpose buckets, between directory buckets, and between general purpose buckets and directory buckets.
Note:- Amazon S3 supports copy operations using Multi-Region Access Points only as a destination when using the Multi-Region Access Point ARN.
- Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format
https://bucket_name.s3express-az_id.region.amazonaws.com/key-name. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the Amazon S3 User Guide. - VPC endpoints don't support cross-Region requests (including copies). If you're using VPC endpoints, your source and destination buckets should be in the same Amazon Web Services Region as your VPC endpoint.
Both the Region that you want to copy the object from and the Region that you want to copy the object to must be enabled for your account. For more information about how to enable a Region for your account, see Enable or disable a Region for standalone accounts in the Amazon Web Services Account Management Guide.
Amazon S3 transfer acceleration does not support cross-Region copies. If you request a cross-Region copy using a transfer acceleration endpoint, you get a
400 Bad Requesterror. For more information, see Transfer Acceleration.- Authentication and authorization
-
All
CopyObjectrequests must be authenticated and signed by using IAM credentials (access key ID and secret access key for the IAM identities). All headers with thex-amz-prefix, includingx-amz-copy-source, must be signed. For more information, see REST Authentication.Directory buckets - You must use the IAM credentials to authenticate and authorize your access to the
CopyObjectAPI operation, instead of using the temporary security credentials through theCreateSessionAPI operation.Amazon Web Services CLI or SDKs handles authentication and authorization on your behalf.
- Permissions
-
You must have read access to the source object and write access to the destination bucket.
-
General purpose bucket permissions - You must have permissions in an IAM policy based on the source and destination bucket types in a
CopyObjectoperation.-
If the source object is in a general purpose bucket, you must have
s3:GetObjectpermission to read the source object that is being copied. -
If the destination bucket is a general purpose bucket, you must have
s3:PutObjectpermission to write the object copy to the destination bucket.
-
-
Directory bucket permissions - You must have permissions in a bucket policy or an IAM identity-based policy based on the source and destination bucket types in a
CopyObjectoperation.-
If the source object that you want to copy is in a directory bucket, you must have the
s3express:CreateSessionpermission in theActionelement of a policy to read the object. By default, the session is in theReadWritemode. If you want to restrict the access, you can explicitly set thes3express:SessionModecondition key toReadOnlyon the copy source bucket. -
If the copy destination is a directory bucket, you must have the
s3express:CreateSessionpermission in theActionelement of a policy to write the object to the destination. Thes3express:SessionModecondition key can't be set toReadOnlyon the copy destination bucket.
If the object is encrypted with SSE-KMS, you must also have the
kms:GenerateDataKeyandkms:Decryptpermissions in IAM identity-based policies and KMS key policies for the KMS key.For example policies, see Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for S3 Express One Zone in the Amazon S3 User Guide.
-
-
- Response and special errors
-
When the request is an HTTP 1.1 request, the response is chunk encoded. When the request is not an HTTP 1.1 request, the response would not contain the
Content-Length. You always need to read the entire response body to check if the copy succeeds.-
If the copy is successful, you receive a response with information about the copied object.
-
A copy request might return an error when Amazon S3 receives the copy request or while Amazon S3 is copying the files. A
200 OKresponse can contain either a success or an error.-
If the error occurs before the copy action starts, you receive a standard Amazon S3 error.
-
If the error occurs during the copy operation, the error response is embedded in the
200 OKresponse. For example, in a cross-region copy, you may encounter throttling and receive a200 OKresponse. For more information, see Resolve the Error 200 response when copying objects to Amazon S3. The200 OKstatus code means the copy was accepted, but it doesn't mean the copy is complete. Another example is when you disconnect from Amazon S3 before the copy is complete, Amazon S3 might cancel the copy and you may receive a200 OKresponse. You must stay connected to Amazon S3 until the entire response is successfully received and processed.If you call this API operation directly, make sure to design your application to parse the content of the response and handle it appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition. The SDKs detect the embedded error and apply error handling per your configuration settings (including automatically retrying the request as appropriate). If the condition persists, the SDKs throw an exception (or, for the SDKs that don't use exceptions, they return an error).
-
-
- Charge
-
The copy request charge is based on the storage class and Region that you specify for the destination object. The request can also result in a data retrieval charge for the source if the source storage class bills for data retrieval. If the copy source is in a different region, the data transfer is billed to the copy source account. For pricing information, see Amazon S3 pricing.
- HTTP Host header syntax
-
Directory buckets - The HTTP Host header syntax is
Bucket_name.s3express-az_id.region.amazonaws.com.
The following operations are related to
CopyObject:createBucket(params, callback) ⇒ AWS.Request
Note: This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, seeCreateBucket.Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a valid Amazon Web Services Access Key ID to authenticate requests. Anonymous requests are never allowed to create buckets. By creating the bucket, you become the bucket owner.
There are two types of buckets: general purpose buckets and directory buckets. For more information about these bucket types, see Creating, configuring, and working with Amazon S3 buckets in the Amazon S3 User Guide.
Note:- General purpose buckets - If you send your
CreateBucketrequest to thes3.amazonaws.comglobal endpoint, the request goes to theus-east-1Region. So the signature calculations in Signature Version 4 must useus-east-1as the Region, even if the location constraint in the request specifies another Region where the bucket is to be created. If you create a bucket in a Region other than US East (N. Virginia), your application must be able to handle 307 redirect. For more information, see Virtual hosting of buckets in the Amazon S3 User Guide. - Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format
https://s3express-control.region_code.amazonaws.com/bucket-name. Virtual-hosted-style requests aren't supported. For more information, see Regional and Zonal endpoints in the Amazon S3 User Guide.
- Permissions
-
-
General purpose bucket permissions - In addition to the
s3:CreateBucketpermission, the following permissions are required in a policy when yourCreateBucketrequest includes specific headers:-
Access control lists (ACLs) - In your
CreateBucketrequest, if you specify an access control list (ACL) and set it topublic-read,public-read-write,authenticated-read, or if you explicitly specify any other custom ACLs, boths3:CreateBucketands3:PutBucketAclpermissions are required. In yourCreateBucketrequest, if you set the ACL toprivate, or if you don't specify any ACLs, only thes3:CreateBucketpermission is required. -
Object Lock - In your
CreateBucketrequest, if you setx-amz-bucket-object-lock-enabledto true, thes3:PutBucketObjectLockConfigurationands3:PutBucketVersioningpermissions are required. -
S3 Object Ownership - If your
CreateBucketrequest includes thex-amz-object-ownershipheader, then thes3:PutBucketOwnershipControlspermission is required.To set an ACL on a bucket as part of a
CreateBucketrequest, you must explicitly set S3 Object Ownership for the bucket to a different value than the default,BucketOwnerEnforced. Additionally, if your desired bucket ACL grants public access, you must first create the bucket (without the bucket ACL) and then explicitly disable Block Public Access on the bucket before usingPutBucketAclto set the ACL. If you try to create a bucket with a public ACL, the request will fail.For the majority of modern use cases in S3, we recommend that you keep all Block Public Access settings enabled and keep ACLs disabled. If you would like to share data with users outside of your account, you can use bucket policies as needed. For more information, see Controlling ownership of objects and disabling ACLs for your bucket and Blocking public access to your Amazon S3 storage in the Amazon S3 User Guide.
-
S3 Block Public Access - If your specific use case requires granting public access to your S3 resources, you can disable Block Public Access. Specifically, you can create a new bucket with Block Public Access enabled, then separately call the
DeletePublicAccessBlockAPI. To use this operation, you must have thes3:PutBucketPublicAccessBlockpermission. For more information about S3 Block Public Access, see Blocking public access to your Amazon S3 storage in the Amazon S3 User Guide.
-
-
Directory bucket permissions - You must have the
s3express:CreateBucketpermission in an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.The permissions for ACLs, Object Lock, S3 Object Ownership, and S3 Block Public Access are not supported for directory buckets. For directory buckets, all Block Public Access settings are enabled at the bucket level and S3 Object Ownership is set to Bucket owner enforced (ACLs disabled). These settings can't be modified.
For more information about permissions for creating and working with directory buckets, see Directory buckets in the Amazon S3 User Guide. For more information about supported S3 features for directory buckets, see Features of S3 Express One Zone in the Amazon S3 User Guide.
-
- HTTP Host header syntax
-
Directory buckets - The HTTP Host header syntax is
s3express-control.region.amazonaws.com.
The following operations are related to
CreateBucket:Note: This operation cannot be used in a browser. S3 does not support CORS on this operation.
createMultipartUpload(params = {}, callback) ⇒ AWS.Request
This action initiates a multipart upload and returns an upload ID. This upload ID is used to associate all of the parts in the specific multipart upload. You specify this upload ID in each of your subsequent upload part requests (see UploadPart). You also include this upload ID in the final request to either complete or abort the multipart upload request. For more information about multipart uploads, see Multipart Upload Overview in the Amazon S3 User Guide.
Note: After you initiate a multipart upload and upload one or more parts, to stop being charged for storing the uploaded parts, you must either complete or abort the multipart upload. Amazon S3 frees up the space used to store the parts and stops charging you for storing them only after you either complete or abort a multipart upload.If you have configured a lifecycle rule to abort incomplete multipart uploads, the created multipart upload must be completed within the number of days specified in the bucket lifecycle configuration. Otherwise, the incomplete multipart upload becomes eligible for an abort action and Amazon S3 aborts the multipart upload. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration.
Note:- Directory buckets - S3 Lifecycle is not supported by directory buckets.
- Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format
https://bucket_name.s3express-az_id.region.amazonaws.com/key-name. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the Amazon S3 User Guide.
- Request signing
-
For request signing, multipart upload is just a series of regular requests. You initiate a multipart upload, send one or more requests to upload parts, and then complete the multipart upload process. You sign each request individually. There is nothing special about signing multipart upload requests. For more information about signing, see Authenticating Requests (Amazon Web Services Signature Version 4) in the Amazon S3 User Guide.
- Permissions
-
-
General purpose bucket permissions - To perform a multipart upload with encryption using an Key Management Service (KMS) KMS key, the requester must have permission to the
kms:Decryptandkms:GenerateDataKeyactions on the key. The requester must also have permissions for thekms:GenerateDataKeyaction for theCreateMultipartUploadAPI. Then, the requester needs permissions for thekms:Decryptaction on theUploadPartandUploadPartCopyAPIs. These permissions are required because Amazon S3 must decrypt and read data from the encrypted file parts before it completes the multipart upload. For more information, see Multipart upload API and permissions and Protecting data using server-side encryption with Amazon Web Services KMS in the Amazon S3 User Guide. -
Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the
CreateSessionAPI operation for session-based authorization. Specifically, you grant thes3express:CreateSessionpermission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make theCreateSessionAPI call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make anotherCreateSessionAPI call to generate a new session token for use. Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, seeCreateSession.
-
- Encryption
-
-
General purpose buckets - Server-side encryption is for data encryption at rest. Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts it when you access it. Amazon S3 automatically encrypts all new objects that are uploaded to an S3 bucket. When doing a multipart upload, if you don't specify encryption information in your request, the encryption setting of the uploaded parts is set to the default encryption configuration of the destination bucket. By default, all buckets have a base level of encryption configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the destination bucket has a default encryption configuration that uses server-side encryption with an Key Management Service (KMS) key (SSE-KMS), or a customer-provided encryption key (SSE-C), Amazon S3 uses the corresponding KMS key, or a customer-provided key to encrypt the uploaded parts. When you perform a CreateMultipartUpload operation, if you want to use a different type of encryption setting for the uploaded parts, you can request that Amazon S3 encrypts the object with a different encryption key (such as an Amazon S3 managed key, a KMS key, or a customer-provided key). When the encryption setting in your request is different from the default encryption configuration of the destination bucket, the encryption setting in your request takes precedence. If you choose to provide your own encryption key, the request headers you provide in UploadPart and UploadPartCopy requests must match the headers you used in the
CreateMultipartUploadrequest.-
Use KMS keys (SSE-KMS) that include the Amazon Web Services managed key (
aws/s3) and KMS customer managed keys stored in Key Management Service (KMS) – If you want Amazon Web Services to manage the keys used to encrypt data, specify the following headers in the request.-
x-amz-server-side-encryption -
x-amz-server-side-encryption-aws-kms-key-id -
x-amz-server-side-encryption-context
Note:- If you specify
x-amz-server-side-encryption:aws:kms, but don't providex-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key (aws/s3key) in KMS to protect the data. - To perform a multipart upload with encryption by using an Amazon Web Services KMS key, the requester must have permission to the
kms:Decryptandkms:GenerateDataKey*actions on the key. These permissions are required because Amazon S3 must decrypt and read data from the encrypted file parts before it completes the multipart upload. For more information, see Multipart upload API and permissions and Protecting data using server-side encryption with Amazon Web Services KMS in the Amazon S3 User Guide. - If your Identity and Access Management (IAM) user or role is in the same Amazon Web Services account as the KMS key, then you must have these permissions on the key policy. If your IAM user or role is in a different account from the key, then you must have the permissions on both the key policy and your IAM user or role.
- All
GETandPUTrequests for an object protected by KMS fail if you don't make them by using Secure Sockets Layer (SSL), Transport Layer Security (TLS), or Signature Version 4. For information about configuring any of the officially supported Amazon Web Services SDKs and Amazon Web Services CLI, see Specifying the Signature Version in Request Authentication in the Amazon S3 User Guide.
For more information about server-side encryption with KMS keys (SSE-KMS), see Protecting Data Using Server-Side Encryption with KMS keys in the Amazon S3 User Guide.
-
-
Use customer-provided encryption keys (SSE-C) – If you want to manage your own encryption keys, provide all the following headers in the request.
-
x-amz-server-side-encryption-customer-algorithm -
x-amz-server-side-encryption-customer-key -
x-amz-server-side-encryption-customer-key-MD5
For more information about server-side encryption with customer-provided encryption keys (SSE-C), see Protecting data using server-side encryption with customer-provided encryption keys (SSE-C) in the Amazon S3 User Guide.
-
-
-
Directory buckets - For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (
AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in yourCreateSessionrequests orPUTobject requests. Then, new objects are automatically encrypted with the desired encryption settings. For more information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the
CreateSessionrequest. You can't override the values of the encryption settings (x-amz-server-side-encryption,x-amz-server-side-encryption-aws-kms-key-id,x-amz-server-side-encryption-context, andx-amz-server-side-encryption-bucket-key-enabled) that are specified in theCreateSessionrequest. You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and Amazon S3 will use the encryption settings values from theCreateSessionrequest to protect new objects in the directory bucket.Note: When you use the CLI or the Amazon Web Services SDKs, forCreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for theCreateSessionrequest. It's not supported to override the encryption settings values in theCreateSessionrequest. So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), the encryption request headers must match the default encryption configuration of the directory bucket.Note: For directory buckets, when you perform aCreateMultipartUploadoperation and anUploadPartCopyoperation, the request headers you provide in theCreateMultipartUploadrequest must match the default encryption configuration of the destination bucket.
-
- HTTP Host header syntax
-
Directory buckets - The HTTP Host header syntax is
Bucket_name.s3express-az_id.region.amazonaws.com.
The following operations are related to
CreateMultipartUpload:createPresignedPost(params, callback) ⇒ map?
Note:All fields passed in when creating presigned post data will be signed as exact match conditions. Any fields that will be interpolated by S3 must be added to the fields hash after signing, and an appropriate condition for such fields must be explicitly added to the Conditions array passed to this function before signing.
Note:You must ensure that you have static or previously resolved credentials if you call this method synchronously (with no callback), otherwise it may not properly sign the request. If you cannot guarantee this (you are using an asynchronous credential provider, i.e., EC2 IAM roles), you should always call this method with an asynchronous callback.
Get a pre-signed POST policy to support uploading to S3 directly from an HTML form.
deleteBucket(params = {}, callback) ⇒ AWS.Request
Deletes the S3 bucket. All objects (including all object versions and delete markers) in the bucket must be deleted before the bucket itself can be deleted.
Note:- Directory buckets - If multipart uploads in a directory bucket are in progress, you can't delete the bucket until all the in-progress multipart uploads are aborted or completed.
- Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format
https://s3express-control.region_code.amazonaws.com/bucket-name. Virtual-hosted-style requests aren't supported. For more information, see Regional and Zonal endpoints in the Amazon S3 User Guide.
- Permissions
-
-
General purpose bucket permissions - You must have the
s3:DeleteBucketpermission on the specified bucket in a policy. -
Directory bucket permissions - You must have the
s3express:DeleteBucketpermission in an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.
-
- HTTP Host header syntax
-
Directory buckets - The HTTP Host header syntax is
s3express-control.region.amazonaws.com.
The following operations are related to
DeleteBucket:Note: This operation cannot be used in a browser. S3 does not support CORS on this operation.
deleteBucketCors(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Deletes the
corsconfiguration information set for the bucket.To use this operation, you must have permission to perform the
s3:PutBucketCORSaction. The bucket owner has this permission by default and can grant this permission to others.For information about
cors, see Enabling Cross-Origin Resource Sharing in the Amazon S3 User Guide.Related Resources
deleteBucketLifecycle(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Deletes the lifecycle configuration from the specified bucket. Amazon S3 removes all the lifecycle configuration rules in the lifecycle subresource associated with the bucket. Your objects never expire, and Amazon S3 no longer automatically deletes any objects on the basis of rules contained in the deleted lifecycle configuration.
To use this operation, you must have permission to perform the
s3:PutLifecycleConfigurationaction. By default, the bucket owner has this permission and the bucket owner can grant this permission to others.There is usually some time lag before lifecycle configuration deletion is fully propagated to all the Amazon S3 systems.
For more information about the object expiration, see Elements to Describe Lifecycle Actions.
Related actions include:
deleteBucketReplication(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Deletes the replication configuration from the bucket.
To use this operation, you must have permissions to perform the
s3:PutReplicationConfigurationaction. The bucket owner has these permissions by default and can grant it to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources.Note: It can take a while for the deletion of a replication configuration to fully propagate.For information about replication configuration, see Replication in the Amazon S3 User Guide.
The following operations are related to
DeleteBucketReplication:deleteBucketTagging(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Deletes the tags from the bucket.
To use this operation, you must have permission to perform the
s3:PutBucketTaggingaction. By default, the bucket owner has this permission and can grant this permission to others.The following operations are related to
DeleteBucketTagging:deleteBucketWebsite(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.This action removes the website configuration for a bucket. Amazon S3 returns a
200 OKresponse upon successfully deleting a website configuration on the specified bucket. You will get a200 OKresponse if the website configuration you are trying to delete does not exist on the bucket. Amazon S3 returns a404response if the bucket specified in the request does not exist.This DELETE action requires the
S3:DeleteBucketWebsitepermission. By default, only the bucket owner can delete the website configuration attached to a bucket. However, bucket owners can grant other users permission to delete the website configuration by writing a bucket policy granting them theS3:DeleteBucketWebsitepermission.For more information about hosting websites, see Hosting Websites on Amazon S3.
The following operations are related to
DeleteBucketWebsite:deleteLegalHold(params = {}, callback) ⇒ AWS.Request
Remove Legal hold on an object. The legal hold identifiers are stored in the object metadata along with the timestamp of when they are POSTed to the object. The presence of any legal hold identifiers prevents the modification or deletion of the object data, even if the retention period has expired. The presence of a retention period header is required, otherwise a 400 error is returned.
deleteObject(params = {}, callback) ⇒ AWS.Request
Removes an object from a bucket. The behavior depends on the bucket's versioning state. For more information, see Best practices to consider before deleting an object.
To remove a specific version, you must use the
versionIdquery parameter. Using this query parameter permanently deletes the version. If the object deleted is a delete marker, Amazon S3 sets the response headerx-amz-delete-markerto true. If the object you want to delete is in a bucket where the bucket versioning configuration is MFA delete enabled, you must include thex-amz-mfarequest header in the DELETEversionIdrequest. Requests that includex-amz-mfamust use HTTPS. For more information about MFA delete and to see example requests, see Using MFA delete and Sample request in the Amazon S3 User Guide.Note:- S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the
nullvalue of the version ID is supported by directory buckets. You can only specifynullto theversionIdquery parameter in the request. - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format
https://bucket_name.s3express-az_id.region.amazonaws.com/key-name. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the Amazon S3 User Guide. - MFA delete is not supported by directory buckets.
- Permissions
-
-
General purpose bucket permissions - The following permissions are required in your policies when your
DeleteObjectsrequest includes specific headers.-
s3:DeleteObject- To delete an object from a bucket, you must always have thes3:DeleteObjectpermission.Note: You can also use PutBucketLifecycle to delete objects in Amazon S3. -
s3:DeleteObjectVersion- To delete a specific version of an object from a versioning-enabled bucket, you must have thes3:DeleteObjectVersionpermission. -
If you want to block users or accounts from removing or deleting objects from your bucket, you must deny them the
s3:DeleteObject,s3:DeleteObjectVersion, ands3:PutLifeCycleConfigurationpermissions.
-
-
Directory buckets permissions - To grant access to this API operation on a directory bucket, we recommend that you use the CreateSession API operation for session-based authorization.
-
- HTTP Host header syntax
-
Directory buckets - The HTTP Host header syntax is
Bucket_name.s3express-az_id.region.amazonaws.com.
The following action is related to
DeleteObject:deleteObjects(params = {}, callback) ⇒ AWS.Request
This operation enables you to delete multiple objects from a bucket using a single HTTP request. If you know the object keys that you want to delete, then this operation provides a suitable alternative to sending individual delete requests, reducing per-request overhead.
The request can contain a list of up to 1000 keys that you want to delete. In the XML, you provide the object key names, and optionally, version IDs if you want to delete a specific version of the object from a versioning-enabled bucket. For each key, Amazon S3 performs a delete operation and returns the result of that delete, success or failure, in the response. Note that if the object specified in the request is not found, Amazon S3 returns the result as deleted.
Note:- Directory buckets - S3 Versioning isn't enabled and supported for directory buckets.
- Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format
https://bucket_name.s3express-az_id.region.amazonaws.com/key-name. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the Amazon S3 User Guide.
The operation supports two modes for the response: verbose and quiet. By default, the operation uses verbose mode in which the response includes the result of deletion of each key in your request. In quiet mode the response includes only keys where the delete operation encountered an error. For a successful deletion in a quiet mode, the operation does not return any information about the delete in the response body.
When performing this action on an MFA Delete enabled bucket, that attempts to delete any versioned objects, you must include an MFA token. If you do not provide one, the entire request will fail, even if there are non-versioned objects you are trying to delete. If you provide an invalid token, whether there are versioned keys in the request or not, the entire Multi-Object Delete request will fail. For information about MFA Delete, see MFA Delete in the Amazon S3 User Guide.
Note: Directory buckets - MFA delete is not supported by directory buckets.- Permissions
-
-
General purpose bucket permissions - The following permissions are required in your policies when your
DeleteObjectsrequest includes specific headers.-
s3:DeleteObject- To delete an object from a bucket, you must always specify thes3:DeleteObjectpermission. -
s3:DeleteObjectVersion- To delete a specific version of an object from a versioning-enabled bucket, you must specify thes3:DeleteObjectVersionpermission.
-
-
Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the
CreateSessionAPI operation for session-based authorization. Specifically, you grant thes3express:CreateSessionpermission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make theCreateSessionAPI call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make anotherCreateSessionAPI call to generate a new session token for use. Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, seeCreateSession.
-
- Content-MD5 request header
-
-
General purpose bucket - The Content-MD5 request header is required for all Multi-Object Delete requests. Amazon S3 uses the header value to ensure that your request body has not been altered in transit.
-
Directory bucket - The Content-MD5 request header or a additional checksum request header (including
x-amz-checksum-crc32,x-amz-checksum-crc32c,x-amz-checksum-sha1, orx-amz-checksum-sha256) is required for all Multi-Object Delete requests.
-
- HTTP Host header syntax
-
Directory buckets - The HTTP Host header syntax is
Bucket_name.s3express-az_id.region.amazonaws.com.
The following operations are related to
DeleteObjects:deleteObjectTagging(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Removes the entire tag set from the specified object. For more information about managing object tags, see Object Tagging.
To use this operation, you must have permission to perform the
s3:DeleteObjectTaggingaction.To delete tags of a specific object version, add the
versionIdquery parameter in the request. You will need permission for thes3:DeleteObjectVersionTaggingaction.The following operations are related to
DeleteObjectTagging:deletePublicAccessBlock(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Removes the
PublicAccessBlockconfiguration for an Amazon S3 bucket. To use this operation, you must have thes3:PutBucketPublicAccessBlockpermission. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources.The following operations are related to
DeletePublicAccessBlock:extendObjectRetention(params = {}, callback) ⇒ AWS.Request
This implementation of the POST operation uses the extendRetention sub-resource to extend the retention period of a protected object in a protected vault.
getBucketAcl(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.This implementation of the
GETaction uses theaclsubresource to return the access control list (ACL) of a bucket. To useGETto return the ACL of the bucket, you must have theREAD_ACPaccess to the bucket. IfREAD_ACPpermission is granted to the anonymous user, you can return the ACL of the bucket without using an authorization header.When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.
When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. If the Object Lambda access point alias in a request is not valid, the error code
InvalidAccessPointAliasErroris returned. For more information aboutInvalidAccessPointAliasError, see List of Error Codes.Note: If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests to read ACLs are still supported and return thebucket-owner-full-controlACL with the owner being the account that created the bucket. For more information, see Controlling object ownership and disabling ACLs in the Amazon S3 User Guide.The following operations are related to
GetBucketAcl:getBucketCors(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Returns the Cross-Origin Resource Sharing (CORS) configuration information set for the bucket.
To use this operation, you must have permission to perform the
s3:GetBucketCORSaction. By default, the bucket owner has this permission and can grant it to others.When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.
When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. If the Object Lambda access point alias in a request is not valid, the error code
InvalidAccessPointAliasErroris returned. For more information aboutInvalidAccessPointAliasError, see List of Error Codes.For more information about CORS, see Enabling Cross-Origin Resource Sharing.
The following operations are related to
GetBucketCors:getBucketLifecycle(params = {}, callback) ⇒ AWS.Request
For an updated version of this API, see GetBucketLifecycleConfiguration. If you configured a bucket lifecycle using the
filterelement, you should see the updated version of this topic. This topic is provided for backward compatibility.Note: This operation is not supported by directory buckets.Returns the lifecycle configuration information set on the bucket. For information about lifecycle configuration, see Object Lifecycle Management.
To use this operation, you must have permission to perform the
s3:GetLifecycleConfigurationaction. The bucket owner has this permission by default. The bucket owner 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.GetBucketLifecyclehas the following special error:-
Error code:
NoSuchLifecycleConfiguration-
Description: The lifecycle configuration does not exist.
-
HTTP Status Code: 404 Not Found
-
SOAP Fault Code Prefix: Client
-
The following operations are related to
GetBucketLifecycle:getBucketLifecycleConfiguration(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Note: Bucket lifecycle configuration now supports specifying a lifecycle rule using an object key name prefix, one or more object tags, object size, or any combination of these. Accordingly, this section describes the latest API. The previous version of the API supported filtering based only on an object key name prefix, which is supported for backward compatibility. For the related API description, see GetBucketLifecycle. Accordingly, this section describes the latest API. The response describes the new filter element that you can use to specify a filter to select a subset of objects to which the rule applies. If you are using a previous version of the lifecycle configuration, it still works. For the earlier action,Returns the lifecycle configuration information set on the bucket. For information about lifecycle configuration, see Object Lifecycle Management.
To use this operation, you must have permission to perform the
s3:GetLifecycleConfigurationaction. The bucket owner has this permission, by default. The bucket owner 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.GetBucketLifecycleConfigurationhas the following special error:-
Error code:
NoSuchLifecycleConfiguration-
Description: The lifecycle configuration does not exist.
-
HTTP Status Code: 404 Not Found
-
SOAP Fault Code Prefix: Client
-
The following operations are related to
GetBucketLifecycleConfiguration:getBucketLocation(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Returns the Region the bucket resides in. You set the bucket's Region using the
LocationConstraintrequest parameter in aCreateBucketrequest. For more information, see CreateBucket.When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.
When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. If the Object Lambda access point alias in a request is not valid, the error code
InvalidAccessPointAliasErroris returned. For more information aboutInvalidAccessPointAliasError, see List of Error Codes.Note: We recommend that you use HeadBucket to return the Region that a bucket resides in. For backward compatibility, Amazon S3 continues to support GetBucketLocation.The following operations are related to
GetBucketLocation:getBucketProtectionConfiguration(params = {}, callback) ⇒ AWS.Request
Returns the protection configuration of a bucket.
getBucketReplication(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Returns the replication configuration of a bucket.
Note: It can take a while to propagate the put or delete a replication configuration to all Amazon S3 systems. Therefore, a get request soon after put or delete can return a wrong result.For information about replication configuration, see Replication in the Amazon S3 User Guide.
This action requires permissions for the
s3:GetReplicationConfigurationaction. For more information about permissions, see Using Bucket Policies and User Policies.If you include the
Filterelement in a replication configuration, you must also include theDeleteMarkerReplicationandPriorityelements. The response also returns those elements.For information about
GetBucketReplicationerrors, see List of replication-related error codesThe following operations are related to
GetBucketReplication:getBucketTagging(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Returns the tag set associated with the bucket.
To use this operation, you must have permission to perform the
s3:GetBucketTaggingaction. By default, the bucket owner has this permission and can grant this permission to others.GetBucketTagginghas the following special error:-
Error code:
NoSuchTagSet-
Description: There is no tag set associated with the bucket.
-
The following operations are related to
GetBucketTagging:getBucketVersioning(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Returns the versioning state of a bucket.
To retrieve the versioning state of a bucket, you must be the bucket owner.
This implementation also returns the MFA Delete status of the versioning state. If the MFA Delete status is
enabled, the bucket owner must use an authentication device to change the versioning state of the bucket.The following operations are related to
GetBucketVersioning:getBucketWebsite(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Returns the website configuration for a bucket. To host website on Amazon S3, you can configure a bucket as website by adding a website configuration. For more information about hosting websites, see Hosting Websites on Amazon S3.
This GET action requires the
S3:GetBucketWebsitepermission. By default, only the bucket owner can read the bucket website configuration. However, bucket owners can allow other users to read the website configuration by writing a bucket policy granting them theS3:GetBucketWebsitepermission.The following operations are related to
GetBucketWebsite:getObject(params = {}, callback) ⇒ AWS.Request
Retrieves an object from Amazon S3.
In the
GetObjectrequest, specify the full key name for the object.General purpose buckets - Both the virtual-hosted-style requests and the path-style requests are supported. For a virtual hosted-style request example, if you have the object
photos/2006/February/sample.jpg, specify the object key name as/photos/2006/February/sample.jpg. For a path-style request example, if you have the objectphotos/2006/February/sample.jpgin the bucket namedexamplebucket, specify the object key name as/examplebucket/photos/2006/February/sample.jpg. For more information about request types, see HTTP Host Header Bucket Specification in the Amazon S3 User Guide.Directory buckets - Only virtual-hosted-style requests are supported. For a virtual hosted-style request example, if you have the object
photos/2006/February/sample.jpgin the bucket namedexamplebucket--use1-az5--x-s3, specify the object key name as/photos/2006/February/sample.jpg. Also, when you make requests to this API operation, your requests are sent to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the formathttps://bucket_name.s3express-az_id.region.amazonaws.com/key-name. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the Amazon S3 User Guide.- Permissions
-
-
General purpose bucket permissions - You must have the required permissions in a policy. To use
GetObject, you must have theREADaccess to the object (or version). If you grantREADaccess to the anonymous user, theGetObjectoperation returns the object without using an authorization header. For more information, see Specifying permissions in a policy in the Amazon S3 User Guide.If you include a
versionIdin your request header, you must have thes3:GetObjectVersionpermission to access a specific version of an object. Thes3:GetObjectpermission is not required in this scenario.If you request the current version of an object without a specific
versionIdin the request header, only thes3:GetObjectpermission is required. Thes3:GetObjectVersionpermission is not required in this scenario.If the object that you request doesn’t exist, the error that Amazon S3 returns depends on whether you also have the
s3:ListBucketpermission.-
If you have the
s3:ListBucketpermission on the bucket, Amazon S3 returns an HTTP status code404 Not Founderror. -
If you don’t have the
s3:ListBucketpermission, Amazon S3 returns an HTTP status code403 Access Deniederror.
-
-
Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the
CreateSessionAPI operation for session-based authorization. Specifically, you grant thes3express:CreateSessionpermission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make theCreateSessionAPI call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make anotherCreateSessionAPI call to generate a new session token for use. Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, seeCreateSession.If the object is encrypted using SSE-KMS, you must also have the
kms:GenerateDataKeyandkms:Decryptpermissions in IAM identity-based policies and KMS key policies for the KMS key.
-
- Storage classes
-
If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval storage class, the S3 Glacier Deep Archive storage class, the S3 Intelligent-Tiering Archive Access tier, or the S3 Intelligent-Tiering Deep Archive Access tier, before you can retrieve the object you must first restore a copy using RestoreObject. Otherwise, this operation returns an
InvalidObjectStateerror. For information about restoring archived objects, see Restoring Archived Objects in the Amazon S3 User Guide.Directory buckets - For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects. Unsupported storage class values won't write a destination object and will respond with the HTTP status code
400 Bad Request. - Encryption
-
Encryption request headers, like
x-amz-server-side-encryption, should not be sent for theGetObjectrequests, if your object uses server-side encryption with Amazon S3 managed encryption keys (SSE-S3), server-side encryption with Key Management Service (KMS) keys (SSE-KMS), or dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS). If you include the header in yourGetObjectrequests for the object that uses these types of keys, you’ll get an HTTP400 Bad Requesterror.Directory buckets - For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS. SSE-C isn't supported. For more information, see Protecting data with server-side encryption in the Amazon S3 User Guide.
- Overriding response header values through the request
-
There are times when you want to override certain response header values of a
GetObjectresponse. For example, you might override theContent-Dispositionresponse header value through yourGetObjectrequest.You can override values for a set of response headers. These modified response header values are included only in a successful response, that is, when the HTTP status code
200 OKis returned. The headers you can override using the following query parameters in the request are a subset of the headers that Amazon S3 accepts when you create an object.The response headers that you can override for the
GetObjectresponse areCache-Control,Content-Disposition,Content-Encoding,Content-Language,Content-Type, andExpires.To override values for a set of response headers in the
GetObjectresponse, you can use the following query parameters in the request.-
response-cache-control -
response-content-disposition -
response-content-encoding -
response-content-language -
response-content-type -
response-expires
Note: When you use these parameters, you must sign the request by using either an Authorization header or a presigned URL. These parameters cannot be used with an unsigned (anonymous) request. -
- HTTP Host header syntax
-
Directory buckets - The HTTP Host header syntax is
Bucket_name.s3express-az_id.region.amazonaws.com.
The following operations are related to
GetObject:getObjectAcl(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Returns the access control list (ACL) of an object. To use this operation, you must have
s3:GetObjectAclpermissions orREAD_ACPaccess to the object. For more information, see Mapping of ACL permissions and access policy permissions in the Amazon S3 User GuideThis functionality is not supported for Amazon S3 on Outposts.
By default, GET returns ACL information about the current version of an object. To return ACL information about a different version, use the versionId subresource.
Note: If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests to read ACLs are still supported and return thebucket-owner-full-controlACL with the owner being the account that created the bucket. For more information, see Controlling object ownership and disabling ACLs in the Amazon S3 User Guide.The following operations are related to
GetObjectAcl:getObjectLegalHold(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Gets an object's current legal hold status. For more information, see Locking Objects.
This functionality is not supported for Amazon S3 on Outposts.
The following action is related to
GetObjectLegalHold:getObjectLockConfiguration(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Gets the Object Lock configuration for a 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 following action is related to
GetObjectLockConfiguration:getObjectRetention(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Retrieves an object's retention settings. For more information, see Locking Objects.
This functionality is not supported for Amazon S3 on Outposts.
The following action is related to
GetObjectRetention:getObjectTagging(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Returns the tag-set of an object. You send the GET request against the tagging subresource associated with the object.
To use this operation, you must have permission to perform the
s3:GetObjectTaggingaction. By default, the GET action returns information about current version of an object. For a versioned bucket, you can have multiple versions of an object in your bucket. To retrieve tags of any other version, use the versionId query parameter. You also need permission for thes3:GetObjectVersionTaggingaction.By default, the bucket owner has this permission and can grant this permission to others.
For information about the Amazon S3 object tagging feature, see Object Tagging.
The following actions are related to
GetObjectTagging:getPublicAccessBlock(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Retrieves the
PublicAccessBlockconfiguration for an Amazon S3 bucket. To use this operation, you must have thes3:GetBucketPublicAccessBlockpermission. For more information about Amazon S3 permissions, see Specifying Permissions in a Policy.When Amazon S3 evaluates the
PublicAccessBlockconfiguration for a bucket or an object, it checks thePublicAccessBlockconfiguration for both the bucket (or the bucket that contains the object) and the bucket owner's account. If thePublicAccessBlocksettings 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".
The following operations are related to
GetPublicAccessBlock:getSignedUrl(operation, params, callback) ⇒ String?
Note:You must ensure that you have static or previously resolved credentials if you call this method synchronously (with no callback), otherwise it may not properly sign the request. If you cannot guarantee this (you are using an asynchronous credential provider, i.e., EC2 IAM roles), you should always call this method with an asynchronous callback.
Note:Not all operation parameters are supported when using pre-signed URLs. Certain parameters, such as
SSECustomerKey,ACL,Expires,ContentLength, orTaggingmust be provided as headers when sending a request. If you are using pre-signed URLs to upload from a browser and need to use these fields, see createPresignedPost().Note:The default signer allows altering the request by adding corresponding headers to set some parameters (e.g. Range) and these added parameters won't be signed. You must use signatureVersion v4 to to include these parameters in the signed portion of the URL and enforce exact matching between headers and signed params in the URL.
Note:This operation cannot be used with a promise. See note above regarding asynchronous credentials and use with a callback.
Get a pre-signed URL for a given operation name.
getSignedUrlPromise() ⇒ Promise
Note:Not all operation parameters are supported when using pre-signed URLs. Certain parameters, such as
SSECustomerKey,ACL,Expires,ContentLength, orTaggingmust be provided as headers when sending a request. If you are using pre-signed URLs to upload from a browser and need to use these fields, see createPresignedPost().Returns a 'thenable' promise that will be resolved with a pre-signed URL for a given operation name.
Two callbacks can be provided to the
thenmethod on the returned promise. The first callback will be called if the promise is fulfilled, and the second callback will be called if the promise is rejected.headBucket(params = {}, callback) ⇒ AWS.Request
You can use this operation to determine if a bucket exists and if you have permission to access it. The action returns a
200 OKif the bucket exists and you have permission to access it.Note: If the bucket does not exist or you do not have permission to access it, theHEADrequest returns a generic400 Bad Request,403 Forbiddenor404 Not Foundcode. A message body is not included, so you cannot determine the exception beyond these HTTP response codes.- Authentication and authorization
-
General purpose buckets - Request to public buckets that grant the s3:ListBucket permission publicly do not need to be signed. All other
HeadBucketrequests must be authenticated and signed by using IAM credentials (access key ID and secret access key for the IAM identities). All headers with thex-amz-prefix, includingx-amz-copy-source, must be signed. For more information, see REST Authentication.Directory buckets - You must use IAM credentials to authenticate and authorize your access to the
HeadBucketAPI operation, instead of using the temporary security credentials through theCreateSessionAPI operation.Amazon Web Services CLI or SDKs handles authentication and authorization on your behalf.
- Permissions
-
-
General purpose bucket permissions - To use this operation, you must have permissions to perform the
s3:ListBucketaction. The bucket owner has this permission by default and can grant this permission to others. For more information about permissions, see Managing access permissions to your Amazon S3 resources in the Amazon S3 User Guide. -
Directory bucket permissions - You must have the
s3express:CreateSessionpermission in theActionelement of a policy. By default, the session is in theReadWritemode. If you want to restrict the access, you can explicitly set thes3express:SessionModecondition key toReadOnlyon the bucket.For more information about example bucket policies, see Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for S3 Express One Zone in the Amazon S3 User Guide.
-
- HTTP Host header syntax
-
Directory buckets - The HTTP Host header syntax is
Bucket_name.s3express-az_id.region.amazonaws.com.Note: You must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the formathttps://bucket_name.s3express-az_id.region.amazonaws.com. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the Amazon S3 User Guide.
headObject(params = {}, callback) ⇒ AWS.Request
The
HEADoperation retrieves metadata from an object without returning the object itself. This operation is useful if you're interested only in an object's metadata.Note: AHEADrequest has the same options as aGEToperation on an object. The response is identical to theGETresponse except that there is no response body. Because of this, if theHEADrequest generates an error, it returns a generic code, such as400 Bad Request,403 Forbidden,404 Not Found,405 Method Not Allowed,412 Precondition Failed, or304 Not Modified. It's not possible to retrieve the exact exception of these error codes.Request headers are limited to 8 KB in size. For more information, see Common Request Headers.
- Permissions
-
-
General purpose bucket permissions - To use
HEAD, you must have thes3:GetObjectpermission. You need the relevant read object (or version) permission for this operation. For more information, see Actions, resources, and condition keys for Amazon S3 in the Amazon S3 User Guide. For more information about the permissions to S3 API operations by S3 resource types, see Required permissions for Amazon S3 API operations in the Amazon S3 User Guide.If the object you request doesn't exist, the error that Amazon S3 returns depends on whether you also have the
s3:ListBucketpermission.-
If you have the
s3:ListBucketpermission on the bucket, Amazon S3 returns an HTTP status code404 Not Founderror. -
If you don’t have the
s3:ListBucketpermission, Amazon S3 returns an HTTP status code403 Forbiddenerror.
-
-
Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the
CreateSessionAPI operation for session-based authorization. Specifically, you grant thes3express:CreateSessionpermission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make theCreateSessionAPI call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make anotherCreateSessionAPI call to generate a new session token for use. Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, seeCreateSession.If you enable
x-amz-checksum-modein the request and the object is encrypted with Amazon Web Services Key Management Service (Amazon Web Services KMS), you must also have thekms:GenerateDataKeyandkms:Decryptpermissions in IAM identity-based policies and KMS key policies for the KMS key to retrieve the checksum of the object.
-
- Encryption
- Note: Encryption request headers, like
x-amz-server-side-encryption, should not be sent forHEADrequests if your object uses server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side encryption with Amazon S3 managed encryption keys (SSE-S3). Thex-amz-server-side-encryptionheader is used when youPUTan object to S3 and want to specify the encryption method. If you include this header in aHEADrequest for an object that uses these types of keys, you’ll get an HTTP400 Bad Requesterror. It's because the encryption method can't be changed when you retrieve the object.If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve the metadata from the object, you must use the following headers to provide the encryption key for the server to be able to retrieve the object's metadata. The headers are:
-
x-amz-server-side-encryption-customer-algorithm -
x-amz-server-side-encryption-customer-key -
x-amz-server-side-encryption-customer-key-MD5
For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided Encryption Keys) in the Amazon S3 User Guide.
Note: Directory bucket - For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS. SSE-C isn't supported. For more information, see Protecting data with server-side encryption in the Amazon S3 User Guide. -
- Versioning
-
-
If the current version of the object is a delete marker, Amazon S3 behaves as if the object was deleted and includes
x-amz-delete-marker: truein the response. -
If the specified version is a delete marker, the response returns a
405 Method Not Allowederror and theLast-Modified: timestampresponse header.
Note:- Directory buckets - Delete marker is not supported by directory buckets.
- Directory buckets - S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the
nullvalue of the version ID is supported by directory buckets. You can only specifynullto theversionIdquery parameter in the request.
-
- HTTP Host header syntax
-
Directory buckets - The HTTP Host header syntax is
Bucket_name.s3express-az_id.region.amazonaws.com.Note: For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the formathttps://bucket_name.s3express-az_id.region.amazonaws.com/key-name. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the Amazon S3 User Guide.
The following actions are related to
HeadObject:listBuckets(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Returns a list of all buckets owned by the authenticated sender of the request. To use this operation, you must have the
s3:ListAllMyBucketspermission.For information about Amazon S3 buckets, see Creating, configuring, and working with Amazon S3 buckets.
Note: This operation cannot be used in a browser. S3 does not support CORS on this operation.
listBucketsExtended(params = {}, callback) ⇒ AWS.Request
Returns a list of all buckets owned by the authenticated sender of the request, along with the LocationConstraint describing the region that the bucket resides in and the bucket's storage tier.
listMultipartUploads(params = {}, callback) ⇒ AWS.Request
This operation lists in-progress multipart uploads in a bucket. An in-progress multipart upload is a multipart upload that has been initiated by the
CreateMultipartUploadrequest, but has not yet been completed or aborted.Note: Directory buckets - If multipart uploads in a directory bucket are in progress, you can't delete the bucket until all the in-progress multipart uploads are aborted or completed. To delete these in-progress multipart uploads, use theListMultipartUploadsoperation to list the in-progress multipart uploads in the bucket and use theAbortMultupartUploadoperation to abort all the in-progress multipart uploads.The
ListMultipartUploadsoperation returns a maximum of 1,000 multipart uploads in the response. The limit of 1,000 multipart uploads is also the default value. You can further limit the number of uploads in a response by specifying themax-uploadsrequest parameter. If there are more than 1,000 multipart uploads that satisfy yourListMultipartUploadsrequest, the response returns anIsTruncatedelement with the value oftrue, aNextKeyMarkerelement, and aNextUploadIdMarkerelement. To list the remaining multipart uploads, you need to make subsequentListMultipartUploadsrequests. In these requests, include two query parameters:key-markerandupload-id-marker. Set the value ofkey-markerto theNextKeyMarkervalue from the previous response. Similarly, set the value ofupload-id-markerto theNextUploadIdMarkervalue from the previous response.Note: Directory buckets - Theupload-id-markerelement and theNextUploadIdMarkerelement aren't supported by directory buckets. To list the additional multipart uploads, you only need to set the value ofkey-markerto theNextKeyMarkervalue from the previous response.For more information about multipart uploads, see Uploading Objects Using Multipart Upload in the Amazon S3 User Guide.
Note: Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the formathttps://bucket_name.s3express-az_id.region.amazonaws.com/key-name. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the Amazon S3 User Guide.- Permissions
-
-
General purpose bucket permissions - For information about permissions required to use the multipart upload API, see Multipart Upload and Permissions in the Amazon S3 User Guide.
-
Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the
CreateSessionAPI operation for session-based authorization. Specifically, you grant thes3express:CreateSessionpermission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make theCreateSessionAPI call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make anotherCreateSessionAPI call to generate a new session token for use. Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, seeCreateSession.
-
- Sorting of multipart uploads in response
-
-
General purpose bucket - In the
ListMultipartUploadsresponse, the multipart uploads are sorted based on two criteria:-
Key-based sorting - Multipart uploads are initially sorted in ascending order based on their object keys.
-
Time-based sorting - For uploads that share the same object key, they are further sorted in ascending order based on the upload initiation time. Among uploads with the same key, the one that was initiated first will appear before the ones that were initiated later.
-
-
Directory bucket - In the
ListMultipartUploadsresponse, the multipart uploads aren't sorted lexicographically based on the object keys.
-
- HTTP Host header syntax
-
Directory buckets - The HTTP Host header syntax is
Bucket_name.s3express-az_id.region.amazonaws.com.
The following operations are related to
ListMultipartUploads:listObjects(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Returns some or all (up to 1,000) of the objects in a bucket. You can use the request parameters as selection criteria to return a subset of the objects in a bucket. A 200 OK response can contain valid or invalid XML. Be sure to design your application to parse the contents of the response and handle it appropriately.
This action has been revised. We recommend that you use the newer version, ListObjectsV2, when developing applications. For backward compatibility, Amazon S3 continues to support
ListObjects.The following operations are related to
ListObjects:listObjectsV2(params = {}, callback) ⇒ AWS.Request
Returns some or all (up to 1,000) of the objects in a bucket with each request. You can use the request parameters as selection criteria to return a subset of the objects in a bucket. A
200 OKresponse can contain valid or invalid XML. Make sure to design your application to parse the contents of the response and handle it appropriately. For more information about listing objects, see Listing object keys programmatically in the Amazon S3 User Guide. To get a list of your buckets, see ListBuckets.Note:- General purpose bucket - For general purpose buckets,
ListObjectsV2doesn't return prefixes that are related only to in-progress multipart uploads. - Directory buckets - For directory buckets,
ListObjectsV2response includes the prefixes that are related only to in-progress multipart uploads. - Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format
https://bucket_name.s3express-az_id.region.amazonaws.com/key-name. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the Amazon S3 User Guide.
- Permissions
-
-
General purpose bucket permissions - To use this operation, you must have READ access to the bucket. You must have permission to perform the
s3:ListBucketaction. 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. -
Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the
CreateSessionAPI operation for session-based authorization. Specifically, you grant thes3express:CreateSessionpermission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make theCreateSessionAPI call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make anotherCreateSessionAPI call to generate a new session token for use. Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, seeCreateSession.
-
- Sorting order of returned objects
-
-
General purpose bucket - For general purpose buckets,
ListObjectsV2returns objects in lexicographical order based on their key names. -
Directory bucket - For directory buckets,
ListObjectsV2does not return objects in lexicographical order.
-
- HTTP Host header syntax
-
Directory buckets - The HTTP Host header syntax is
Bucket_name.s3express-az_id.region.amazonaws.com.
This section describes the latest revision of this action. We recommend that you use this revised API operation for application development. For backward compatibility, Amazon S3 continues to support the prior version of this API operation, ListObjects.
The following operations are related to
ListObjectsV2:listObjectVersions(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Returns metadata about all versions of the objects in a bucket. You can also use request parameters as selection criteria to return metadata about a subset of all the object versions.
To use this operation, you must have permission to perform the
s3:ListBucketVersionsaction. Be aware of the name difference.Note: A200 OKresponse can contain valid or invalid XML. Make sure to design your application to parse the contents of the response and handle it appropriately.To use this operation, you must have READ access to the bucket.
The following operations are related to
ListObjectVersions:listParts(params = {}, callback) ⇒ AWS.Request
Lists the parts that have been uploaded for a specific multipart upload.
To use this operation, you must provide the
upload IDin the request. You obtain this uploadID by sending the initiate multipart upload request through CreateMultipartUpload.The
ListPartsrequest returns a maximum of 1,000 uploaded parts. The limit of 1,000 parts is also the default value. You can restrict the number of parts in a response by specifying themax-partsrequest parameter. If your multipart upload consists of more than 1,000 parts, the response returns anIsTruncatedfield with the value oftrue, and aNextPartNumberMarkerelement. To list remaining uploaded parts, in subsequentListPartsrequests, include thepart-number-markerquery string parameter and set its value to theNextPartNumberMarkerfield value from the previous response.For more information on multipart uploads, see Uploading Objects Using Multipart Upload in the Amazon S3 User Guide.
Note: Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the formathttps://bucket_name.s3express-az_id.region.amazonaws.com/key-name. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the Amazon S3 User Guide.- Permissions
-
-
General purpose bucket permissions - For information about permissions required to use the multipart upload API, see Multipart Upload and Permissions in the Amazon S3 User Guide.
If the upload was created using server-side encryption with Key Management Service (KMS) keys (SSE-KMS) or dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), you must have permission to the
kms:Decryptaction for theListPartsrequest to succeed. -
Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the
CreateSessionAPI operation for session-based authorization. Specifically, you grant thes3express:CreateSessionpermission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make theCreateSessionAPI call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make anotherCreateSessionAPI call to generate a new session token for use. Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, seeCreateSession.
-
- HTTP Host header syntax
-
Directory buckets - The HTTP Host header syntax is
Bucket_name.s3express-az_id.region.amazonaws.com.
The following operations are related to
ListParts:putBucketAcl(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Sets the permissions on an existing bucket using access control lists (ACL). For more information, see Using ACLs. To set the ACL of a bucket, you must have the
WRITE_ACPpermission.You can use one of the following two ways to set a bucket's permissions:
-
Specify the ACL in the request body
-
Specify permissions using request headers
Note: You cannot specify access permission using both the body and the request headers.Depending on your application needs, you may choose to set the ACL on a bucket 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, then you can continue to use that approach.
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
AccessControlListNotSupportederror code. Requests to read ACLs are still supported. For more information, see Controlling object ownership in the Amazon S3 User Guide.- Permissions
-
You can set access permissions by using one of the following methods:
-
Specify a canned ACL with the
x-amz-aclrequest 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 ofx-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, andx-amz-grant-full-controlheaders. 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 thex-amz-aclheader 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 accountNote: 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 example, the following
x-amz-grant-writeheader grants create, overwrite, and delete objects permission to LogDelivery group predefined by Amazon S3 and two Amazon Web Services accounts identified by their email addresses.x-amz-grant-write: uri="http://acs.amazonaws.com/groups/s3/LogDelivery", id="111122223333", id="555566667777" -
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>&</Grantee>The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl request, appears as the CanonicalUser.
Note: 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)
-
The following operations are related to
PutBucketAcl:putBucketCors(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Sets the
corsconfiguration for your bucket. If the configuration exists, Amazon S3 replaces it.To use this operation, you must be allowed to perform the
s3:PutBucketCORSaction. By default, the bucket owner has this permission and can grant it to others.You set this configuration on a bucket so that the bucket can service cross-origin requests. For example, you might want to enable a request whose origin is
http://www.example.comto access your Amazon S3 bucket atmy.example.bucket.comby using the browser'sXMLHttpRequestcapability.To enable cross-origin resource sharing (CORS) on a bucket, you add the
corssubresource to the bucket. Thecorssubresource is an XML document in which you configure rules that identify origins and the HTTP methods that can be executed on your bucket. The document is limited to 64 KB in size.When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request) against a bucket, it evaluates the
corsconfiguration on the bucket and uses the firstCORSRulerule that matches the incoming browser request to enable a cross-origin request. For a rule to match, the following conditions must be met:-
The request's
Originheader must matchAllowedOriginelements. -
The request method (for example, GET, PUT, HEAD, and so on) or the
Access-Control-Request-Methodheader in case of a pre-flightOPTIONSrequest must be one of theAllowedMethodelements. -
Every header specified in the
Access-Control-Request-Headersrequest header of a pre-flight request must match anAllowedHeaderelement.
For more information about CORS, go to Enabling Cross-Origin Resource Sharing in the Amazon S3 User Guide.
The following operations are related to
PutBucketCors:putBucketLifecycle(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.For an updated version of this API, see PutBucketLifecycleConfiguration. This version has been deprecated. Existing lifecycle configurations will work. For new lifecycle configurations, use the updated API.
Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle configuration. For information about lifecycle configuration, see Object Lifecycle Management in the Amazon S3 User Guide.
By default, all Amazon S3 resources, including buckets, objects, and related subresources (for example, lifecycle configuration and website configuration) are private. Only the resource owner, the Amazon Web Services account that created the resource, can access it. The resource owner can optionally grant access permissions to others by writing an access policy. For this operation, users must get the
s3:PutLifecycleConfigurationpermission.You can also explicitly deny permissions. Explicit denial also supersedes any other permissions. If you want to prevent users or accounts from removing or deleting objects from your bucket, you must deny them permissions for the following actions:
-
s3:DeleteObject -
s3:DeleteObjectVersion -
s3:PutLifecycleConfiguration
For more information about permissions, see Managing Access Permissions to your Amazon S3 Resources in the Amazon S3 User Guide.
For more examples of transitioning objects to storage classes such as STANDARD_IA or ONEZONE_IA, see Examples of Lifecycle Configuration.
The following operations are related to
PutBucketLifecycle:-
GetBucketLifecycle(Deprecated)
-
By default, a resource owner—in this case, a bucket owner, which is the Amazon Web Services account that created the bucket—can perform any of the operations. A resource owner can also grant others permission to perform the operation. For more information, see the following topics in the Amazon S3 User Guide:
putBucketLifecycleConfiguration(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle configuration. Keep in mind that this will overwrite an existing lifecycle configuration, so if you want to retain any configuration details, they must be included in the new lifecycle configuration. For information about lifecycle configuration, see Managing your storage lifecycle.
- Rules
-
You specify the lifecycle configuration in your request body. The lifecycle configuration is specified as XML consisting of one or more rules. An Amazon S3 Lifecycle configuration can have up to 1,000 rules. This limit is not adjustable.
Bucket lifecycle configuration supports specifying a lifecycle rule using an object key name prefix, one or more object tags, object size, or any combination of these. Accordingly, this section describes the latest API. The previous version of the API supported filtering based only on an object key name prefix, which is supported for backward compatibility. For the related API description, see PutBucketLifecycle.
A lifecycle rule consists of the following:
-
A filter identifying a subset of objects to which the rule applies. The filter can be based on a key name prefix, object tags, object size, or any combination of these.
-
A status indicating whether the rule is in effect.
-
One or more lifecycle transition and expiration actions that you want Amazon S3 to perform on the objects identified by the filter. If the state of your bucket is versioning-enabled or versioning-suspended, you can have many versions of the same object (one current version and zero or more noncurrent versions). Amazon S3 provides predefined actions that you can specify for current and noncurrent object versions.
For more information, see Object Lifecycle Management and Lifecycle Configuration Elements.
-
- Permissions
-
By default, all Amazon S3 resources are private, including buckets, objects, and related subresources (for example, lifecycle configuration and website configuration). Only the resource owner (that is, the Amazon Web Services account that created it) can access the resource. The resource owner can optionally grant access permissions to others by writing an access policy. For this operation, a user must get the
s3:PutLifecycleConfigurationpermission.You can also explicitly deny permissions. An explicit deny also supersedes any other permissions. If you want to block users or accounts from removing or deleting objects from your bucket, you must deny them permissions for the following actions:
-
s3:DeleteObject -
s3:DeleteObjectVersion -
s3:PutLifecycleConfiguration
For more information about permissions, see Managing Access Permissions to Your Amazon S3 Resources.
-
The following operations are related to
PutBucketLifecycleConfiguration:putBucketProtectionConfiguration(params = {}, callback) ⇒ AWS.Request
Sets the protection configuration of an existing bucket.
putBucketReplication(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Creates a replication configuration or replaces an existing one. For more information, see Replication in the Amazon S3 User Guide.
Specify the replication configuration in the request body. In the replication configuration, you provide the name of the destination bucket or buckets where you want Amazon S3 to replicate objects, the IAM role that Amazon S3 can assume to replicate objects on your behalf, and other relevant information. You can invoke this request for a specific Amazon Web Services Region by using the
aws:RequestedRegioncondition key.A replication configuration must include at least one rule, and can contain a maximum of 1,000. Each rule identifies a subset of objects to replicate by filtering the objects in the source bucket. To choose additional subsets of objects to replicate, add a rule for each subset.
To specify a subset of the objects in the source bucket to apply a replication rule to, add the Filter element as a child of the Rule element. You can filter objects based on an object key prefix, one or more object tags, or both. When you add the Filter element in the configuration, you must also add the following elements:
DeleteMarkerReplication,Status, andPriority.Note: 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.For information about enabling versioning on a bucket, see Using Versioning.
- Handling Replication of Encrypted Objects
-
By default, Amazon S3 doesn't replicate objects that are stored at rest using server-side encryption with KMS keys. To replicate Amazon Web Services KMS-encrypted objects, add the following:
SourceSelectionCriteria,SseKmsEncryptedObjects,Status,EncryptionConfiguration, andReplicaKmsKeyID. For information about replication configuration, see Replicating Objects Created with SSE Using KMS keys.For information on
PutBucketReplicationerrors, see List of replication-related error codes - Permissions
-
To create a
PutBucketReplicationrequest, you must haves3:PutReplicationConfigurationpermissions for the bucket.By default, a resource owner, in this case the Amazon Web Services account that created the bucket, can perform this operation. The resource owner can also grant others permissions to perform the operation. For more information about permissions, see Specifying Permissions in a Policy and Managing Access Permissions to Your Amazon S3 Resources.
Note: To perform this operation, the user or role performing the action must have the iam:PassRole permission.
The following operations are related to
PutBucketReplication:putBucketTagging(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Sets the tags for a bucket.
Use tags to organize your Amazon Web Services bill to reflect your own cost structure. To do this, sign up to get your Amazon Web Services account bill with tag key values included. Then, to see the cost of combined resources, organize your billing information according to resources with the same tag key values. For example, you can tag several resources with a specific application name, and then organize your billing information to see the total cost of that application across several services. For more information, see Cost Allocation and Tagging and Using Cost Allocation in Amazon S3 Bucket Tags.
Note: When this operation sets the tags for a bucket, it will overwrite any current tags the bucket already has. You cannot use this operation to add tags to an existing list of tags.To use this operation, you must have permissions to perform the
s3:PutBucketTaggingaction. 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.PutBucketTagginghas the following special errors. For more Amazon S3 errors see, Error Responses.-
InvalidTag- The tag provided was not a valid tag. This error can occur if the tag did not pass input validation. For more information, see Using Cost Allocation in Amazon S3 Bucket Tags. -
MalformedXML- The XML provided does not match the schema. -
OperationAborted- A conflicting conditional action is currently in progress against this resource. Please try again. -
InternalError- The service was unable to apply the provided tag to the bucket.
The following operations are related to
PutBucketTagging:putBucketVersioning(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Note: When you enable versioning on a bucket for the first time, it might take a short amount of time for the change to be fully propagated. We recommend that you wait for 15 minutes after enabling versioning before issuing write operations (PUTorDELETE) on objects in the bucket.Sets the versioning state of an existing bucket.
You can set the versioning state with one of the following values:
Enabled—Enables versioning for the objects in the bucket. All objects added to the bucket receive a unique version ID.
Suspended—Disables versioning for the objects in the bucket. All objects added to the bucket receive the version ID null.
If the versioning state has never been set on a bucket, it has no versioning state; a GetBucketVersioning request does not return a versioning state value.
In order to enable MFA Delete, you must be the bucket owner. If you are the bucket owner and want to enable MFA Delete in the bucket versioning configuration, you must include the
x-amz-mfa requestheader and theStatusand theMfaDeleterequest elements in a request to set the versioning state of the bucket.If you have an object expiration lifecycle configuration in your non-versioned bucket and you want to maintain the same permanent delete behavior when you enable versioning, you must add a noncurrent expiration policy. The noncurrent expiration lifecycle configuration will manage the deletes of the noncurrent object versions in the version-enabled bucket. (A version-enabled bucket maintains one current and zero or more noncurrent object versions.) For more information, see Lifecycle and Versioning.
The following operations are related to
PutBucketVersioning:putBucketWebsite(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Sets the configuration of the website that is specified in the
websitesubresource. To configure a bucket as a website, you can add this subresource on the bucket with website configuration information such as the file name of the index document and any redirect rules. For more information, see Hosting Websites on Amazon S3.This PUT action requires the
S3:PutBucketWebsitepermission. By default, only the bucket owner can configure the website attached to a bucket; however, bucket owners can allow other users to set the website configuration by writing a bucket policy that grants them theS3:PutBucketWebsitepermission.To redirect all website requests sent to the bucket's website endpoint, you add a website configuration with the following elements. Because all requests are sent to another website, you don't need to provide index document name for the bucket.
-
WebsiteConfiguration -
RedirectAllRequestsTo -
HostName -
Protocol
If you want granular control over redirects, you can use the following elements to add routing rules that describe conditions for redirecting requests and information about the redirect destination. In this case, the website configuration must provide an index document for the bucket, because some requests might not be redirected.
-
WebsiteConfiguration -
IndexDocument -
Suffix -
ErrorDocument -
Key -
RoutingRules -
RoutingRule -
Condition -
HttpErrorCodeReturnedEquals -
KeyPrefixEquals -
Redirect -
Protocol -
HostName -
ReplaceKeyPrefixWith -
ReplaceKeyWith -
HttpRedirectCode
Amazon S3 has a limitation of 50 routing rules per website configuration. If you require more than 50 routing rules, you can use object redirect. For more information, see Configuring an Object Redirect in the Amazon S3 User Guide.
The maximum request length is limited to 128 KB.
putObject(params = {}, callback) ⇒ AWS.Request
Adds an object to a bucket.
Note:- Amazon S3 never adds partial objects; if you receive a success response, Amazon S3 added the entire object to the bucket. You cannot use
PutObjectto only update a single piece of metadata for an existing object. You must put the entire object with updated metadata if you want to update some values. - If your bucket uses the bucket owner enforced setting for Object Ownership, ACLs are disabled and no longer affect permissions. All objects written to the bucket by any account will be owned by the bucket owner.
- Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format
https://bucket_name.s3express-az_id.region.amazonaws.com/key-name. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the Amazon S3 User Guide.
Amazon S3 is a distributed system. If it receives multiple write requests for the same object simultaneously, it overwrites all but the last object written. However, Amazon S3 provides features that can modify this behavior:
-
S3 Object Lock - To prevent objects from being deleted or overwritten, you can use Amazon S3 Object Lock in the Amazon S3 User Guide.
Note: This functionality is not supported for directory buckets. -
S3 Versioning - When you enable versioning for a bucket, if Amazon S3 receives multiple write requests for the same object simultaneously, it stores all versions of the objects. For each write request that is made to the same object, Amazon S3 automatically generates a unique version ID of that object being stored in Amazon S3. You can retrieve, replace, or delete any version of the object. For more information about versioning, see Adding Objects to Versioning-Enabled Buckets in the Amazon S3 User Guide. For information about returning the versioning state of a bucket, see GetBucketVersioning.
Note: This functionality is not supported for directory buckets.
- Permissions
-
-
General purpose bucket permissions - The following permissions are required in your policies when your
PutObjectrequest includes specific headers.-
s3:PutObject- To successfully complete thePutObjectrequest, you must always have thes3:PutObjectpermission on a bucket to add an object to it. -
s3:PutObjectAcl- To successfully change the objects ACL of yourPutObjectrequest, you must have thes3:PutObjectAcl. -
s3:PutObjectTagging- To successfully set the tag-set with yourPutObjectrequest, you must have thes3:PutObjectTagging.
-
-
Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the
CreateSessionAPI operation for session-based authorization. Specifically, you grant thes3express:CreateSessionpermission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make theCreateSessionAPI call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make anotherCreateSessionAPI call to generate a new session token for use. Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, seeCreateSession.If the object is encrypted with SSE-KMS, you must also have the
kms:GenerateDataKeyandkms:Decryptpermissions in IAM identity-based policies and KMS key policies for the KMS key.
-
- Data integrity with Content-MD5
-
-
General purpose bucket - To ensure that data is not corrupted traversing the network, use the
Content-MD5header. When you use this header, Amazon S3 checks the object against the provided MD5 value and, if they do not match, Amazon S3 returns an error. Alternatively, when the object's ETag is its MD5 digest, you can calculate the MD5 while putting the object to Amazon S3 and compare the returned ETag to the calculated MD5 value. -
Directory bucket - This functionality is not supported for directory buckets.
-
- HTTP Host header syntax
-
Directory buckets - The HTTP Host header syntax is
Bucket_name.s3express-az_id.region.amazonaws.com.
For more information about related Amazon S3 APIs, see the following:
putObjectAcl(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Uses the
aclsubresource to set the access control list (ACL) permissions for a new or existing object in an S3 bucket. You must have theWRITE_ACPpermission to set the ACL of an object. For more information, see What permissions can I grant? in the Amazon S3 User Guide.This functionality is not supported for 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
AccessControlListNotSupportederror code. Requests to read ACLs are still supported. For more information, see Controlling object ownership in the Amazon S3 User Guide.- Permissions
-
You can set access permissions using one of the following methods:
-
Specify a canned ACL with the
x-amz-aclrequest 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 ofx-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, andx-amz-grant-full-controlheaders. 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 usex-amz-aclheader 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 accountNote: 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 example, the following
x-amz-grant-readheader 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.
Note: 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)
-
- 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
versionIdsubresource.
The following operations are related to
PutObjectAcl:putObjectLegalHold(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Applies a legal hold configuration to the specified object. For more information, see Locking Objects.
This functionality is not supported for Amazon S3 on Outposts.
putObjectLockConfiguration(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.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.
Note:- The
DefaultRetentionsettings require both a mode and a period. - The
DefaultRetentionperiod can be eitherDaysorYearsbut you must select one. You cannot specifyDaysandYearsat the same time. - You can enable Object Lock for new or existing buckets. For more information, see Configuring Object Lock.
putObjectRetention(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Places an Object Retention configuration on an object. For more information, see Locking Objects. Users or accounts require the
s3:PutObjectRetentionpermission in order to place an Object Retention configuration on objects. Bypassing a Governance Retention configuration requires thes3:BypassGovernanceRetentionpermission.This functionality is not supported for Amazon S3 on Outposts.
putObjectTagging(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Sets the supplied tag-set to an object that already exists in a bucket. A tag is a key-value pair. For more information, see Object Tagging.
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:PutObjectTaggingaction. By default, the bucket owner has this permission and can grant this permission to others.To put tags of any other version, use the
versionIdquery parameter. You also need permission for thes3:PutObjectVersionTaggingaction.PutObjectTagginghas the following special errors. For more Amazon S3 errors see, Error Responses.-
InvalidTag- 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. -
MalformedXML- The XML provided does not match the schema. -
OperationAborted- A conflicting conditional action is currently in progress against this resource. Please try again. -
InternalError- The service was unable to apply the provided tag to the object.
The following operations are related to
PutObjectTagging:putPublicAccessBlock(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Creates or modifies the
PublicAccessBlockconfiguration for an Amazon S3 bucket. To use this operation, you must have thes3:PutBucketPublicAccessBlockpermission. For more information about Amazon S3 permissions, see Specifying Permissions in a Policy.When Amazon S3 evaluates the
PublicAccessBlockconfiguration for a bucket or an object, it checks thePublicAccessBlockconfiguration for both the bucket (or the bucket that contains the object) and the bucket owner's account. If thePublicAccessBlockconfigurations 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".
The following operations are related to
PutPublicAccessBlock:restoreObject(params = {}, callback) ⇒ AWS.Request
Note: This operation is not supported by directory buckets.Restores an archived copy of an object back into Amazon S3
This functionality is not supported for Amazon S3 on Outposts.
This action performs the following types of requests:
-
restore an archive- Restore an archived object
For more information about the
S3structure in the request body, see the following:-
Managing Access with ACLs in the Amazon S3 User Guide
-
Protecting Data Using Server-Side Encryption in the Amazon S3 User Guide
- Permissions
-
To use this operation, you must have permissions to perform the
s3:RestoreObjectaction. 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. - Restoring objects
-
Objects that you archive to the S3 Glacier Flexible Retrieval Flexible Retrieval 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 the S3 Glacier Flexible Retrieval Flexible Retrieval 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. If you want a permanent copy of the object, create a copy of it in the Amazon S3 Standard storage class in your S3 bucket. To access an archived object, you must restore the object for the duration (number of days) that you specify. For objects in the Archive Access or Deep Archive Access tiers of S3 Intelligent-Tiering, you must first initiate a restore request, and then wait until the object is moved into the Frequent Access tier.
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, you can specify one of the following data access tier options in the
Tierelement of the request body:-
Expedited- Expedited retrievals allow you to quickly access your data stored in the S3 Glacier Flexible Retrieval Flexible Retrieval storage class or S3 Intelligent-Tiering Archive tier when occasional urgent requests for restoring 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 Flexible Retrieval Flexible Retrieval 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 free for objects stored in the S3 Glacier Flexible Retrieval and S3 Intelligent-Tiering storage classes, enabling you to retrieve large amounts, even petabytes, of data at no cost. Bulk retrievals typically finish within 5–12 hours for objects stored in the S3 Glacier Flexible Retrieval Flexible Retrieval storage class or S3 Intelligent-Tiering Archive tier. Bulk retrievals are also the lowest-cost retrieval option when restoring objects from S3 Glacier Deep Archive. They typically finish within 48 hours for objects stored in the S3 Glacier Deep Archive storage class or S3 Intelligent-Tiering Deep Archive tier.
For more information about archive retrieval options and provisioned capacity for
Expediteddata 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
HEADrequest. Operations return thex-amz-restoreheader, 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 OKor202 Acceptedstatus code.-
If the object is not previously restored, then Amazon S3 returns
202 Acceptedin the response. -
If the object is previously restored, Amazon S3 returns
200 OKin the response.
-
Special errors:
-
Code: RestoreAlreadyInProgress
-
Cause: Object restore is already in progress.
-
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
-
-
The following operations are related to
RestoreObject:upload(params = {}, [options], [callback]) ⇒ AWS.S3.ManagedUpload
uploadPart(params = {}, callback) ⇒ AWS.Request
Uploads a part in a multipart upload.
Note: In this operation, you provide new data as a part of an object 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.
For information about maximum and minimum part sizes and other multipart upload specifications, see Multipart upload limits in the Amazon S3 User Guide.
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 .
Note: Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the formathttps://bucket_name.s3express-az_id.region.amazonaws.com/key-name. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the Amazon S3 User Guide.- Permissions
-
-
General purpose bucket permissions - To perform a multipart upload with encryption using an Key Management Service key, the requester must have permission to the
kms:Decryptandkms:GenerateDataKeyactions on the key. The requester must also have permissions for thekms:GenerateDataKeyaction for theCreateMultipartUploadAPI. Then, the requester needs permissions for thekms:Decryptaction on theUploadPartandUploadPartCopyAPIs.These permissions are required because Amazon S3 must decrypt and read data from the encrypted file parts before it completes the multipart upload. For more information about KMS permissions, see Protecting data using server-side encryption with KMS in the Amazon S3 User Guide. For information about the permissions required to use the multipart upload API, see Multipart upload and permissions and Multipart upload API and permissions in the Amazon S3 User Guide.
-
Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the
CreateSessionAPI operation for session-based authorization. Specifically, you grant thes3express:CreateSessionpermission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make theCreateSessionAPI call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make anotherCreateSessionAPI call to generate a new session token for use. Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, seeCreateSession.If the object is encrypted with SSE-KMS, you must also have the
kms:GenerateDataKeyandkms:Decryptpermissions in IAM identity-based policies and KMS key policies for the KMS key.
-
- Data integrity
-
General purpose bucket - To ensure that data is not corrupted traversing the network, specify the
Content-MD5header 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 thex-amz-content-sha256header as a checksum instead ofContent-MD5. For more information see Authenticating Requests: Using the Authorization Header (Amazon Web Services Signature Version 4).Note: Directory buckets - MD5 is not supported by directory buckets. You can use checksum algorithms to check object integrity. - Encryption
-
-
General purpose bucket - Server-side encryption is for data encryption at rest. Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts it when you access it. You have mutually exclusive options to protect data using server-side encryption in Amazon S3, depending on how you choose to manage the encryption keys. Specifically, the encryption key options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS), and Customer-Provided Keys (SSE-C). Amazon S3 encrypts data with server-side encryption using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest using server-side encryption with other key options. The option you use depends on whether you want to use KMS keys (SSE-KMS) or provide your own encryption key (SSE-C).
Server-side encryption is supported by the S3 Multipart Upload operations. Unless you are using a customer-provided encryption key (SSE-C), 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 request server-side encryption using a customer-provided encryption key (SSE-C) in your initiate multipart upload request, you must provide identical encryption information in each part upload using the following request headers.
-
x-amz-server-side-encryption-customer-algorithm
-
x-amz-server-side-encryption-customer-key
-
x-amz-server-side-encryption-customer-key-MD5
For more information, see Using Server-Side Encryption in the Amazon S3 User Guide.
-
-
Directory buckets - For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (
AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms).
-
- Special errors
-
-
Error 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
-
-
- HTTP Host header syntax
-
Directory buckets - The HTTP Host header syntax is
Bucket_name.s3express-az_id.region.amazonaws.com.
The following operations are related to
UploadPart:uploadPartCopy(params = {}, callback) ⇒ AWS.Request
Uploads a part by copying data from an existing object as data source. To specify the data source, you add the request header
x-amz-copy-sourcein your request. To specify a byte range, you add the request headerx-amz-copy-source-rangein your request.For information about maximum and minimum part sizes and other multipart upload specifications, see Multipart upload limits in the Amazon S3 User Guide.
Note: Instead of copying data from an existing object as part data, you might use the UploadPart action to upload new data as a part of an object in your request.You must initiate a multipart upload before you can upload any part. In response to your initiate request, Amazon S3 returns the upload ID, a unique identifier that you must include in your upload part request.
For conceptual information about multipart uploads, see Uploading Objects Using Multipart Upload in the Amazon S3 User Guide. For information about copying objects using a single atomic action vs. a multipart upload, see Operations on Objects in the Amazon S3 User Guide.
Note: Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the formathttps://bucket_name.s3express-az_id.region.amazonaws.com/key-name. Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the Amazon S3 User Guide.- Authentication and authorization
-
All
UploadPartCopyrequests must be authenticated and signed by using IAM credentials (access key ID and secret access key for the IAM identities). All headers with thex-amz-prefix, includingx-amz-copy-source, must be signed. For more information, see REST Authentication.Directory buckets - You must use IAM credentials to authenticate and authorize your access to the
UploadPartCopyAPI operation, instead of using the temporary security credentials through theCreateSessionAPI operation.Amazon Web Services CLI or SDKs handles authentication and authorization on your behalf.
- Permissions
-
You must have
READaccess to the source object andWRITEaccess to the destination bucket.-
General purpose bucket permissions - You must have the permissions in a policy based on the bucket types of your source bucket and destination bucket in an
UploadPartCopyoperation.-
If the source object is in a general purpose bucket, you must have the
s3:GetObjectpermission to read the source object that is being copied. -
If the destination bucket is a general purpose bucket, you must have the
s3:PutObjectpermission to write the object copy to the destination bucket. -
To perform a multipart upload with encryption using an Key Management Service key, the requester must have permission to the
kms:Decryptandkms:GenerateDataKeyactions on the key. The requester must also have permissions for thekms:GenerateDataKeyaction for theCreateMultipartUploadAPI. Then, the requester needs permissions for thekms:Decryptaction on theUploadPartandUploadPartCopyAPIs. These permissions are required because Amazon S3 must decrypt and read data from the encrypted file parts before it completes the multipart upload. For more information about KMS permissions, see Protecting data using server-side encryption with KMS in the Amazon S3 User Guide. For information about the permissions required to use the multipart upload API, see Multipart upload and permissions and Multipart upload API and permissions in the Amazon S3 User Guide.
-
-
Directory bucket permissions - You must have permissions in a bucket policy or an IAM identity-based policy based on the source and destination bucket types in an
UploadPartCopyoperation.-
If the source object that you want to copy is in a directory bucket, you must have the
s3express:CreateSessionpermission in theActionelement of a policy to read the object. By default, the session is in theReadWritemode. If you want to restrict the access, you can explicitly set thes3express:SessionModecondition key toReadOnlyon the copy source bucket. -
If the copy destination is a directory bucket, you must have the
s3express:CreateSessionpermission in theActionelement of a policy to write the object to the destination. Thes3express:SessionModecondition key cannot be set toReadOnlyon the copy destination.
If the object is encrypted with SSE-KMS, you must also have the
kms:GenerateDataKeyandkms:Decryptpermissions in IAM identity-based policies and KMS key policies for the KMS key.For example policies, see Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for S3 Express One Zone in the Amazon S3 User Guide.
-
-
- Encryption
-
-
General purpose buckets - For information about using server-side encryption with customer-provided encryption keys with the
UploadPartCopyoperation, see CopyObject and UploadPart. -
Directory buckets - For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (
AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). For more information, see Protecting data with server-side encryption in the Amazon S3 User Guide.Note: For directory buckets, when you perform aCreateMultipartUploadoperation and anUploadPartCopyoperation, the request headers you provide in theCreateMultipartUploadrequest must match the default encryption configuration of the destination bucket.S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through UploadPartCopy. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.
-
- Special errors
-
-
Error 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
-
-
Error Code:
InvalidRequest-
Description: The specified copy source is not supported as a byte-range copy source.
-
HTTP Status Code: 400 Bad Request
-
-
- HTTP Host header syntax
-
Directory buckets - The HTTP Host header syntax is
Bucket_name.s3express-az_id.region.amazonaws.com.
The following operations are related to
UploadPartCopy:waitFor(state, params = {}, callback) ⇒ AWS.Request
Waits for a given S3 resource. The final callback or 'complete' event will be fired only when the resource is either in its final state or the waiter has timed out and stopped polling for the final state.
Waiter Resource Details
s3.waitFor('bucketExists', params = {}, [callback]) ⇒ AWS.Request
Waits for the
bucketExistsstate by periodically calling the underlying S3.headBucket() operation every 5 seconds (at most 20 times).s3.waitFor('bucketNotExists', params = {}, [callback]) ⇒ AWS.Request
Waits for the
bucketNotExistsstate by periodically calling the underlying S3.headBucket() operation every 5 seconds (at most 20 times).s3.waitFor('objectExists', params = {}, [callback]) ⇒ AWS.Request
Waits for the
objectExistsstate by periodically calling the underlying S3.headObject() operation every 5 seconds (at most 20 times).s3.waitFor('objectNotExists', params = {}, [callback]) ⇒ AWS.Request
Waits for the
objectNotExistsstate by periodically calling the underlying S3.headObject() operation every 5 seconds (at most 20 times). - createBucket(params, callback) ⇒ AWS.Request