AWS Alerts is a monitoring and alerting solution for AWS cloud to monitor resources for 30+ AWS services and send alerts related to failures, errors, warnings and terminations on Slack.
APACHE-2.0 License
AWS Alerts is a monitoring and alerting solution for AWS cloud to monitor resources for 30+ AWS services and send alerts related to failures, errors, warnings and terminations on Slack.
You can update provided variable values to enable or disable alerts for different AWS services.
By default, all AWS services are disabled and you have to choose which one to enable.
❓ Why did I develop this solution?
Because sometimes infrastructure level alerts can be missed which can be collected more efficiently using AWS CloudWatch/AWS EventBridge events, AWS CloudWatch alarms and AWS service specific event subscriptions but manually creating all the required resources to enable all those alerts can take a lot of time and effort.
Below you can find examples of AWS Alerts on Slack as notifications:
Following are the 30+ AWS services for which you can enable alerts for failures, errors, warnings and terminations notifications:
AWS Batch
AWS CodeBuild (CB)
AWS CodeDeploy (CD)
AWS CodePipeline (CP)
AWS Config
AWS Data Lifecycle Manager (DLM)
AWS Database Migration Service (DMS)
AWS DataSync (DS)
AWS Elastic Block Store (EBS)
AWS Elastic Compute Cloud (EC2) Auto Scaling
AWS Elastic Compute Cloud (EC2)
AWS Elastic Container Service (ECS)
AWS Elastic Map Reduce (EMR)
AWS Elemental
AWS GameLift (GL)
AWS Glue
AWS Health
AWS Internet of Things (IoT)
AWS Key Management Service (KMS)
AWS Lambda
AWS Macie
AWS OpsWorks
AWS Redshift
AWS Relation Database Service (RDS)
AWS SageMaker
AWS Server Migration Service (SMS)
AWS Signer
AWS Step Functions (SF)
AWS Systems Manager (SSM)
AWS Transcribe
AWS Trusted Advisor (TA)
Following are the components used in this solution:
Following are the prerequisites to be met once before you begin:
pip
Following are the steps to successfully deploy and use this solution:
terraform-usage-example.tf
file to create main.tf
file for your infrastructure as needed.slack_webhook_url_aws_ssm_parameter_name
variable to the name of the AWS SSM Parameter name from the Parameter Store which is having Slack Webhook URL.true
for its variable that is starting with the prefix enable_...
(e.g., enable_rds_failure_warning_alerts
). By default, all are set to false
.enable_lambda_failure_alerts
variable is set to to true
for AWS Lambda functions' failure alerts, you can set a list of specific AWS Lambda functions to enable monitoring only for them by using lambda_function_names
variable. Otherwise, it will fetch all the AWS Lambda function names.terraform init
and then terraform apply
.yes
to create the resources.Following are the steps to successfully deploy and use this solution:
pip3 install -r ./function/requirements.txt -t ./function --no-cache-dir --upgrade
function
directory into a .zip
file and put it on an AWS S3 bucket.Create Stack
button and then select With new resources (standard)
option.Choose a template
, either upload aws_alerts_cft.yaml
file from the cloudformation
directory or upload it on an AWS S3 bucket and enter its AWS S3 object URL.Stack Name
.SlackWebhookURLAWSSSMParameterName
which is the name of the AWS SSM Parameter Name from the Parameter Store which is having Slack Webhook URL.AWSAlertsLambdaCodeS3Bucket
which is an AWS S3 Bucket Name having AWS Alerts Lambda Function Code. (e.g., my-bucket
).AWSAlertsLambdaCodeS3ObjectKey
which is an AWS S3 Bucket Object Key having AWS Alerts Lambda Function Code (e.g., lambda/code/aws_alerts.zip
).YES
for its variable that is starting with the prefix Enable...
(e.g., EnableCloudFormationFailureAlerts
). By default, all have YES
selected.Tags
if required.Review
, select I acknowledge that AWS CloudFormation might create IAM resources with custom names.
and click Create
.Status
to CREATE_COMPLETE
.Note: You can subscribe other endpoints to the AWS SNS topic created for alerts if needed.