A lambda function that monitors AWS Cloudtrail management events and publishes them to a slack channel
- setup a slack bot to receive the events
- setup cloudtrail management events
- build the lambda function
- deploy to ECR
cd deploy/sam
cat >> dev.json << 'END'
{
"Parameters": {
"LOG_LEVEL": "DEBUG",
"REGION": "<ENTER_AWS_REGION>"
}
}
END
sam build
sam local invoke -e test_events/ec2_sg.json -n dev.json
cd deploy/sam
sam build
sam deploy
cd deploy/terraform
terraform init
terraform plan -var-file variables/dev.tfvars