Real-time AWS resource usage alerts grouped on AWS tags. Alerts use AWS SNS for email alerts. This repository includes a service and terraform module for deployment into a kubernetes cluster.
Warning
Costs are provided only as an estimate. Only the AWS account provides accurate billing information.
- Elastic file storage (EFS)
- Elastic compute (EC2)
- Create a
deploy/dev/config.yamlfile based on config.sample.yaml - Login to the AWS CLI
- Run
make devto deploy a kubernetes cluster using k3d, the AWS resources and the aws-usage-alerts service.
Deploy the aws-usage-alerts terraform module i.e
module "aws-usage-alerts" {
source = "github.com/ucl-arc-tre/aws-usage-alerts/deploy/module?ref=0.1.2"
image = "ghcr.io/ucl-arc-tre/aws-usage-alerts:0.1.2"
config = {
groupTagKey = "project" # Tag key to use for grouping
storageBackend = "configMap" # Options: {inMemory, configMap}
adminEmails = [ # Email addresses of administrators who will receive notifications
"alice@example.com"
]
groups = {
example = { # All resources tagged with project=example
threshold = 100 # Cost threshold in $ / month
}
}
}
providers = {
aws = aws
kubernetes = kubernetes
}
}Contributions are very welcome! Suggested steps:
- Fork this repository and create a branch.
- Install the prerequisites: k3d, terraform, docker, make, go.
- Run
pre-commit installto install pre-commit. - Modify, commit, push and open a pull request against
mainfor review.