Skip to content

AWS Cost Anomaly Detection Terraform module

Notifications You must be signed in to change notification settings

omers/aws-cost-anomaly-detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description:

The AWS Cost Anomaly Detection Terraform module is a powerful tool designed to simplify the management of cost anomaly detection in your Amazon Web Services (AWS) infrastructure. This module leverages the flexibility and scalability of Terraform to automate the deployment and configuration of the necessary AWS resources, allowing you to effortlessly monitor and identify unusual spending patterns in your cloud environment.

By utilizing the AWS Cost Anomaly Detection Terraform module, you can proactively detect and investigate unexpected changes in your AWS costs, enabling you to optimize your cloud spending and ensure cost efficiency. The module integrates seamlessly with AWS Cost Explorer and leverages its machine learning capabilities to analyze historical cost data and identify anomalies, such as sudden cost spikes or unusual usage patterns.

Key Features:

Simple Deployment:

The Terraform module provides an intuitive and declarative approach to infrastructure management, allowing you to easily deploy the necessary resources for cost anomaly detection. Automated Configuration: With this module, you can automate the configuration of AWS Cost Explorer and set up the required anomaly detection settings without manual intervention.

Real-time Alerts:

Receive real-time notifications when cost anomalies are detected, enabling you to promptly investigate and take appropriate actions to mitigate any potential issues. Cost Optimization: By leveraging the insights provided by the module, you can optimize your AWS spending, identify cost-saving opportunities, and ensure better cost control for your cloud infrastructure.

Scalability:

The module is designed to handle large-scale AWS environments, accommodating growing workloads and enabling you to seamlessly monitor cost anomalies across your entire infrastructure. Whether you are a small startup or a large enterprise, the AWS Cost Anomaly Detection Terraform module offers an efficient and reliable solution to automate the detection and management of cost anomalies in your AWS environment. Start using this module today and gain valuable insights into your cloud spending, empowering you to make informed decisions and optimize your AWS costs.

PagerDuty setup

PagerDuty service shall be an Amazon Cloudwatch service. Once created you should copy the PagerDuty Integration URL to the endpoint_url input variable

Module documentation:

Requirements

Name Version
aws 5.6.2

Providers

Name Version
aws 5.6.2

Modules

No modules.

Resources

Name Type
aws_ce_anomaly_monitor.anomaly_monitor resource
aws_ce_anomaly_subscription.realtime_subscription resource
aws_sns_topic.cost_anomaly_updates resource
aws_sns_topic_policy.default resource
aws_sns_topic_subscription.pagerduty resource
aws_sns_topic_subscription.topic_email_subscription resource
aws_caller_identity.current data source
aws_iam_policy_document.sns_topic_policy data source

Inputs

Name Description Type Default Required
create_pagerduty Set to true in order to send notifications to PagerDuty bool false no
emails List of email addresses to notify list(any) n/a yes
environment The account environment (Prod / Dev etc.) string n/a yes
pagerduty_endpoint The PagerDuty HTTPS endpoint where SNS notifications will be sent to string n/a yes
raise_amount_absolute The Absolut increase in USD to trigger the detector. (ANOMALY_TOTAL_IMPACT_ABSOLUTE) string n/a yes
raise_amount_percent An Expression object used to specify the anomalies that you want to generate alerts for. The precentage service cost increase than the expected string n/a yes
region AWS Region string n/a yes
resource_tags Tags to set for all resources map(string) {} no

Outputs

Name Description
sns_arn n/a