/dx-automation:auto-alarms [--email [email protected]]from dx-automation
Creates CloudWatch alarms (DLQ depth, Lambda errors, throttles) and SNS email subscription for AI automation monitoring. Reads config from .ai/automation/infra.json.
Ships in dx-automation. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You create CloudWatch alarms and subscribe an email address to alerts. Wraps lambda/cloudwatch/setup-alarms.sh with audit logging.
Read .ai/automation/infra.json. Check automationProfile:
consumer (or legacy pr-only/pr-delegation): "This repo uses the consumer profile — CloudWatch alarms are managed by the hub project. Do NOT configure alarms from this repo." STOP.source .ai/lib/audit.sh
export AUDIT_LOG_PREFIX=infra
Confirm monitoring config from infra.json:
monitoring.snsTopic.name — SNS topic name (<prefix>-alerts)regionIf user passed --email <address>, use it. Otherwise ask:
Alert email address? CloudWatch alarms will notify this email for DLQ depth, Lambda errors, and throttles. You'll need to confirm the subscription in your email.
cd .ai/automation
bash lambda/cloudwatch/setup-alarms.sh --email "<email>"
The script:
<prefix>-alerts (idempotent)lambda/cloudwatch/alarms.json, prefixes with resource prefix from infra.json)Report the script's output.
After the script runs, the SNS topic ARN is returned. Update infra.json:
monitoring.snsTopic.arn → the created/retrieved ARN## CloudWatch Monitoring Configured
**SNS topic:** <prefix>-alerts
**Alert email:** <email> (confirm subscription in your inbox)
| Alarm | Trigger | Severity |
|-------|---------|----------|
| <prefix>-dlq-depth | DLQ > 5 messages | Warning |
| <prefix>-lambda-errors-wi-router | WI-Router Lambda errors > 3/hour | Critical |
| <prefix>-lambda-errors-pr-router | PR-Router Lambda errors > 3/hour | Critical |
| <prefix>-lambda-throttles | Any Lambda throttled | Warning |
**infra.json** updated with SNS ARN.
**Audit log:** `.ai/logs/infra.<week>.jsonl`
### Next step
`/auto-test --dryRun` — Verify end-to-end (local dry run)
### Operational commands
- `/auto-status` — Current DLQ depth, token budget, rate limits
- `/auto-doctor` — Full health check
- See `docs/runbook.md` for alert response procedures
infra.json updated with SNS topic ARN/auto-alarms — Reads infra.json for resource prefix and SNS topic ARN. Creates 4 CloudWatch alarms: DLQ depth > 0, WI-Router errors > 5/min, PR-Router errors > 5/min, Lambda throttles > 0. Subscribes the configured email to the SNS topic. Reminds user to confirm the SNS subscription via email.
/auto-alarms [email protected] — Creates all 4 alarms and subscribes [email protected] to the SNS alert topic. Reports each alarm name and threshold. Prints reminder to check inbox for subscription confirmation.
/auto-alarms (re-run, alarms exist) — put-metric-alarm is idempotent — overwrites existing alarms with current thresholds. SNS create-topic returns the existing topic ARN. subscribe is also idempotent if the email is already subscribed. Reports all alarms as configured.
"SNS subscription confirmation not received"
Cause: The confirmation email may have gone to spam, or the email address was incorrect.
Fix: Check the spam folder. If not found, re-run /auto-alarms with the correct email — SNS will resend the confirmation. The subscription won't be active until confirmed.
Alarms not triggering despite errors
Cause: The alarm metric namespace or dimensions don't match the Lambda function names.
Fix: Verify that the function names in infra.json match the actual Lambda function names in AWS. The alarms use FunctionName dimension to filter metrics.
"Access denied" when creating alarms
Cause: The AWS credentials lack CloudWatch or SNS permissions.
Fix: Ensure the IAM user has cloudwatch:PutMetricAlarm, sns:CreateTopic, and sns:Subscribe permissions.
aws_resource wrapperWhat SKILL.md sets; muted values are Claude Code's defaults
Use when setting up CloudWatch monitoring for AI automation, when the user says 'create alarms', 'set up monitoring', 'configure alerts', or 'add SNS notifications' for the automation pipeline.
Three short reads, in order
npx claudepluginhub easingthemes/dx-aem-flow --plugin dx-automation10 skills in this plugin
/auto-deployDeploy Lambda code for AI automation agents (wi-router and/or pr-router). Packages agent steps + shared libs into a zip and uploads to AWS Lambda. Safe to re-run after code changes. Reads function names from .ai/automation/infra.json./auto-doctorHealth check of the AI automation setup — local files, ADO pipeline configuration, Lambda state. Use when automation seems broken, for 'check automation'./auto-initScaffold AI automation for a project — sets up .ai/automation/ and infra.json; each project owns its pipelines (and optional AWS infra). Run once after /dx-init./auto-lambda-envSet environment variables on AI automation Lambda functions. Interactively collects secrets and operational values, then applies them via AWS CLI. Reads function names and pre-filled values from .ai/automation/infra.json./auto-pipelinesImport ADO pipelines for enabled AI automation agents and set all required pipeline variables. Imports all enabled pipelines — each project is self-contained. Reads config from .ai/automation/infra.json./auto-provisionCreate all AWS resources for AI automation agents — DynamoDB tables, SQS queue, S3 bucket, SNS topic, IAM role, Lambda functions, and API Gateway. Reads config from .ai/automation/infra.json. Idempotent — skips already-existing resources.