Skip to content

C-Collamar/s3-force-delete-bucket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

S3 Force Delete Bucket

Empty and delete S3 buckets in one go!

Use case

  • If the S3 bucket to delete is not empty, it will be emptied first.
  • If the S3 bucket is versioned, all object versions and delete markers are deleted.

Example Usage

import { forceDeleteBucket } from '@c-collamar/s3-force-delete-bucket';
import { S3Client } from '@aws-sdk/client-s3';

// prepare the S3 client
const s3 = new S3Client();

// name your bucket to delete, that's it!
await forceDeleteBucket('my-temporary-bucket', s3);

About

Empty and delete S3 buckets in one go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published