paul-ridgway / billing-alerts-lambda

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

billing-alerts-lambda

Create a monthly cost budget (no alerts needed, value can be arbitrary).

Configure and e-mail or domain in SES to match the address to be sent from.

Put account number in production.json and project.json.

Create dynamo db table, billing_history, String PK month, Number SK timestamp

Create ViewBudget Policy: budget, read, view budget, all resources.

Create BillingHistoryReadWrite, DynamoDB: "dynamodb:BatchGetItem", "dynamodb:BatchWriteItem", "dynamodb:PutItem", "dynamodb:GetItem", "dynamodb:Query", "dynamodb:UpdateItem" Add ARN. arn:aws:dynamodb:eu-west-1:xxx:table/billing_history

Create SendEmail, SES: "ses:SendEmail", "ses:SendTemplatedEmail", "ses:SendRawEmail"

Find role created (billing-alerts_lambda_function) add above policies

Create CloudWatch trigger.

CloudFormation stack available at: https://billing-alerts-lambda.s3-eu-west-1.amazonaws.com/billing-alerts.yml

About


Languages

Language:HTML 58.4%Language:Ruby 34.7%Language:Shell 6.9%