AWS S3

Put object

Add an object to a bucket. You must have WRITE permissions on a bucket to add an object.

Inputs

Field

Type

Description

region [required]

enum

default: us-east-1

bucket [required]

string

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

key [required]

string

Object key for which the PUT action was initiated.

body

string

cannedAcl

enum

contentType

string

A standard MIME type describing the format of the contents.

serverSideEncryption

enum

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

storageClass

enum

The storage class of the object. By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. Depending on performance needs, you can specify a different Storage Class. Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For more information, see Using Amazon S3 Storage Classes in the Amazon S3 User Guide. Allowed enum values: STANDARD,REDUCED_REDUNDANCY,STANDARD_IA,ONEZONE_IA,INTELLIGENT_TIERING,GLACIER,DEEP_ARCHIVE,OUTPOSTS,GLACIER_IR

default: STANDARD

expectedBucketOwner

string

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

Outputs

Field

Type

Description

eTag

string

Entity tag for the uploaded object.

serverSideEncryption

string

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

versionId

string

Version of the object.

bucketKeyEnabled

boolean

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

checksumSHA256

string

The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.