项目作者: sabrehagen

项目描述 :
Delete an Amazon S3 Bucket
高级语言: JavaScript
项目地址: git://github.com/sabrehagen/delete-aws-bucket.git
创建时间: 2017-10-12T07:29:59Z
项目社区:https://github.com/sabrehagen/delete-aws-bucket

开源协议:

下载


Delete AWS Bucket

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

Getting Started

Run

  1. npm install --save delete-aws-bucket

API

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

  1. deleteBucket(bucketName, [config]);

Usage

  1. const deleteBucket = require('delete-aws-bucket');
  2. deleteBucket('my-bucket');
  3. const awsConfig = {
  4. accessKeyId: 'AKID',
  5. secretAccessKey: 'SECRET',
  6. region: 'us-west-2'
  7. };
  8. deleteBucket('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.