@aws-lite/s3 Maintained by: @architect Install npm i @aws-lite/s3 Optionally install types: npm i -D @aws-lite/s3-types Methods CreateBucket Canonical AWS API doc Properties Bucket (string) [required] S3 bucket name ACL (string) Sets request header: x-amz-acl CreateBucketConfiguration (object) Complete bucket configuration object Example await aws.S3.CreateBucket({ Bucket: String, // required ACL: String, CreateBucketConfiguration: Object, GrantFullControl: String, GrantRead: String, GrantReadACP: String, GrantWrite: String, GrantWriteACP: String, ObjectLockEnabledForBucket: String, ObjectOwnership: String, }) DeleteBucket Canonical AWS API doc Properties Bucket (string) [required] S3 bucket name ExpectedBucketOwner (string) Sets request header: x-amz-expected-bucket-owner Example await aws.S3.DeleteBucket({ Bucket: String, // required ExpectedBucketOwner: String, }) DeleteObject Canonical AWS API doc Properties Bucket (string) [required] S3 bucket name Key (string) [required] S3 key / file name BypassGovernanceRetention (string) Sets request header: x-amz-bypass-governance-retention ExpectedBucketOwner (string) Sets request header: x-amz-expected-bucket-owner MFA (string) Sets request header: x-amz-mfa RequestPayer (string) Sets request header: x-amz-request-payer VersionId (string) Reference a specific version of the object Example await aws.S3.DeleteObject({ Bucket: String, // required Key: String, // required BypassGovernanceRetention: String, ExpectedBucketOwner: String, MFA: String, RequestPayer: String, VersionId: String, }) DeleteObjects Canonical AWS API doc Properties Bucket (string) [required] S3 bucket name Delete (object) [required] Object deletion request BypassGovernanceRetention (string) Sets request header: x-amz-bypass-governance-retention ChecksumAlgorithm (string) Sets request header: x-amz-sdk-checksum-algorithm ContentMD5 (string) Sets request header: content-md5 ExpectedBucketOwner (string) Sets request header: x-amz-expected-bucket-owner MFA (string) Sets request header: x-amz-mfa RequestPayer (string) Sets request header: x-amz-request-payer Example await aws.S3.DeleteObjects({ Bucket: String, // required Delete: Object, // required BypassGovernanceRetention: String, ChecksumAlgorithm: String, ContentMD5: String, ExpectedBucketOwner: String, MFA: String, RequestPayer: String, }) GetObject Canonical AWS API doc Properties Bucket (string) [required] S3 bucket name Key (string) [required] S3 key / file name ChecksumMode (string) Sets request header: x-amz-checksum-mode ExpectedBucketOwner (string) Sets request header: x-amz-expected-bucket-owner IfMatch (string) Sets request header: if-match IfModifiedSince (string) Sets request header: if-modified-since IfNoneMatch (string) Sets request header: if-none-match IfUnmodifiedSince (string) Sets request header: if-unmodified-since PartNumber (number) Part number (between 1 - 10,000) of the object Range (string) Sets request header: range RequestPayer (string) Sets request header: x-amz-request-payer ResponseCacheControl (string) Sets response header: cache-control ResponseContentDisposition (string) Sets response header: content-disposition ResponseContentEncoding (string) Sets response header: content-encoding ResponseContentLanguage (string) Sets response header: content-language ResponseContentType (string) Sets response header: content-type ResponseExpires (string) Sets response header: expires SSECustomerAlgorithm (string) Sets request header: x-amz-server-side-encryption-customer-algorithm SSECustomerKey (string) Sets request header: x-amz-server-side-encryption-customer-key SSECustomerKeyMD5 (string) Sets request header: x-amz-server-side-encryption-customer-key-md5 VersionId (string) Reference a specific version of the object rawResponsePayload (boolean) Set to true to return all files as buffers, and disable automatic parsing of JSON and XML Example await aws.S3.GetObject({ Bucket: String, // required Key: String, // required ChecksumMode: String, ExpectedBucketOwner: String, IfMatch: String, IfModifiedSince: String, IfNoneMatch: String, IfUnmodifiedSince: String, PartNumber: Number, Range: String, RequestPayer: String, ResponseCacheControl: String, ResponseContentDisposition: String, ResponseContentEncoding: String, ResponseContentLanguage: String, ResponseContentType: String, ResponseExpires: String, SSECustomerAlgorithm: String, SSECustomerKey: String, SSECustomerKeyMD5: String, VersionId: String, rawResponsePayload: Boolean, }) HeadObject Canonical AWS API doc Properties Bucket (string) [required] S3 bucket name Key (string) [required] S3 key / file name ChecksumMode (string) Sets request header: x-amz-checksum-mode ExpectedBucketOwner (string) Sets request header: x-amz-expected-bucket-owner IfMatch (string) Sets request header: if-match IfModifiedSince (string) Sets request header: if-modified-since IfNoneMatch (string) Sets request header: if-none-match IfUnmodifiedSince (string) Sets request header: if-unmodified-since PartNumber (number) Part number (between 1 - 10,000) of the object Range (string) Sets request header: range RequestPayer (string) Sets request header: x-amz-request-payer SSECustomerAlgorithm (string) Sets request header: x-amz-server-side-encryption-customer-algorithm SSECustomerKey (string) Sets request header: x-amz-server-side-encryption-customer-key SSECustomerKeyMD5 (string) Sets request header: x-amz-server-side-encryption-customer-key-md5 VersionId (string) Reference a specific version of the object Example await aws.S3.HeadObject({ Bucket: String, // required Key: String, // required ChecksumMode: String, ExpectedBucketOwner: String, IfMatch: String, IfModifiedSince: String, IfNoneMatch: String, IfUnmodifiedSince: String, PartNumber: Number, Range: String, RequestPayer: String, SSECustomerAlgorithm: String, SSECustomerKey: String, SSECustomerKeyMD5: String, VersionId: String, }) HeadBucket Canonical AWS API doc Properties Bucket (string) [required] S3 bucket name ExpectedBucketOwner (string) Sets request header: x-amz-expected-bucket-owner Example await aws.S3.HeadBucket({ Bucket: String, // required ExpectedBucketOwner: String, }) ListBuckets Canonical AWS API doc Properties Example await aws.S3.ListBuckets() ListObjectsV2 Canonical AWS API doc Properties Bucket (string) [required] S3 bucket name ContinuationToken (string) Pagination cursor token (returned as NextContinuationToken Delimiter (string) Delimiter character used to group keys EncodingType (string) Object key encoding type (must be url) ExpectedBucketOwner (string) Sets request header: x-amz-expected-bucket-owner FetchOwner (string) Return owner field with results MaxKeys (number) Set the maximum number of keys returned per response OptionalObjectAttributes (string) Sets request header: x-amz-optional-object-attributes Prefix (string) Limit response to keys that begin with the specified prefix RequestPayer (string) Sets request header: x-amz-request-payer StartAfter (string) Starts listing after any specified key in the bucket paginate (boolean) Enable automatic result pagination; use this instead of making your own individual pagination requests Example await aws.S3.ListObjectsV2({ Bucket: String, // required ContinuationToken: String, Delimiter: String, EncodingType: String, ExpectedBucketOwner: String, FetchOwner: String, MaxKeys: Number, OptionalObjectAttributes: String, Prefix: String, RequestPayer: String, StartAfter: String, paginate: Boolean, }) PutObject Canonical AWS API doc Properties Bucket (string) [required] S3 bucket name Key (string) [required] S3 key / file name ACL (string) Sets request header: x-amz-acl Body (string, buffer) String or buffer to be uploaded BucketKeyEnabled (string) Sets request header: x-amz-server-side-encryption-bucket-key-enabled CacheControl (string) Sets request header: cache-control ChecksumAlgorithm (string) Sets request header: x-amz-sdk-checksum-algorithm ChecksumCRC32 (string) Sets request header: x-amz-checksum-crc32 ChecksumCRC32C (string) Sets request header: x-amz-checksum-crc32c ChecksumSHA1 (string) Sets request header: x-amz-checksum-sha1 ChecksumSHA256 (string) Sets request header: x-amz-checksum-sha256 ContentDisposition (string) Sets request header: content-disposition ContentEncoding (string) Sets request header: content-encoding ContentLanguage (string) Sets request header: content-language ContentLength (string) Sets request header: content-length ContentMD5 (string) Sets request header: content-md5 ContentType (string) Sets request header: content-type ExpectedBucketOwner (string) Sets request header: x-amz-expected-bucket-owner Expires (string) Sets request header: expires File (string) File path to be read and uploaded from the local filesystem GrantFullControl (string) Sets request header: x-amz-grant-full-control GrantRead (string) Sets request header: x-amz-grant-read GrantReadACP (string) Sets request header: x-amz-grant-read-acp GrantWriteACP (string) Sets request header: x-amz-grant-write-acp MinChunkSize (number) Minimum size (in bytes) to utilize AWS-chunk-encoded uploads to S3 ObjectLockLegalHoldStatus (string) Sets request header: x-amz-object-lock-legal-hold ObjectLockMode (string) Sets request header: x-amz-object-lock-mode ObjectLockRetainUntilDate (string) Sets request header: x-amz-object-lock-retain-until-date RequestPayer (string) Sets request header: x-amz-request-payer SSECustomerAlgorithm (string) Sets request header: x-amz-server-side-encryption-customer-algorithm SSECustomerKey (string) Sets request header: x-amz-server-side-encryption-customer-key SSECustomerKeyMD5 (string) Sets request header: x-amz-server-side-encryption-customer-key-md5 SSEKMSEncryptionContext (string) Sets request header: x-amz-server-side-encryption-context SSEKMSKeyId (string) Sets request header: x-amz-server-side-encryption-aws-kms-key-id ServerSideEncryption (string) Sets request header: x-amz-server-side-encryption StorageClass (string) Sets request header: x-amz-storage-class Tagging (string) Sets request header: x-amz-tagging WebsiteRedirectLocation (string) Sets request header: x-amz-website-redirect-location Example await aws.S3.PutObject({ Bucket: String, // required Key: String, // required ACL: String, Body: String || , BucketKeyEnabled: String, CacheControl: String, ChecksumAlgorithm: String, ChecksumCRC32: String, ChecksumCRC32C: String, ChecksumSHA1: String, ChecksumSHA256: String, ContentDisposition: String, ContentEncoding: String, ContentLanguage: String, ContentLength: String, ContentMD5: String, ContentType: String, ExpectedBucketOwner: String, Expires: String, File: String, GrantFullControl: String, GrantRead: String, GrantReadACP: String, GrantWriteACP: String, MinChunkSize: Number, ObjectLockLegalHoldStatus: String, ObjectLockMode: String, ObjectLockRetainUntilDate: String, RequestPayer: String, SSECustomerAlgorithm: String, SSECustomerKey: String, SSECustomerKeyMD5: String, SSEKMSEncryptionContext: String, SSEKMSKeyId: String, ServerSideEncryption: String, StorageClass: String, Tagging: String, WebsiteRedirectLocation: String, }) Methods yet to be implemented Please help out by opening a PR! AbortMultipartUpload CompleteMultipartUpload CopyObject CreateMultipartUpload CreateSession DeleteBucketAnalyticsConfiguration DeleteBucketCors DeleteBucketEncryption DeleteBucketIntelligentTieringConfiguration DeleteBucketInventoryConfiguration DeleteBucketLifecycle DeleteBucketMetricsConfiguration DeleteBucketOwnershipControls DeleteBucketPolicy DeleteBucketReplication DeleteBucketTagging DeleteBucketWebsite DeleteObjectTagging DeletePublicAccessBlock GetBucketAccelerateConfiguration GetBucketAcl GetBucketAnalyticsConfiguration GetBucketCors GetBucketEncryption GetBucketIntelligentTieringConfiguration GetBucketInventoryConfiguration GetBucketLifecycle GetBucketLifecycleConfiguration GetBucketLocation GetBucketLogging GetBucketMetricsConfiguration GetBucketNotification GetBucketNotificationConfiguration GetBucketOwnershipControls GetBucketPolicy GetBucketPolicyStatus GetBucketReplication GetBucketRequestPayment GetBucketTagging GetBucketVersioning GetBucketWebsite GetObjectAcl GetObjectAttributes GetObjectLegalHold GetObjectLockConfiguration GetObjectRetention GetObjectTagging GetObjectTorrent GetPublicAccessBlock ListBucketAnalyticsConfigurations ListBucketIntelligentTieringConfigurations ListBucketInventoryConfigurations ListBucketMetricsConfigurations ListDirectoryBuckets ListMultipartUploads ListObjects ListObjectVersions ListParts PutBucketAccelerateConfiguration PutBucketAcl PutBucketAnalyticsConfiguration PutBucketCors PutBucketEncryption PutBucketIntelligentTieringConfiguration PutBucketInventoryConfiguration PutBucketLifecycle PutBucketLifecycleConfiguration PutBucketLogging PutBucketMetricsConfiguration PutBucketNotification PutBucketNotificationConfiguration PutBucketOwnershipControls PutBucketPolicy PutBucketReplication PutBucketRequestPayment PutBucketTagging PutBucketVersioning PutBucketWebsite PutObjectAcl PutObjectLegalHold PutObjectLockConfiguration PutObjectRetention PutObjectTagging PutPublicAccessBlock RestoreObject SelectObjectContent UploadPart UploadPartCopy WriteGetObjectResponse