Skip to content

sabrehagen/empty-aws-bucket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Empty S3 Bucket

For a given S3 bucket, all objects and their versions will be deleted.

Getting Started

Run

npm install --save empty-aws-bucket

API

The first argument is the bucket name, and the second argument is an optional config object passed to the AWS SDK.

emptyBucket(bucketName, [config]);

Usage

const emptyBucket = require('empty-aws-bucket');

emptyBucket('my-bucket');

const awsConfig = {
    accessKeyId: 'AKID',
    secretAccessKey: 'SECRET',
    region: 'us-west-2'
};

emptyBucket('other-bucket', awsConfig);

Debugging

The AWSJS_DEBUG environment variable enables logging in aws-sdk. If the AWSJS_DEBUG environment variable is set this module will log debug information also.

About

Empty an Amazon S3 Bucket

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •