Complete the code to create a billing alarm for DynamoDB usage.
aws cloudwatch put-metric-alarm --alarm-name DynamoDBUsageAlarm --metric-name [1] --namespace AWS/Billing --statistic Maximum --period 21600 --threshold 100 --comparison-operator GreaterThanThreshold --evaluation-periods 1 --alarm-actions arn:aws:sns:us-east-1:123456789012:NotifyMe
The EstimatedCharges metric tracks AWS billing charges, which helps prevent cost surprises.
Complete the code to enable detailed billing reports for DynamoDB.
aws ce enable-cost-allocation-tags --tag-keys [1]Enabling the CostCenter tag helps allocate costs and manage budgets effectively.
Fix the error in the query to get DynamoDB cost data from AWS Cost Explorer.
aws ce get-cost-and-usage --time-period Start=2023-01-01,End=2023-01-31 --granularity MONTHLY --metrics [1] --filter '{"Dimensions":{"Key":"SERVICE","Values":["DynamoDB"]}}'
The UnblendedCost metric provides the actual cost without blending, which is accurate for cost management.
Fill both blanks to create a budget alert for DynamoDB costs exceeding $500.
aws budgets create-budget --account-id 123456789012 --budget '{"BudgetName": "DynamoDBCostBudget", "BudgetLimit": {"Amount": "[1]", "Unit": "USD"}, "TimeUnit": "MONTHLY", "BudgetType": "[2]"}'
The budget limit is set to 500 USD and the budget type is COST to track spending.
Fill all three blanks to filter DynamoDB cost data by linked account and service.
aws ce get-cost-and-usage --time-period Start=2023-05-01,End=2023-05-31 --granularity DAILY --metrics [1] --filter '{"And":[{"Dimensions":{"Key":"[2]","Values":["[3]"]}},{"Dimensions":{"Key":"SERVICE","Values":["Amazon DynamoDB"]}}]}'
The metric UnblendedCost shows actual cost. The filter uses LINKED_ACCOUNT key with the account ID 123456789012 to narrow down costs.