As per AWS docs, AWS CloudWatch monitors your Amazon Web Services (AWS) resources and the applications you run on AWS in real-time. You can use AWS CloudWatch to collect and track metrics, which are the variables you want to measure for your resources and applications. AWS CloudWatch alarms send notifications(email) or automatically make changes to the resources you are monitoring based on the rules that you define.
Setting up AWS CloudWatch billing alarm is very important for amazon web service developers. It becomes very important specially if you are on AWS free tier service. For getting started with amazon web services, please read below articles:
- AWS Free Tier Usage Facts
- Amazon S3 WordPress Integeration
- Amazon CloudFront Integeration with WordPress
How to Setup AWS CloudWatch Alarm for Billing Alerts
Follow below steps for setting up AWS CloudWatch billing alarms:
- Login to AWS Management Console.
- Click “CloudWatch” amazon web service under category “Management Tools“.
- You will be redirected to AWS CloudWatch dashboard.
- Click “Alarms“. You will see all your AWS CloudWatch alarm listed if you created any alarm previously.
- Click “Billing” from left side. If you are not logged in, it will give you popup to switch region to US East (N. Virginia).
- If you are already logged in to US East (N. Virginia) region, you will be redirected to AWS CloudWatch dashboard. You can see all your alarms if set.
- Click “Create Alarm”. You will be taken to “Create Alarm” select metric page.
- We will be setting AWS CloudWatch billing alert for overall AWS account billing with upper limit threshold amount.
- Select “Billing” from “Select Metric” dropdown.
- You will need to check currency “USD” option. Click “Next”.
- Set your alarm by giving alarm name, description and estimated charges. Fill the threshold amount. Exceeding that amount you want to receive alarm.
- In the “Actions” section, value for “Whenever this alarm” should be “State is ALARM“.
- In the Send Notification to drop-down list, select an existing Amazon SNS topic or create a new one.
- To create a new Amazon SNS topic, select New list.
- In the Send notification to field, enter a name for the new Amazon SNS topic for example:
notify_me.In the Email list field, enter a comma-separated list of email addresses to be notified when the alarm changes to the
- You need to confirm all the email addresses which are provided above. You will receive AWS CloudWatch billing alarm only if you have done double opt in email confirmation.
- Save your alarm. You will be redirected to dashboard with success message “Your Alarm has been created”.
- Hurray! You can see your alarm on the dashboard.
AWS Cloudwatch Billing Alarm for Specific Service
- Again Go to AWS CloudWatch dashboard.
- Click “Alarms”. You will see all your Amazon CloudWatch alarm listed.
- Click “Create Alarm” to create a new AWS CloudWatch alarm.
- You will see below page. Click “By Service” link under “CloudWatch Metrics by Category” section.
- Click “Next”.
- Select the specific service for which you want to setup AWS CloudWatch billing alarm. In my case, I chose “AmazonS3” since in free tier, I am always crossing S3 usage limit for my blog.
- Click “Next”.
- You will see alarm details page. Set your alarm by giving alarm name, description and estimated charges.
- In the “Actions” section, value for “Whenever this alarm” should be “State is ALARM”.
- Configure your send notification as mentioned above.
- Click “Create Alarm” and you should be redirect to dashboard with success message.
Congratulations! You AWS CloudWatch billing alarm for specific service has been set.
AWS CloudWatch Pricing
For free tier eligible users, upto 10 AWS CloudWatch alarm metrics, 10 alarms, and 1 million API requests are free.
For non free tier users, you can calculate based on your monthly usage and region here.
If you are amazon web services developer & interested in more advanced AWS services, I recommend reading below articles:
Read all amazon web service tutorials from below:
Thank you for reading my article. If you face any problem or having any questions, let me know in comment. If you like my article please like our Facebook page and also follow us on Twitter. For regular updates you can also subscribe to hackpundit.com with your email.
Please also share on Facebook and Twitter to help other AWS cloud developers.