Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/spirosoik/stack-janitor
A lambda function which detects and remove cloudformation stacks periodically on a provided tag
https://github.com/spirosoik/stack-janitor
aws cloudformation-stacks devops-tools golang lambda
Last synced: about 5 hours ago
JSON representation
A lambda function which detects and remove cloudformation stacks periodically on a provided tag
- Host: GitHub
- URL: https://github.com/spirosoik/stack-janitor
- Owner: spirosoik
- License: apache-2.0
- Created: 2021-02-15T10:30:50.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-02-19T15:02:13.000Z (over 3 years ago)
- Last Synced: 2023-02-26T23:41:33.886Z (over 1 year ago)
- Topics: aws, cloudformation-stacks, devops-tools, golang, lambda
- Language: Go
- Homepage:
- Size: 54.7 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# stack-janitor
A lambda function which detects and remove cloudformation stacks periodically based
on the provided TAG and a specific expiration time in hours.## Purpose
Respecting the environments to be clean and low cost we could run scheduled lambda function
which wipes out cloudformation stacks with specific tags.## How to
We are going to schedule a CloudWatch event to invoke the lambda function periodically. Lambda function
will do the listing based on the provided tags and will wipe them out if they expired based on
the max expiration hours we have set.### Architecture
![Architecture](assets/architecture_stack_janitor.png)
## Deploy
```
make
```The above will run the followings:
- Build Binary for lambda
- Prepare the artifact for Lambda
- Upload Lambda to provided S3 bucket
- Apply terraform (note: you need to provide env vars for terraform or use your own `.tfvars`)For terraform details you can read the [documentation](terraform/aws/README.md)