Skip to content

Instantly share code, notes, and snippets.

@Pelirrojo
Created October 30, 2024 14:42
Show Gist options
  • Save Pelirrojo/d45e22cd73c4e8ef4abe558763a8e54f to your computer and use it in GitHub Desktop.
Save Pelirrojo/d45e22cd73c4e8ef4abe558763a8e54f to your computer and use it in GitHub Desktop.
Phase 0 | Initial Detection with CloudWatch Alarms
# A vantablack friday: How to be prepared to stop DDoS Attacks after Halloween
# https://blog.evereven.tech
# Create a cloudwatch alarm
aws cloudwatch put-metric-alarm \
--alarm-name High-CPU-Utilization \
--metric-name CPUUtilization \
--namespace AWS/EC2 \
--period 300 \
--evaluation-periods 1 \
--threshold 70.0 \
--comparison-operator GreaterThanThreshold \
--statistic Average
# Visible at
# https://us-west-2.console.aws.amazon.com/cloudwatch/home?region=us-west-2#alarmsV2:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment