Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 1.42 KB

File metadata and controls

27 lines (19 loc) · 1.42 KB

Daily Cost Notification

Overview

The Daily Cost Notification sends AWS costs to any email address via EventBridge, Lambda, and Amazon Simple Notification Service. You can stay informed about AWS costs regularly without needing to open the AWS Management Console.

Architecture

EventBridge triggers Lambda once a day, Lambda aggregates costs from Cost Explorer, and then sends the information to a Simple Notification Service endpoint (in this case, an email address). The execution logs of Lambda are aggregated in CloudWatch Logs.

The architecture of this infrastructure configuration is as follows: daily-cost-notification

How to deploy

Note

Before running make deploy, ensure you have configured AWS credentials and set the correct region. Otherwise, you use single sign-on (SSO).

$ export EMAIL_ADDRESS=${YOUR_EMAIL_ADDRESS_HERE}
$ make deploy

The dependencies are Golang and AWS Serverless Application Model (SAM) CLI. Please make sure to install them beforehand.

After deployment, you will receive an email from AWS to confirm the subscription to the topic. Please confirm the subscription to receive cost notifications.

confirm_subscription

After confirming the subscription, you will receive a daily email with the cost information.

daily_email