Skip to content

Instantly share code, notes, and snippets.

@Pelirrojo
Created October 30, 2024 14:28
Show Gist options
  • Save Pelirrojo/88807058e58bfae488e3ad7dcb104cd8 to your computer and use it in GitHub Desktop.
Save Pelirrojo/88807058e58bfae488e3ad7dcb104cd8 to your computer and use it in GitHub Desktop.
Monitoring the Mitigation
# A vantablack friday: How to be prepared to stop DDoS Attacks after Halloween
# https://blog.evereven.tech
# Create a local json file with the configuration
cat > dashboard.json << 'EOL'
{
"widgets": [
{
"type": "metric",
"properties": {
"metrics": [
["AWS/WAF", "BlockedRequests", "WebACL", "MyWebACL"],
["AWS/WAF", "AllowedRequests", "WebACL", "MyWebACL"]
],
"period": 60,
"stat": "Sum",
"region": "your-region",
"title": "WAF Requests"
}
}
]
}
EOL
# Create the dashboard
aws cloudwatch put-dashboard --dashboard-name WAF-Dashboard --dashboard-body file://dashboard.json
# Visible at:
# https://us-west-2.console.aws.amazon.com/cloudwatch/home?#dashboards/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment