You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Real-time AWS security event monitoring. Six EventBridge rules watch for 10 high-signal CloudTrail events and fire a Lambda within seconds. The Lambda enriches and routes alerts to SNS → email + Slack via AWS Chatbot.
IPv6 coverage: Security group check also catches ::/0 rules
AWS Chatbot instead of custom webhook: Native SNS → Slack integration, no webhook URL to rotate
Severity tiers: CRITICAL/WARNING go to one SNS topic; INFO goes to another (separate Slack channel)
Dead Letter Queue: Failed Lambda invocations land in SQS; CloudWatch alarm fires if Lambda errors
Lambda enrichment: Every alert includes account alias, actor ARN, source IP, event time, and a console URL
Encrypted SNS: Both topics use a customer-managed KMS key
Remote state: S3 + DynamoDB locking from day one
Prerequisites
AWS CLI configured with SSO (aws sso login --profile <profile>)
Terraform >= 1.6
Make
Slack workspace with AWS Chatbot OAuth completed (one-time manual step — see HOW-TO-USE.md)
CloudTrail trail already enabled (or set create_cloudtrail = true)
Inputs
Variable
Description
Default
aws_region
Deployment region
us-east-1
account_name
Human-readable name in alert messages
required
alert_email
Email for SNS subscriptions
required
slack_workspace_id
Slack workspace ID for Chatbot
required
slack_channel_id
Slack channel for CRITICAL/WARNING alerts
required
slack_channel_id_info
Slack channel for INFO alerts
same as above
create_cloudtrail
Create a new trail if one doesn't exist
false
cloudtrail_name
Name of existing or new trail
management-events
Outputs
Output
Description
sns_topic_arn
CRITICAL/WARNING SNS topic ARN
sns_topic_arn_info
INFO SNS topic ARN
lambda_function_name
Alert formatter function name
lambda_dlq_url
Dead Letter Queue URL
eventbridge_rule_arns
Map of all rule ARNs
Required IAM Permissions (deployer)
The identity running terraform apply needs:
cloudtrail:* (if create_cloudtrail = true)
events:*
lambda:*
iam:CreateRole, iam:PutRolePolicy, iam:AttachRolePolicy, iam:PassRole
sns:*
sqs:*
kms:*
chatbot:*
logs:*
s3:* (on the state bucket and trail log bucket)
dynamodb:* (on the lock table)
Real-time AWS security event monitoring. Six EventBridge rules watch for 10 high-signal CloudTrail events and fire a Lambda within seconds. The Lambda enriches and routes alerts to SNS → email + Slack via AWS Chatbot.