This is a AWS Lambda function written in python 2.7 which posts detailed AWS billing info to slack.
Set your environment CLOUD_WATCH_REGION, AWS_SERVICE(name), HOOK_URL and SALCK_CHANNEL values.
Please note cloudwatch billing monitoring API is only available in N.Virginia / us-east-1
After setting the above items, deploy it to your aws environment. Set scheduled Event to post slack everyday.
Provide role with the appropriate AWS billing and cloudwatch access.
The IAM policy used is as follows:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "cloudwatch:*" ], "Resource": "*", "Condition": { "Bool": { "aws:SecureTransport": "true" } } } ] }
Also please follow the instructions here - https://www.youtube.com/watch?v=ERKPy-wEnF8