Skip to content

kaihendry/AWSEstimatedCharges2Slack

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

Summarise AWS expenditure

Requires billing alerts to be enabled in your billing preferences & CloudWatchReadOnlyAccess in the role https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/monitor-charges.html

Reference case #5314191201

Updates twice a day

Triggered at the start & end of the working day in Singapore

Deployment notes

Currently the code is defined for my use case and accounts. Notice two accounts are in an organisation and another uses a cross account role to get the metrics.

There are many ways to deploy a serverless function, however I'm using http://apex.run/ in this instance. The project.json looks like:

{
  "name": "estimatedcharges",
  "description": "Post to slack a summary of the estimated charges of the AWS account",
  "profile": "my-profile",
  "memory": 128,
  "timeout": 5,
  "role": "arn:aws:iam::812644853088:role/estimatedcharges_lambda_function",
  "environment": {
	"WEBHOOK": "https://hooks.slack.com/services/XXXXX/YYYYYY/etcetc"
  }
}

About

Summarise AWS/Billing EstimatedCharges for Slack

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published