https://github.com/chadxz/s3-delete-objects-action
A Github Action to remove objects from a versioned or unversioned AWS S3 bucket.
https://github.com/chadxz/s3-delete-objects-action
aws aws-s3 github-action github-actions
Last synced: 11 months ago
JSON representation
A Github Action to remove objects from a versioned or unversioned AWS S3 bucket.
- Host: GitHub
- URL: https://github.com/chadxz/s3-delete-objects-action
- Owner: chadxz
- License: mit
- Created: 2021-06-29T00:37:13.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2022-09-04T03:32:44.000Z (almost 4 years ago)
- Last Synced: 2025-01-23T22:18:27.559Z (over 1 year ago)
- Topics: aws, aws-s3, github-action, github-actions
- Language: JavaScript
- Homepage:
- Size: 588 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# s3-delete-objects-action
A Github Action to remove objects from a versioned or unversioned AWS S3 bucket.
Specify an optional `prefix` to limit the objects removed to only those objects
whose keys match this value. For versioned buckets, any objects whose key
matches the given prefix will have all versions removed.
This library uses the AWS SDK for Javascript, version 3. To configure the
authentication credentials and the region, please use the
aws-actions/configure-aws-credentials action.
## inputs
- **bucket**: (required) S3 bucket name to remove objects from.
- **prefix**: (optional) Use this input to select only those keys that begin
with the specified prefix. If this input is left blank, all objects will be
removed from the bucket. Default: ''
- **allowEmptyPrefix**: (optional) When set to false, causes this action to
throw an error when the `prefix` is empty. This prevents buckets from being
accidentally wiped out if your action is misconfigured. Default: 'true'
## outputs
None. The number of deleted objects is printed to core.info.
## example
```yml
- uses: chadxz/s3-delete-objects-action@v0.1.0
with:
bucket: 'my-super-cool-bucket'
prefix: 'garbage-files/'
allowEmptyPrefix: false
```