AWS Cost Anomaly Detection is a feature of the AWS Cost Management suite. It leverages machine learning to enable continuous monitoring of your AWS costs and usage, allowing you to identify unexpected and abnormal spending. AWS Cost Anomaly Detection offers businesses various benefits, including visibility and intelligent analysis to help you optimize your AWS costs.
Cost Anomaly Detection provides aggregated reports via email alerts of Amazon SNS topics. You can configure SNS to create a chatbot configuration mapping each topic to a chatroom in Amazon Chime or a Slack channel. The machine learning capabilities allow you to assess your spending patterns and help reduce false positives. You can configure monthly or weekly evaluations or evaluate organic growth.
AWS Cost Anomaly Detection’s analysis capabilities let you determine the root causes of anomalies, including the specific usage driving up your costs. You can set up cost evaluations based on your organization’s needs. For example, you specify if the analysis covers entire cost categories, member accounts, or cost allocation tags or if it assesses each service separately.
Related content: Read our guide to AWS Cost Explorer
In this article:
AWS Cost Anomaly Detection is a Cost Explorer feature, so you need to enable Cost Explorer to access it. Once you’ve finished setting up Cost Explorer, you can start using Cost Anomaly detection by opening the AWS Management Console and navigating to the Cost Management console. Next, you select the Cost Anomaly Detection option on the navigation pane.
You can configure Cost Anomaly Detection to detect anomalies at various levels of granularity and different spending patterns based on the type of monitor.
For example, you might have different usage and spending patterns for each AWS service, such as Amazon EC2, AWS Lambda, and Amazon S3. You can segment cost evaluations by service to identify distinct usage trends and minimize false-positive alerts. You can build a cost monitor to evaluate a specific member account, cost category, or cost allocation tag.
There are several monitor types to choose from, each suited to different AWS account structures. The current selection includes:
It is not advisable to create a monitor spanning different monitor types, as this could result in duplication due to overlapping spending evaluations.
Related content: Read our guide to AWS cost optimization
AWS Cost Anomaly Detection helps finance and engineering teams to monitor, detect, and investigate the factors determining AWS spending. A major benefit of this capability is recognizing and preventing undesired outcomes and helping enforce budgets. For example, an undesired outcome might be a deployment that takes longer than expected, driving up IT costs.
Cost Anomaly Detection helps AWS users minimize unexpected costs by identifying their root causes early on. It alerts you immediately of detected anomalies, allowing you to take the necessary actions to stay on budget.
Additional benefits include:
However, AWS Cost Anomaly Detection also has some limitations, such as:
Use the following steps to set up a Slack integration for AWS Cost Anomaly Detection via a chatbot:
If you do not have an AWS account, you must create one first. Once you have an account, you can use your account credentials to sign in to the AWS Cost Management console.
Next, select Cost Anomaly Detection on the navigation pane. Create a monitor using the Creating cost monitors and alerts subscriptions option.
Once you’ve created the monitor, select “individual alerts” in the “alerting frequency” field, and specify an Amazon SNS topic as the alert recipient.
Finally, select Create monitor.
Image Source: AWS
Once you’ve added an Amazon SNS topic to an “individual alert” anomaly subscription, you can configure Slack using Chatbox. First, go to the AWS Chatbot console and choose Slack as your chat client.
Next, give AWS Chatbot permission to access your AWS Slack workspace.
After specifying the workspace configurations in the Chatbot console, select Configure a new channel. Enter the configuration name and (optionally) specify if you require further logging to enable the configuration.
Select the Slack channel you want to use as a workspace to publish alerts. Copy the link by right-clicking the channel and paste it into the channel ID textbox.
Image Source: AWS
AWS Chatbot must have an IAM role to execute actions like running CLI commands or responding to interactive messages. You can use role settings to determine each channel member’s permissions. You can choose a user role or a channel IAM role, either reusing an existing role or creating a new one based on an IAM template.
For example, you can create an IAM role and grant permissions using the notification permissions template. You may choose permissions that allow Chatbot to receive and send notifications. It is advisable to use descriptive names to help identify the purpose of new IAM roles.
Next, select a suitable policy that provides guardrails for the SNS channel. Your company’s administrator should be able to provide additional information on your organization’s policies.
Image Source: AWS
With the channel guardrails in place, you can choose the SNS topic you created under the alert subscription in the Cost Anomaly Detection console. You can choose several SNS topics from multiple regions and grant them all permissions to notify your specified Slack channel.
Finally, select “configure.”
When you’ve finished configuring Cost Anomaly Detection and Slack, you should be able to see your subscription alerts in the Slack channel you configured. The following example shows you what a Cost Anomaly Detection alert should look like on Slack. The header includes a link navigating to the anomaly’s page to provide further details.
Image Source: AWS
AWS Cost Explorer is a useful tool for reducing cloud costs, but it is limited to the current pricing models you are utilizing. Spot by NetApp lets you cut costs dramatically by switching to lower-cost pricing models like spot instances and reserved instances.
Spot by NetApp allows you to reliably use spot instances for production and mission-critical workloads as well as enjoy the long-term pricing of RIs without the risks of long-term commitment.
Key features of Spot by NetApp’s cloud financial management suite include:
for up to 20 instances