Integration Between AWS Config and Slack
What is AWS Config?
AWS Config provides a detailed view of the configuration of AWS resources in your AWS account. This includes how the resources are related to one another and how they were configured in the past so that you can see how the configurations and relationships change over time.
That’s what AWS say. It’s basically compliance and auditing tool for your AWS resources. You can track your resources are compliant or not, according to the rules. Here are some sample rules;
Ssh port disabled off all my instances?
Deletion protection enabled on all my RDS instances?
IAM Access Keys rotating every 90 day?
But there aren’t only 3 rules, there are too many rules. You can’t track all rules by manually. You want to get notified when a rule change status to non-compliant.
We will do this by Amazon Eventbridge and little python code.
Here our python code.
After uploading our code to lambda, we open the Eventbridge console.
First we need event pattern.
"detail-type": ["Config Rules Compliance Change"],
This event will trigger our lambda function when “complianceType” goes “NON_COMPLIANT” status.
Everything is ready now it’s time to see the results.
AWS Config always checks your resources and rules and if a NON_COMPLIANT type event occurs you will get notification like this.
Thank you for taking the time and reading. I hope it was useful.