Constructs a service interface object. Each API operation is exposed as afunction on service.
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});In order to ensure that the S3 object uses this specific API, you canconstruct the object by passing theapiVersion option to the constructor:
var s3 = new AWS.S3({apiVersion: '2006-03-01'});You can also set the API version globally inAWS.config.apiVersions usingthes3 service identifier:
AWS.config.apiVersions = { s3: '2006-03-01', // other service API versions};var s3 = new AWS.S3();Version:
2006-03-01
Classes:ManagedUpload
This service supports a list of resource states that can be polled using thewaitFor() method. The resource states are:
bucketExists,bucketNotExists,objectExists,objectNotExists
Constructs a service object.
An Endpoint object representing the endpoint URL for service requests.
This operation aborts a multipart upload.
Completes a multipart upload by assembling previously uploaded parts.
You first initiate the multipart upload and then upload all parts using theUploadPart operation or theUploadPartCopy operation.
Creates a copy of an object that is already stored in Amazon S3.
This action initiates a multipart upload and returns an upload ID.
Get a pre-signed POST policy to support uploading to S3 directly from an HTML form.
Creates a session that establishes temporary security credentials to support fast authentication and authorization for the Zonal endpoint API operations on directory buckets.
Deletes the S3 bucket.
This implementation of the DELETE action resets the default encryption for the bucket as server-side encryption with Amazon S3 managed keys (SSE-S3).
Deletes the policy of a specified bucket.
Removes an object from a bucket.
This operation enables you to delete multiple objects from a bucket using a single HTTP request.
Returns the default encryption configuration for an Amazon S3 bucket.
For an updated version of this API, seeGetBucketLifecycleConfiguration.
Returns the policy of a specified bucket.
Retrieves an object from Amazon S3.
In theGetObject request, specify the full key name for the object.
General purpose buckets - Both the virtual-hosted-style requests and the path-style requests are supported.
Retrieves all the metadata from an object without returning the object itself.
Get a pre-signed URL for a given operation name.
Returns a 'thenable' promise that will be resolved with a pre-signed URL for a given operation name.
You can use this operation to determine if a bucket exists and if you have permission to access it.
TheHEAD operation retrieves metadata from an object without returning the object itself.
Returns a list of all Amazon S3 directory buckets owned by the authenticated sender of the request.
This operation lists in-progress multipart uploads in a bucket.
Returns some or all (up to 1,000) of the objects in a bucket with each request.
Lists the parts that have been uploaded for a specific multipart upload.
To use this operation, you must provide theupload ID in the request.
When user supply an access point ARN in the Bucket parameter, we need to populate the URI according to the ARN.
This operation configures default encryption and Amazon S3 Bucket Keys for an existing bucket.
Applies an Amazon S3 bucket policy to an Amazon S3 bucket.
Adds an object to a bucket.
Uploads an arbitrarily sized buffer, blob, or stream, using intelligent concurrent handling of parts if the payload is large enough.
Uploads a part in a multipart upload.
Uploads a part by copying data from an existing object as data source.
Validate resource-type supplied in S3 ARN.
Waits for a given S3 resource.
makeRequest,makeUnauthenticatedRequest,defineService
Constructs a service object. This object has one method for eachAPI operation.
Examples:
Constructing a S3 object
var s3 = new AWS.S3({apiVersion: '2006-03-01'});Options Hash (options):
An optional map of parameters to bind to everyrequest sent by this service object. For more information on bound parameters,see"Working with Services" in the Getting Started Guide.
The endpoint URI to send requeststo. The default endpoint is built from the configuredregion.The endpoint should be a string like'https://{service}.{region}.amazonaws.com' or anEndpoint object.
Enables IPv6/IPv4 dualstack endpoint.When a DNS lookup is performed on an endpoint of this type, it returns an “A” record withan IPv4 address and an “AAAA” record with an IPv6 address. In most cases the network stackin the client environment will automatically prefer the AAAA record and make a connectionusing the IPv6 address. Note, however, that currently on Windows, the IPv4 address will bepreferred.
your AWS access key ID.
your AWS secret access key.
the optional AWSsession token to sign requests with.
the AWS credentialsto sign requests with. You can either specify this object, orspecify the accessKeyId and secretAccessKey options directly.
theprovider chain used to resolve credentials if no staticcredentialsproperty is set.
the region to send service requests to.See AWS.S3.region for more information.
the maximum amount of retries toattempt with a request. See AWS.S3.maxRetries for more information.
the maximum amount of redirects tofollow with a request. See AWS.S3.maxRedirects for more information.
whether to enable SSL forrequests.
whether input parametersshould be validated against the operation description before sendingthe request. Defaults to true. Pass a map to enable any of thefollowing specific validation features:
true.whether to compute checksumsfor payload bodies when the service accepts it (currently supportedin S3 only)
whether types are convertedwhen parsing response data. Currently only supported for JSON basedservices. Turning this off may improve performance on large responsepayloads. Defaults totrue.
whether to apply a clock skewcorrection and retry requests that fail because of an skewed clientclock. Defaults tofalse.
whether to force pathstyle URLs for S3 objects.
whether the provided endpointaddresses an individual bucket (false if it addresses the root APIendpoint). Note that setting this configuration option requires anendpoint to be provided explicitly to the service constructor.
whether S3 body signingshould be disabled when using signature versionv4. Body signingcan only be disabled when using https. Defaults totrue.
when regionis set to 'us-east-1', whether to send s3 request to global endpoints or'us-east-1' regional endpoints. This config is only applicable to S3 client.Defaults tolegacy
whether to override the request regionwith the region inferred from requested resource's ARN. Only available for S3 bucketsDefaults totrue
A set of options to configurethe retry delay on retryable errors. Currently supported options are:
base option will be ignored if thisoption is supplied. The function is only called for retryable errors.A set of options to pass to the low-levelHTTP request. Currently supported options are:
http.globalAgent) for non-SSL connections. Note that forSSL connections, a special Agent object is used in order to enablepeer certificate verification. This feature is only available in theNode.js environment.connectTimeout milliseconds. This timeout has no effect once a socketconnection has been established.a String in YYYY-MM-DD format(or a date) that represents the latest possible API version that can beused in all services (unless overridden byapiVersions). Specify'latest' to use the latest possible version.
a map of serviceidentifiers (the lowercase service class name) with the API version touse when instantiating a service. Specify 'latest' for each individualthat can use the latest available version.
an object that responds to .write()(like a stream) or .log() (like the console object) in order to loginformation about requests
an offset value in millisecondsto apply to all signing times. Use this to compensate for clock skewwhen your system may be out of sync with the service time. Note thatthis configuration option can only be applied to the globalAWS.configobject and cannot be overridden in service-specific configuration.Defaults to 0 milliseconds.
the signature version to signrequests with (overriding the API configuration). Possible values are:'v2', 'v3', 'v4'.
whether the signature to signrequests with (overriding the API configuration) is cached. Only appliesto the signature version 'v4'. Defaults totrue.
whether to validate the CRC32checksum of HTTP response bodies returned by DynamoDB. Default:true.
Whether to use theS3 Transfer Acceleration endpoint with the S3 service. Default:false.
whether to collect andpublish this client's performance metrics of all its API requests.
whether tocall operations with endpoints given by service dynamically. Setting this
the size of the global cache storingendpoints from endpoint discovery operations. Once endpoint cache is created,updating this setting cannot change existing cache size.Defaults to 1000
whether to marshal requestparameters to the prefix of hostname.Defaults totrue.
whether to send sts requestto global endpoints or regional endpoints.Defaults to 'legacy'.
Enables FIPS compatible endpoints.Defaults tofalse.
Enables IPv6 dualstack endpoint.Defaults tofalse.
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 theListParts API operation and ensure that the parts list is empty.
ListMultipartUploads operation to list the in-progress multipart uploads in the bucket and use theAbortMultupartUpload operation to abort all the in-progress multipart uploads.https://bucket_name.s3express-az_id.region.amazonaws.com/key-name. Path-style requests are not supported. For more information, seeRegional and Zonal endpoints in theAmazon S3 User Guide.