Domino does an admirable job of controlling costs for dynamic workloads. It primarily achieves this through a number of central configuration values and its ability to scale resources to meet demand. However, it is still possible to be surprised by a high AWS bill if we’re not totally in tune with everything running in the account. AWS offers solutions to monitor and estimate spend to keep costs in line. Here we’ll describe how to set up a cost budget for EC2 instance spend which will send a notification once a set threshold is met.
- In the AWS console navigate to Billing > Budgets > Create Budget.
- Select Cost budget and click Next.
-
Fill out the fields under Set budget amount.
-
Period: Monthly - the usual cadence for AWS billing.
-
Budget effective date: Recurring budget - the budget will be applied based on the period selected.
-
Start month: Current month and year.
-
Choose how to budget: Fixed
-
Enter your budgeted amount ($): Pick an estimate that makes sense for your Domino. This can be based on historical data.
-
-
Budget scoping allows filtering on a specific service or dimension.
-
In this example we want to track EC2 spend for running instances. Under Parameters > Filters click Add filter.
-
For Dimension select Usage type group.
-
For Values select EC2: Running Hours. You may choose to select more than one value here if you wish.
-
Click Apply filter. You’ll notice the graph under Unblended costs will update to show data based on your selections.
-
-
In the Details section enter a name for this budget and then click Next.
-
Ours will be named Domino-EC2-Running-Instances-spend.
-
-
On the next screen we need to add alert thresholds so we can be notified. Click Add an alert threshold.
-
Choose the desired Threshold and Trigger for the alert. We recommend setting a percentage of your budgeted amount. The trigger can be either spend that reaches the actual amount or a forecasted amount.
-
Notification preferences should be configured to send the alerts. Here we’re just supplying an email address, however configuration through SNS is also a good option.
-
Add additional alert thresholds if you wish. Click Next once done.
-
- We won’t be adding any actions (which require IAM permissions to run) so we’ll click Next one last time.
-
Review to make sure everything is set as you intended and then click on Create budget. That's it!
Comments
0 comments
Please sign in to leave a comment.