DynamoDB — alert on throttled-request rate
DynamoDB starts throttling (hot key or low write capacity) — your app gets ProvisionedThroughputExceededException, but AWS alarms only fire on a 5-minute aggregate.
Recipe
#!/usr/bin/env bash
# /etc/cron.d/ddb-throttle
# */1 * * * * root /opt/ddb-throttle.sh
TABLE=${DDB_TABLE}
REGION=${AWS_REGION:-us-east-1}
THRESH=${THRESH:-50} # throttled events / 60 s
# Last 60 s of ThrottledRequests
COUNT=$(aws cloudwatch get-metric-statistics \
--region "$REGION" \
--namespace AWS/DynamoDB \
--metric-name ThrottledRequests \
--dimensions Name=TableName,Value="$TABLE" \
--statistics Sum \
--start-time "$(date -u -d '60 seconds ago' --iso-8601=seconds)" \
--end-time "$(date -u --iso-8601=seconds)" \
--period 60 \
--output text --query 'Datapoints[0].Sum')
COUNT=${COUNT:-0}
COUNT=${COUNT%.*}
if [ "$COUNT" -gt "$THRESH" ]; then
curl -fsS "$HEARTBEAT_URL" --data "throttled=$COUNT,table=$TABLE"
exit 2
fi
echo "OK ($COUNT throttled / 60s)"
Same thing in Enterno.io
Replace the CloudWatch alarm → SNS → email route with an Enterno heartbeat on a 1-minute schedule — 60-s reaction time instead of 5-min, history inline with the rest of your services.
Related recipes
A release bumped the bundle size and p99 cold-start went from 800ms to 3s. The metric is in CloudWatch, but nobody’s watching. Want a heartbeat-style alert.
A CloudFront distribution started serving 5xx 4 % of the time — far-region clients see broken pages. CloudWatch graph exists; dashboard goes unwatched.
Main SQS queue is processing fine, but the DLQ silently grows — some messages fail 3 attempts and end up there. Nobody looks at the DLQ until it's a thousand deep.