⚠️ DESTRUCTIVE ACTION WARNING⚠️ This action permanently deletes Firehose delivery streams and all data in transit.
- All data currently being buffered will be permanently lost
- Deletion is irreversible and immediate
- Any data delivery to destinations will stop immediately
- Carefully verify the
stream-nameparameter before use- Consider backing up stream configuration if needed
- Test thoroughly in non-production environments first
A GitHub Action to delete AWS Kinesis Data Firehose delivery streams. Primarily intended for test workflows and temporary stream cleanup.
- Delete streams - Permanently delete Firehose delivery streams
- Simple integration - Easy to use in GitHub Actions workflows
- Name validation - Validation of stream name format
Configure AWS credentials before using this action.
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::123456789012:role/my-github-actions-role
aws-region: us-east-1jobs:
test:
runs-on: ubuntu-latest
services:
localstack:
image: localstack/localstack
ports:
- 4566:4566
env:
SERVICES: firehose
steps:
- name: Delete stream in LocalStack
uses: predictr-io/aws-firehose-delete-stream@v0
env:
AWS_ENDPOINT_URL: http://localhost:4566
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
AWS_DEFAULT_REGION: us-east-1
with:
stream-name: 'test-stream'
⚠️ WARNING: This will permanently delete the stream and all buffered data.
- name: Delete Firehose stream
uses: predictr-io/aws-firehose-delete-stream@v0
with:
stream-name: 'my-delivery-stream'Delete temporary test streams after integration tests:
name: Integration Tests
on:
push:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
services:
localstack:
image: localstack/localstack
ports:
- 4566:4566
env:
SERVICES: firehose
steps:
- uses: actions/checkout@v4
- name: Create test stream
id: create
uses: predictr-io/aws-firehose-create-stream@v0
env:
AWS_ENDPOINT_URL: http://localhost:4566
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
AWS_DEFAULT_REGION: us-east-1
with:
stream-name: 'test-stream'
- name: Run integration tests
run: |
export STREAM_ARN="${{ steps.create.outputs.stream-arn }}"
npm test
- name: Clean up test stream
if: always()
uses: predictr-io/aws-firehose-delete-stream@v0
env:
AWS_ENDPOINT_URL: http://localhost:4566
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
AWS_DEFAULT_REGION: us-east-1
with:
stream-name: 'test-stream'| Input | Description |
|---|---|
stream-name |
Firehose delivery stream name to delete (1-64 characters, alphanumeric, hyphens, underscores, periods) |
| Output | Description |
|---|---|
deleted |
Whether the stream was successfully deleted ("true" or "false") |
Stream names must:
- Be 1-64 characters long
- Contain only alphanumeric characters, hyphens (-), underscores (_), and periods (.)
- Not be empty
Example valid names:
my-streamtest_stream_01delivery.stream.2024
The action handles common scenarios:
- Invalid stream name: Fails with validation error
- Stream does not exist: Fails with AWS error
- AWS permission errors: Fails with AWS SDK error message
- Stream name format: Validates characters and length
⚠️ IMPORTANT: Before using this action, consider:
- Data Loss: All buffered data in the stream will be permanently lost
- No Undo: Stream deletion cannot be reversed
- Service Impact: Applications sending data will fail after deletion
- Delivery Interruption: Data delivery to destinations stops immediately
- Monitoring: Deletion may trigger CloudWatch alarms or break monitoring
- Billing: Stream deletion stops billing immediately
- Testing: Always test in non-production environments first
- Use in temporary/test workflows only
- Store stream names in secrets or variables, not hardcoded
- Use
if: always()for cleanup steps to ensure execution - Document stream configuration before deletion
- Verify stream name is correct before running
- Review AWS permissions for delete operations
- Consider exporting stream metrics/logs first
git clone https://github.com/predictr-io/aws-firehose-delete-stream.git
cd aws-firehose-delete-stream
npm installnpm run build # Build the action
npm run type-check # TypeScript checking
npm run lint # ESLint
npm run check # Run all checksMIT