Reduce AWS Costs : Part II

Watch AWS estimated costs from aMiSTACX A51 dashboard
CloudWatch Estimated Charges on A51

Watching AWS costs with our A51 Monitoring & Control Dashboard.

aMiSTACX’s A51 dashboard now includes a billing module. This module was specifically designed to help you keep an eye on your AWS costs.


Features Overview:

  • Daily & Monthly Cost Grid
  • Estimated Charges Widget
  • Estimated Charges Threshold Alerts


How to Enable A51 Features for AWS:

Because AWS treats billing as a highly private reporting mechanism, A51 cannot fully automate the process.

To enable alerts via SMS, you need to first enable CloudWatch alerts in your AWS console.

Step 1. Log in with an AWS root/owner account.

Step 2. In AWS Billing > Billing preferences > Alert preferences

Click “edit” and check the box for CloudWatch billing alerts.

Note: AWS will warn you that this is an irreversible configuration.

Step 3. Enable “Cost Explorer” from the AWS console by clicking the “Cost Explorer” link in the left-hand menu. This is a one-time event, and you will see the following dialog box:

AWS Console enable cost explorer welcome screen.

The A51 Billing Module

A51 Main Billing Grid

As you can see from the above image, your total daily or monthly costs are clearly displayed. In the top section, you will also find a summarized total. In the right-hand action menu, you can also set a CloudWatch Alarm.

Note: You will need to attach the following policies to the A51 role in AWS IAM; otherwise, A51 will throw an error.

AWSCostAndUsageReportAutomationPolicy

AWSBillingReadOnlyAccess

Next, create an inline policy, name, save, and attach it to the A51 IAM role.

Name it: A51-CostExplorerRead

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Statement1",
            "Effect": "Allow",
            "Action": "ce:GetCostAndUsage",
            "Resource": "*"
        }
    ]
}

Copy and paste the above code snippet into the inline policy.


CloudWatch Estimated Charges Widget

On the main page of the A51 dashboard, you can quickly toggle the Billing switch to generate a CloudWatch Estimated Charges Widget.

CloudWatch Estimated Charges on A51


CloudWatch Alarms via A51

Setting a CloudWatch alarm is very useful as you do no longer need to be tethered to a dashboard.

Go the the “Monitoring” section of A51, and click the “+Billing” button to open up an alert modal.

A51 Monitoring Module + Billing Alert
CloudWatch Alarm Modal

Here we can set a threshold in USD, and send the triggered alert to an SMS device. Once enabled, the alert will show at the bottom of the screen.

Overall the new A51 Billing Module is a fantastic way to keep tabs on your AWS costs.

Reducing AWS Hosting Costs w/ A51: Part II

~Lead_Robot