These are 4 steps you can take to create a budget and set up a Slack alarm:
1) Create a budget
Go to your Billing console, then click on Budgets and then click on “Create budget.” Choose the Cost budget option.
My recommendation is that you set a “Daily spend check.” Based on the max budget you are willing to spend per month, divide it by 30, and set a daily budget with the amount.
When you are in the “Configure Alerts” step, go to the SNS console, and create a new topic. Verify that you are in the correct region. Also, make sure to add the Access Policy, as mentioned in the documentation.
Go back to the “Create a budget” wizard, select “Notify via Amazon Simple Service…” and add the ARN for the topic you just created.
Now you can leverage AWS Chatbot to send notifications to your Slack channel. Go to the Chatbot console, select “Configure new client,” and then choose Slack.
Then click on “Configure new channel.” Where it asks you for the channel name, go to your Slack app, right-click on your channel name, and then click on “Copy name.”
Finally, select the region and SNS topic, and you are done!
You might think that you can go to the SNS topic and publish a message to test the integration… wrong! You need to do it via a supported AWS Chatbot service, like CloudWatch (see more in the link.)
And don’t forget to add the AWS bot to the channel where you want to receive the notifications 😉