destroyS3

Exports an async function that tears down the S3 bucket

Source:

(require("destroyS3"))(region, bucketName)

Source:

Exports destroyS3

Parameters:
Name Type Description
region String

This is the region of where this AWS service is deployed

bucketName String

This is the name of the S3 bucket

Methods

(async, inner) deleteBucket(s3, bucketName)

Source:

Deletes a S3 bucket

Parameters:
Name Type Description
s3 S3Client

This is the S3 Client

bucketName String

This is the S3 bucket name

Throws:

Will throw an error if S3 client fails to execute its command

(async, inner) deleteBucketObjects(s3, versions, bucketName)

Source:

Deletes S3 bucket objects

Parameters:
Name Type Description
s3 S3Client

This is the S3 Client

versions Array

This is the list of object versions

bucketName String

This is the S3 bucket name

Throws:

Will throw an error if S3 client fails to execute its command

(async, inner) listBucketObjects(s3, bucketName) → {Array}

Source:

List all the objects versions from a S3 bucket

Parameters:
Name Type Description
s3 S3Client

This is the S3 Client

bucketName String

This is the name of the S3 bucket

Throws:

Will throw an error if S3 client fails to execute its command

Returns:

This is the list of object versions

Type
Array