[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A4C7BPAEZ6G3MN2YPCFZHQ":3,"skill-same:01M7A4C7BPAEZ6G3MN2YPCFZHQ":150},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":45,"repositoryHtmlUrl":46,"repositoryHomepageUrl":6,"ownerHtmlUrl":47,"ownerBlogUrl":6,"ownerDescription":48,"updatedAt":49,"install":50,"resources":63},"01M7A4C7BPAEZ6G3MN2YPCFZHQ","certificate-renewal-automator",null,"Designs and implements ACM certificate renewal automation pipelines. Detects expiring certificates via CloudWatch alarms on DaysToExpiry, wires EventBridge scheduled rules for daily cert scans, deploys Lambda functions that request new certificates, validate DNS via Route 53 CNAME records, update ALB\u002FNLB listeners, rotate API Gateway custom domain certificates, and update CloudFront distributions. Covers private CA (ACM PCA) lifecycle, cross-account cert sharing via IAM, SNI verification, wildcard vs SAN renewal, exported-private-key manual renewal, and CloudTrail audit. Emits AUTOMATION_DEPLOYED with a full IaC template or REVIEW_REQUIRED with the specific gap.","jhkchan\u002Faws-agent-skills","jhkchan","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1083902?v=4","01M7A2SVQYP9GQTPTDXP5JKYQ4","Jacky Chan","01M7A2SVS117YWCTZABB75HZR1",4,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcertificate-renewal-automator\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: certificate-renewal-automator\ndescription: Designs and implements ACM certificate renewal automation pipelines. Detects expiring certificates via CloudWatch alarms on DaysToExpiry, wires EventBridge scheduled rules for daily cert scans, deploys Lambda functions that request new certificates, validate DNS via Route 53 CNAME records, update ALB\u002FNLB listeners, rotate API Gateway custom domain certificates, and update CloudFront distributions. Covers private CA (ACM PCA) lifecycle, cross-account cert sharing via IAM, SNI verification, wildcard vs SAN renewal, exported-private-key manual renewal, and CloudTrail audit. Emits AUTOMATION_DEPLOYED with a full IaC template or REVIEW_REQUIRED with the specific gap.\nlicense: Apache-2.0\ncompatibility: Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). No AWS CLI required for offline workflow design. Live deployment uses aws acm describe-certificates, request-certificate, get-certificate, aws acm-pca issue-certificate, aws elbv2 modify-listener, aws apigateway update-domain-name, aws cloudfront update-distribution, aws route53 change-resource-record-sets, aws events put-rule\u002Fput-targets, aws lambda create-function — AWS CLI v2.\nmetadata:\n  domain: aws-cloudops\n  complexity: high\n  requires_llm: 'true'\n  phase: '4'\n  supports_pipeline: 'true'\n  family: Security\n  task_type: automate\n  skill_class: capability\n  lifecycle_status: active\n  verdict_shape: AUTOMATION_DEPLOYED | REVIEW_REQUIRED\n  when_to_use: Building ACM certificate renewal automation, wiring CloudWatch alarms for cert expiry, deploying EventBridge + Lambda renewal pipelines, managing PCA certificate lifecycles, rotating certs on ALB\u002FNLB\u002FCloudFront\u002FAPI Gateway, or auditing cert API calls.\n  activation_triggers: automate certificate renewal, ACM expiry alarm, DaysToExpiry CloudWatch, certificate rotation Lambda, DNS validation Route 53, ACM PCA lifecycle, ALB listener certificate update, CloudFront certificate renewal, API Gateway custom domain cert, SNI verification, cross-account certificate sharing\n  invocation_schema: 'Input: either (a) a list of ACM certificate ARNs with associated services and renewal status, OR (b) a cert renewal automation requirement. Output: deterministic RENEWAL block per certificate — DETECTION\u002FRENEWAL_FLOW\u002FVALIDATION\u002FNOTIFICATION\u002FAUDIT\u002FVERDICT — where VERDICT is AUTOMATION_DEPLOYED or REVIEW_REQUIRED.'\n  version: 0.1.0\n  author: Jacky Chan — AWS Community Builder\n  keywords: ACM, certificate renewal, DaysToExpiry, CloudWatch alarm, EventBridge scheduled rule, Lambda renewal, DNS validation, Route 53 CNAME, ACM PCA, ALB listener certificate, CloudFront distribution, API Gateway custom domain, SNI verification, wildcard certificate, SAN certificate, CloudTrail audit\n  tags: aws-acm, certificate-renewal, tls, security, cloudwatch, eventbridge, lambda, automate\n---\n\n# Certificate Renewal Automator\n\n## Mindset\n\n**One-line takeaway:** every certificate renewal pipeline is a\nfive-stage chain — **detect** (CloudWatch DaysToExpiry alarm) →\n**trigger** (EventBridge scheduled scan) → **renew** (ACM managed\nrenewal or Lambda custom flow) → **validate** (DNS CNAME in Route 53)\n→ **verify** (SNI check + listener\u002Fdistribution update confirmation).\nA gap in ANY stage produces a silent expiry.\n\n- **ACM managed renewal is NOT universal.** It covers only\n  DNS\u002Femail-validated certs attached to supported services (ALB, NLB,\n  CloudFront, API Gateway). Exported private keys, orphaned certs, and\n  PCA-exported certs require manual or custom renewal.\n- **PCA-managed certs have a separate lifecycle.** The CA cert itself\n  has its own renewal path — two renewal pipelines, not one.\n- **DNS validation is the only path to zero-touch renewal.** Email\n  validation requires human interaction on every renewal.\n\n## Quick navigation\n\n| You want to... | Go to |\n|---|---|\n| Detect expiring certs | Step 2 (CloudWatch alarm) |\n| Wire daily cert scan | Step 3 (EventBridge) |\n| Build Lambda renewal | Step 4 (renewal flow) |\n| Automate DNS validation | Step 5 (Route 53 CNAME) |\n| Rotate ALB\u002FNLB certs | Step 6 (listener rotation) |\n| Rotate CloudFront certs | Step 7 (distribution update) |\n| Handle API Gateway domains | Step 8 (API GW rotation) |\n| Manage PCA private certs | Step 9 (PCA lifecycle) |\n| Share certs cross-account | Step 10 (cross-account IAM) |\n| Verify renewal via SNI | Step 11 (SNI check) |\n| Audit cert API calls | Step 12 (CloudTrail) |\n\n## Critical rules at a glance\n\n1. **ACM managed renewal fires at 60 days pre-expiry for DNS-validated\n   certs attached to a supported service.** If not attached (orphaned),\n   ACM does NOT renew. Always verify cert-to-resource association.\n2. **Exported private-key certs cannot auto-renew.** ACM has no stored\n   private key. Renewal requires re-import. REVIEW_REQUIRED by default.\n3. **PCA CA cert renewal is separate from end-cert renewal.** An\n   expiring CA breaks ALL certs it issues, regardless of their own\n   expiry.\n4. **CloudFront certs must be in us-east-1.** Any other region silently\n   fails the distribution update.\n5. **DNS validation CNAME records must persist for the cert's lifetime.**\n   Deleting them after issuance breaks managed renewal silently.\n\n## Pre-flight: data requirements\n\n| Input | Source | Why |\n|---|---|---|\n| Cert ARN + domain | `acm describe-certificates` | Renewal target |\n| Status + validation method | `DomainValidationOptions` | Drives renewal path |\n| Associated service | `InUseBy[]` | Managed vs manual |\n| DaysToExpiry metric | CloudWatch `AWS\u002FCertificateManager` | Detection |\n| Route 53 hosted zone | `route53 list-hosted-zones` | DNS validation |\n| PCA CA ARN | `acm-pca list-certificate-authorities` | Private CA lifecycle |\n\n## Process — Renewal pipeline design\n\n### Step 0: Expert knowledge — non-obvious ACM + PCA behaviors\n\nAll Step 0 behaviors moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand when classifying non-obvious ACM\u002FPCA behaviors (60-day window, InUseBy, wildcards\u002FSAN, SNI, idempotency).\n\n### Step 1: Classify the certificate\n\n| Cert class | Validation | Attached | Renewal path |\n|---|---|---|---|\n| Public ACM | DNS | ALB\u002FNLB\u002FCF\u002FAPI GW | **Managed** (automatic) |\n| Public ACM | DNS | Orphaned | **Custom pipeline** (re-associate or manual) |\n| Public ACM | Email | Supported service | **Semi-manual** (email approval) |\n| Imported | N\u002FA | Any | **Manual** (re-import) |\n| PCA-issued via ACM | DNS | ALB\u002FNLB\u002FAPI GW | **Custom pipeline** |\n| PCA-exported | N\u002FA | On-prem\u002FIoT | **Full manual pipeline** |\n\nImported certs (private key) are REVIEW_REQUIRED by construction.\n\n### Step 2: CloudWatch alarm on DaysToExpiry\n\n```bash\naws cloudwatch put-metric-alarm \\\n  --alarm-name acm-cert-expiring-30-days \\\n  --namespace AWS\u002FCertificateManager \\\n  --metric-name DaysToExpiry \\\n  --dimensions Name=CertificateArn,Value=arn:aws:acm:us-east-1:111111111111:certificate\u002Fabc-123 \\\n  --statistic Minimum --period 86400 --threshold 30 \\\n  --comparison-operator LessThanThreshold --evaluation-periods 1 \\\n  --alarm-actions arn:aws:sns:us-east-1:111111111111:cert-expiry-alerts\n```\n\nFleet-wide alarm variant moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand when wiring detection across the whole cert fleet.\n\n**Threshold matrix:**\n\n| Threshold | Purpose | Action |\n|---|---|---|\n| 45 days | Early warning | Notify Slack; verify managed renewal will fire |\n| 30 days | Action required | If managed renewal hasn't fired, investigate |\n| 14 days | Urgent | Manual renewal path; engage on-call |\n| 7 days | Critical | Page on-call; exec escalation |\n\nThe metric updates once daily. PENDING_VALIDATION and EXPIRED certs do\nNOT emit this metric. A fleet-wide alarm identifies that SOME cert is\nexpiring but not WHICH — pair with the scan Lambda.\n\n### Step 3: EventBridge daily cert scan\n\n```bash\naws events put-rule \\\n  --name acm-daily-cert-scan \\\n  --schedule-expression \"rate(1 day)\" --state ENABLED\n\naws events put-targets \\\n  --rule acm-daily-cert-scan \\\n  --targets '[{\"Id\":\"cert-scan-lambda\",\"Arn\":\"arn:aws:lambda:us-east-1:111111111111:function:acm-cert-scan\",\"DeadLetterConfig\":{\"Arn\":\"arn:aws:sqs:us-east-1:111111111111:cert-scan-dlq\"}}]'\n```\n\nCert-scan Lambda implementation moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md).\nLoad on demand when deploying the EventBridge scan target (the risk table below stays).\n\n| Risk | Criteria | Action |\n|---|---|---|\n| CRITICAL | \u003C 7 days | Page on-call |\n| HIGH | \u003C 30 days AND INELIGIBLE | Manual renewal |\n| MEDIUM | \u003C 45 days AND orphaned | Re-associate or delete |\n| LOW | \u003C 60 days, managed renewal should fire | Verify status |\n| OK | >= 60 days AND ELIGIBLE | No action |\n\n### Step 4: Lambda renewal function (custom renewal flow)\n\nFor certs requiring custom renewal (orphaned, imported, PCA-issued):\n\nFull `renew_certificate` implementation moved verbatim to [references\u002Facm-renewal-paths.md](references\u002Facm-renewal-paths.md) (Path 2: custom renewal pipeline).\nLoad on demand when emitting the custom renewal function (the decision tree below stays).\n\n**Renewal flow decision tree:**\n\n```\nDNS-validated + attached to supported service?\n├─ Yes → ACM managed renewal. Verify RenewalEligibility = ELIGIBLE.\n└─ No → Custom pipeline: request → validate → attach → verify.\n    If imported → MANUAL re-import flow.\n    If PCA-issued → issue from PCA + validate + attach.\n```\n\n### Step 5: DNS validation via Route 53\n\n```bash\naws acm describe-certificate \\\n  --certificate-arn arn:aws:acm:us-east-1:111111111111:certificate\u002Fabc-123 \\\n  --query 'Certificate.DomainValidationOptions[].ResourceRecord'\n\naws route53 change-resource-record-sets \\\n  --hosted-zone-id Z1ABCDEF23456 \\\n  --change-batch '{\"Changes\":[{\"Action\":\"UPSERT\",\"ResourceRecordSet\":{\n    \"Name\":\"_abc123.example.com.\",\"Type\":\"CNAME\",\"TTL\":300,\n    \"ResourceRecords\":[{\"Value\":\"_xyz789.acm-validations.aws.\"}]\n  }}]}'\n```\n\n**Wildcard and SAN:** A wildcard cert (`*.example.com`) needs ONE CNAME.\nA SAN cert needs ONE CNAME PER domain. A SAN combining `example.com` +\n`*.example.com` needs TWO CNAMEs.\n\n**Common DNS validation failures:**\n\nTable moved verbatim to [references\u002Ferror-handling.md](references\u002Ferror-handling.md).\nLoad on demand when DNS validation stalls or renewal fails later.\n\n### Step 6: ALB\u002FNLB listener certificate rotation\n\nFor managed renewal, the listener automatically uses the renewed cert\n(ARN unchanged). For custom rotation (new ARN):\n\n```bash\n# Single cert\naws elbv2 modify-listener \\\n  --listener-arn arn:aws:elasticloadbalancing:us-east-1:111111111111:listener\u002Fapp\u002Fmy-alb\u002Fabc\u002Fdef \\\n  --certificates CertificateArn=arn:aws:acm:us-east-1:111111111111:certificate\u002Fnew-abc\n\n# SNI (multiple certs — FIRST is default)\naws elbv2 modify-listener \\\n  --listener-arn arn:aws:elasticloadbalancing:us-east-1:111111111111:listener\u002Fapp\u002Fmy-alb\u002Fabc\u002Fdef \\\n  --certificates \\\n    CertificateArn=arn:aws:acm:us-east-1:111111111111:certificate\u002Fdefault-abc \\\n    CertificateArn=arn:aws:acm:us-east-1:111111111111:certificate\u002Fsni-www-def \\\n    CertificateArn=arn:aws:acm:us-east-1:111111111111:certificate\u002Fsni-api-ghi\n```\n\n**NEVER** replace the entire cert list without preserving SNI order.\nUse `add-listener-certificates` to add the new cert, verify, then\n`remove-listener-certificates` to remove the old one.\n\n### Step 7: CloudFront distribution certificate update\n\n```bash\naws cloudfront update-distribution \\\n  --id E1ABCDEF23456 --if-match ETVWXYZ \\\n  --distribution-config '{\"CallerReference\":\"rotation-001\",...,\n    \"ViewerCertificate\":{\n      \"CloudFrontDefaultCertificate\":false,\n      \"ACMCertificateArn\":\"arn:aws:acm:us-east-1:111111111111:certificate\u002Fnew-cert\",\n      \"SSLSupportMethod\":\"sni-only\",\n      \"MinimumProtocolVersion\":\"TLSv1.2_2021\"}}'\n```\n\n**Rules:** Fetch current ETag via `get-distribution` first. `CallerReference`\nmust be unique per update. Propagation takes 5-60 min — check for\n`Status: Deployed`. Cert MUST be in us-east-1.\n\n### Step 8: API Gateway custom domain rotation\n\n```bash\n# REST API (v1)\naws apigateway update-domain-name \\\n  --domain-name api.example.com \\\n  --patch-operations op=replace,path=\u002FcertificateArn,value=arn:aws:acm:us-east-1:111111111111:certificate\u002Fnew\n\n# HTTP API (v2)\naws apigatewayv2 update-domain-name \\\n  --domain-name api.example.com --domain-name-id abc123 \\\n  --domain-name-configurations CertificateArn=arn:aws:acm:us-east-1:111111111111:certificate\u002Fnew\n```\n\nEdge-optimized APIs require us-east-1 certs. Regional APIs require\nsame-region certs. API mappings are independent of cert rotation.\n\n### Step 9: ACM PCA private certificate lifecycle\n\n```bash\n# Check CA validity\naws acm-pca describe-certificate-authority \\\n  --certificate-authority-arn arn:aws:acm-pca:us-east-1:111111111111:certificate-authority\u002Fabc \\\n  --query 'CertificateAuthority.{Status:Status,NotAfter:NotAfter}'\n\n# Issue new end-certificate\naws acm-pca issue-certificate \\\n  --certificate-authority-arn arn:aws:acm-pca:us-east-1:111111111111:certificate-authority\u002Fabc \\\n  --csr file:\u002F\u002Fcsr.pem --signing-algorithm SHA256WITHRSA \\\n  --validity Value=365,Type=DAYS --idempotency-token pca-renewal-001\n```\n\n**PCA gotchas:** PCA-issued certs via ACM CAN be managed-renewed IF\nattached to a supported service and the CA is active. PCA-exported\ncerts have no managed renewal. The CA itself has a validity period (1-10\nyears subordinate, up to 25 root) and must be renewed manually.\n\n### Step 10: Cross-account certificate sharing\n\nCloudFront auto-shares us-east-1 certs across the org. ALB\u002FNLB\u002FAPI\nGateway do NOT support cross-account certs — request separately in each\naccount.\n\nConsumer IAM role needs:\n\n```json\n{\"Effect\":\"Allow\",\"Action\":[\"acm:GetCertificate\",\"acm:DescribeCertificate\"],\n \"Resource\":\"arn:aws:acm:us-east-1:111111111111:certificate\u002F*\"}\n```\n\n### Step 11: SNI verification\n\n```bash\nopenssl s_client -connect my-alb-123.us-east-1.elb.amazonaws.com:443 \\\n  -servername www.example.com \u003C\u002Fdev\u002Fnull 2>\u002Fdev\u002Fnull | openssl x509 -noout -subject -dates\n```\n\nThe `notAfter` must reflect the NEW cert. If it shows the old cert's\nexpiry, propagation is incomplete — wait and retry.\n\n### Step 12: CloudTrail audit\n\nCloudTrail lookup + anomaly-metric-filter commands moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md).\nLoad on demand when auditing cert API calls (Step 12).\n\n## STRICT output contract\n\nEvery renewal design MUST emit a single block using these literal labels, in\nthis order. Do NOT substitute markdown headings or camelCase variants —\nassertion-based evals and downstream automation parse the literal labels\n`CERTIFICATE:`, `VERDICT:`, `CHECKLIST:`, `GAP:`, `TEMPLATE:`.\n\n```text\nCERTIFICATE: \u003Ccertificate-arn>\nVERDICT: AUTOMATION_DEPLOYED | REVIEW_REQUIRED\nCHECKLIST:\n  [x] DaysToExpiry: \u003Ccountdown> (NotBefore \u003CYYYY-MM-DD>, NotAfter \u003CYYYY-MM-DD>)\n  [x] Renewal method: ACM_AUTO | MANUAL_REIMPORT | PCA_ISSUE | EMAIL_APPROVAL | CUSTOM_PIPELINE\n  [x] RenewalEligibility: ELIGIBLE | INELIGIBLE\n  [x] DNS validation: VALIDATED | PENDING | FAILED | N\u002FA (CNAME \u003Crecord> -> \u003Ctarget>)\n  [x] InUseBy: ALB \u003Carn> | CloudFront \u003Cdist-id> | API Gateway \u003Cdomain> | ORPHANED\n  [x] RenewalStatus: PENDING_AUTO_RENEWAL | IN_PROGRESS | SUCCESS | FAILED\n  [x] Detection: CloudWatch DaysToExpiry \u003C \u003Cthreshold> + EventBridge scan rate(1 day)\nGAP: \u003Cif REVIEW_REQUIRED, the specific gap and remediation>\nTEMPLATE: \u003CCLI snippet or YAML; \"(held in draft)\" if blocked>\n```\n\n### FORBIDDEN output patterns — NEVER\n\n1. NEVER emit `VERDICT: AUTOMATION_DEPLOYED` while any CHECKLIST item is\n   `[ ]` (unchecked). Any unmet requirement forces `REVIEW_REQUIRED`.\n\n2. NEVER claim `Renewal method: ACM_AUTO` for an imported (private-key)\n   cert. ACM holds no stored private key — those are `MANUAL_REIMPORT` by\n   construction, regardless of `RenewalEligibility`.\n\n3. NEVER report a renewal as complete without a fresh SNI check\n   (`openssl s_client -servername \u003Cdomain> -connect \u003Cendpoint>:443`)\n   showing the new `notAfter`. CloudFront propagation is 5-60 min; ALB\n   is immediate but verify anyway.\n\n4. NEVER report `DNS validation: VALIDATED` unless the CNAME\n   (`_abc.www.example.com -> _xyz.acm-validations.aws.`) is still\n   resolvable via `dig`. A deleted CNAME silently breaks the next\n   managed renewal even when the cert is currently `ISSUED`.\n\n5. NEVER emit a CloudFront renewal where the cert is outside `us-east-1`.\n   CloudFront silently ignores certs in any other region — the\n   distribution continues serving the old cert with no error.\n\n6. NEVER omit the `InUseBy` classification. An orphaned cert\n   (`InUseBy: []`) disables ACM managed renewal even when\n   `RenewalEligibility: ELIGIBLE`. Always classify explicitly.\n\n7. NEVER emit `DaysToExpiry` as a bare number — always pair it with the\n   detection wiring (CloudWatch alarm threshold + EventBridge scan). A\n   countdown with no alarm is noise, not automation.\n\n### Worked example — AUTOMATION_DEPLOYED (cert at 14 days, auto-renewal in progress)\n\n```text\nCERTIFICATE: arn:aws:acm:us-east-1:111111111111:certificate\u002Fabc-123-def-456\nVERDICT: AUTOMATION_DEPLOYED\nCHECKLIST:\n  [x] DaysToExpiry: 14 (NotBefore 2025-08-11, NotAfter 2026-08-26; managed-renewal window opened at 60d on 2026-06-27)\n  [x] Renewal method: ACM_AUTO (DNS-validated cert attached to ALB — managed renewal path)\n  [x] RenewalEligibility: ELIGIBLE\n  [x] DNS validation: VALIDATED (CNAME _abc123.www.example.com -> _xyz789.acm-validations.aws., TTL 300, dig confirmed)\n  [x] InUseBy: arn:aws:elasticloadbalancing:us-east-1:111111111111:listener\u002Fapp\u002Fprod-alb\u002Fabc\u002Fdef (ALB HTTPS :443, SNI default cert)\n  [x] RenewalStatus: PENDING_AUTO_RENEWAL (ACM has fired daily renewal attempts since 60d window; CNAME propagation delayed; EventBridge scan + CloudWatch alarm \u003C 30d both active)\n  [x] Detection: CloudWatch alarm acm-www-expiring-14d (DaysToExpiry \u003C 30, SNS arn:aws:sns:us-east-1:111111111111:cert-expiry-alerts) + EventBridge acm-daily-cert-scan rate(1 day)\nGAP: None\nTEMPLATE:\n  # CloudWatch alarm — urgent tier (\u003C 30 days) on the specific cert ARN\n  aws cloudwatch put-metric-alarm \\\n    --alarm-name acm-www-expiring-14d --namespace AWS\u002FCertificateManager \\\n    --metric-name DaysToExpiry \\\n    --dimensions Name=CertificateArn,Value=arn:aws:acm:us-east-1:111111111111:certificate\u002Fabc-123-def-456 \\\n    --statistic Minimum --period 86400 --threshold 30 --comparison-operator LessThanThreshold \\\n    --evaluation-periods 1 --alarm-actions arn:aws:sns:us-east-1:111111111111:cert-expiry-alerts\n\n  # EventBridge daily scan (catches gaps managed renewal cannot — orphaned, imported, PCA CA expiry)\n  aws events put-rule --name acm-daily-cert-scan --schedule-expression \"rate(1 day)\" --state ENABLED\n\n  # No re-import needed; managed renewal rotates the cert in place (ARN unchanged).\n  # Confirm renewal completion via SNI after RenewalStatus flips to SUCCESS:\n  openssl s_client -connect prod-alb-123.us-east-1.elb.amazonaws.com:443 -servername www.example.com \\\n    \u003C\u002Fdev\u002Fnull 2>\u002Fdev\u002Fnull | openssl x509 -noout -subject -dates\n```\n\n### Worked example — REVIEW_REQUIRED (imported orphaned cert)\nFull block moved verbatim to [references\u002Fworked-examples.md](references\u002Fworked-examples.md).\nLoad on demand when the verdict is REVIEW_REQUIRED (imported\u002Forphaned cert).\n\n### Decision tree — renewal path classification\n\n```\nStart: cert with DaysToExpiry ≤ 60\n├─ Imported cert (Status: ISSUED, RenewalEligibility: INELIGIBLE)?\n│   └─ Yes → MANUAL_REIMPORT → VERDICT: REVIEW_REQUIRED\n│            (external CA + aws acm import-certificate + re-attach)\n├─ RenewalEligibility = ELIGIBLE AND InUseBy ≠ []?\n│   ├─ Yes → Validation method?\n│   │       ├─ DNS + CNAME resolvable → ACM_AUTO → VERDICT: AUTOMATION_DEPLOYED\n│   │       │                           (verify SNI post-rotation)\n│   │       └─ DNS CNAME missing OR EMAIL → REVIEW_REQUIRED\n│   │                                     (fix CNAME or migrate EMAIL→DNS)\n│   └─ No (orphaned or INELIGIBLE) → go to next branch\n├─ PCA-issued via ACM (Status: ISSUED, CertificateAuthorityArn present)?\n│   ├─ CA Status = ACTIVE AND cert attached → ACM_AUTO with CA-health check\n│   └─ CA expired OR cert orphaned → REVIEW_REQUIRED (renew CA first)\n└─ PCA-exported (used outside AWS)?\n    └─ Full manual pipeline → REVIEW_REQUIRED (issue from PCA + export + ship)\n```\n\n## Anti-Patterns — NEVER do these\n\n- NEVER assume ACM managed renewal covers all certificates. It covers\n  ONLY DNS\u002Femail-validated certs attached to supported services. Always\n  check `RenewalEligibility`.\n\n- NEVER delete DNS validation CNAMEs after issuance. They must persist\n  for the cert's lifetime for ACM to re-validate during renewal.\n\n- NEVER request a new certificate without checking for existing ones.\n  `request-certificate` creates duplicates. Use `list-certificates` first.\n\n- NEVER put a CloudFront cert outside us-east-1. It silently fails.\n\n- NEVER update an ALB listener cert list without preserving SNI order.\n  `modify-listener --certificates` REPLACES the entire list.\n\n- NEVER use email validation for new certificates. It requires human\n  action on every renewal. Use DNS validation.\n\n- NEVER forget PCA CA expiry. An expired CA breaks all certs it issued\n  even if end-certs haven't reached their own expiry. Check CA\n  `NotAfter` 90+ days in advance.\n\n- NEVER update a CloudFront distribution with a stale ETag. It fails\n  silently. Always `get-distribution` for the current ETag first.\n\n- NEVER omit the DLQ on the EventBridge cert-scan target. Without a\n  DLQ, failed scans are silently dropped.\n\n- NEVER skip SNI verification after rotation. The config may show the\n  new cert but the TLS handshake may still serve the old cert during\n  propagation.\n\n- NEVER share certs cross-account for ALB\u002FNLB. They require same-account\n  certs. Request separately in each account.\n\n- NEVER rotate all certs simultaneously. Rotate one, verify, then\n  proceed. A batch failure leaves the fleet inconsistent.\n\n- NEVER omit CloudTrail auditing. A compromised credential can\n  `delete-certificate` to disrupt renewal.\n\n## Pre-flight safety checks\n\n- **CONFIRMATION GATE** before any state-changing operation:\n  `CONFIRM: About to \u003Caction> for certificate \u003Cdomain> in account\n  \u003Caccount>. Proceed? (yes\u002Fno)`\n\n- **Back up configs:** Save listener\u002Fdistribution config before\n  modifying.\n\n- **Before production rotation:** verify new cert status is `issued`:\n  `aws acm describe-certificate --certificate-arn \u003Cnew> --query 'Certificate.Status'`\n\n- **Before deleting old cert:** verify `InUseBy` is `[]`.\n\n- **For PCA rotation:** verify CA is `ACTIVE`.\n\n## Appendix A — Renewal eligibility matrix\n\nMatrix moved verbatim to [references\u002Facm-renewal-paths.md](references\u002Facm-renewal-paths.md).\nLoad on demand for the full renewal-path classification.\n\n## Appendix B — Decision tree\nTree moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand for the condensed renewal-path decision logic (the main decision tree under STRICT output contract stays).\n\n## Appendix C — CloudFormation skeleton\nFull CloudFormation skeleton moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand when emitting IaC for the renewal pipeline.\n\n## Recent AWS features (2024-2026)\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand for 2024-2026 ACM\u002FPCA\u002FCloudFront feature coverage.\n\n## Expert heuristic: renewal coverage gap\n\nHeuristic + verification protocol moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand when deciding detection depth for a cert fleet.\n\n## References (load on demand)\n\n- [references\u002Facm-renewal-paths.md](references\u002Facm-renewal-paths.md) — renewal-path CLI references; custom-pipeline Lambda implementation; renewal eligibility matrix.\n- [references\u002Fimported-cert-manual-renewal.md](references\u002Fimported-cert-manual-renewal.md) — manual re-import flow for imported private-key certs.\n- [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — Step 0 expert knowledge, appendices (decision tree, CloudFormation skeleton), 2024-2026 features, coverage-gap heuristic.\n- [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — cert-scan Lambda and CloudTrail audit commands.\n- [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — REVIEW_REQUIRED worked example (secondary).\n- [references\u002Ferror-handling.md](references\u002Ferror-handling.md) — DNS validation failure table.\n\n## Domain\n\nAWS CloudOps \u002F Security Automation — TLS certificate lifecycle.\n\n## AWS documentation\n\n- **ACM Managed Renewal** — https:\u002F\u002Fdocs.aws.amazon.com\u002Facm\u002Flatest\u002Fuserguide\u002Fmanaged-renewal.html\n- **ACM DNS Validation** — https:\u002F\u002Fdocs.aws.amazon.com\u002Facm\u002Flatest\u002Fuserguide\u002Fdns-validation.html\n- **AWS Private CA** — https:\u002F\u002Fdocs.aws.amazon.com\u002Facm-pca\u002Flatest\u002Fuserguide\u002FPcaWelcome.html\n- **CloudFront Viewer Certificates** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonCloudFront\u002Flatest\u002FDeveloperGuide\u002Fusing-https-alternate-domain-names.html\n- **ALB SNI** — https:\u002F\u002Fdocs.aws.amazon.com\u002Felasticloadbalancing\u002Flatest\u002Fapplication\u002Fcreate-https-listeners.html\n","# Certificate Renewal Automator\n\n## Mindset\n\n**One-line takeaway:** every certificate renewal pipeline is a\nfive-stage chain — **detect** (CloudWatch DaysToExpiry alarm) →\n**trigger** (EventBridge scheduled scan) → **renew** (ACM managed\nrenewal or Lambda custom flow) → **validate** (DNS CNAME in Route 53)\n→ **verify** (SNI check + listener\u002Fdistribution update confirmation).\nA gap in ANY stage produces a silent expiry.\n\n- **ACM managed renewal is NOT universal.** It covers only\n  DNS\u002Femail-validated certs attached to supported services (ALB, NLB,\n  CloudFront, API Gateway). Exported private keys, orphaned certs, and\n  PCA-exported certs require manual or custom renewal.\n- **PCA-managed certs have a separate lifecycle.** The CA cert itself\n  has its own renewal path — two renewal pipelines, not one.\n- **DNS validation is the only path to zero-touch renewal.** Email\n  validation requires human interaction on every renewal.\n\n## Quick navigation\n\n| You want to... | Go to |\n|---|---|\n| Detect expiring certs | Step 2 (CloudWatch alarm) |\n| Wire daily cert scan | Step 3 (EventBridge) |\n| Build Lambda renewal | Step 4 (renewal flow) |\n| Automate DNS validation | Step 5 (Route 53 CNAME) |\n| Rotate ALB\u002FNLB certs | Step 6 (listener rotation) |\n| Rotate CloudFront certs | Step 7 (distribution update) |\n| Handle API Gateway domains | Step 8 (API GW rotation) |\n| Manage PCA private certs | Step 9 (PCA lifecycle) |\n| Share certs cross-account | Step 10 (cross-account IAM) |\n| Verify renewal via SNI | Step 11 (SNI check) |\n| Audit cert API calls | Step 12 (CloudTrail) |\n\n## Critical rules at a glance\n\n1. **ACM managed renewal fires at 60 days pre-expiry for DNS-validated\n   certs attached to a supported service.** If not attached (orphaned),\n   ACM does NOT renew. Always verify cert-to-resource association.\n2. **Exported private-key certs cannot auto-renew.** ACM has no stored\n   private key. Renewal requires re-import. REVIEW_REQUIRED by default.\n3. **PCA CA cert renewal is separate from end-cert renewal.** An\n   expiring CA breaks ALL certs it issues, regardless of their own\n   expiry.\n4. **CloudFront certs must be in us-east-1.** Any other region silently\n   fails the distribution update.\n5. **DNS validation CNAME records must persist for the cert's lifetime.**\n   Deleting them after issuance breaks managed renewal silently.\n\n## Pre-flight: data requirements\n\n| Input | Source | Why |\n|---|---|---|\n| Cert ARN + domain | `acm describe-certificates` | Renewal target |\n| Status + validation method | `DomainValidationOptions` | Drives renewal path |\n| Associated service | `InUseBy[]` | Managed vs manual |\n| DaysToExpiry metric | CloudWatch `AWS\u002FCertificateManager` | Detection |\n| Route 53 hosted zone | `route53 list-hosted-zones` | DNS validation |\n| PCA CA ARN | `acm-pca list-certificate-authorities` | Private CA lifecycle |\n\n## Process — Renewal pipeline design\n\n### Step 0: Expert knowledge — non-obvious ACM + PCA behaviors\n\nAll Step 0 behaviors moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand when classifying non-obvious ACM\u002FPCA behaviors (60-day window, InUseBy, wildcards\u002FSAN, SNI, idempotency).\n\n### Step 1: Classify the certificate\n\n| Cert class | Validation | Attached | Renewal path |\n|---|---|---|---|\n| Public ACM | DNS | ALB\u002FNLB\u002FCF\u002FAPI GW | **Managed** (automatic) |\n| Public ACM | DNS | Orphaned | **Custom pipeline** (re-associate or manual) |\n| Public ACM | Email | Supported service | **Semi-manual** (email approval) |\n| Imported | N\u002FA | Any | **Manual** (re-import) |\n| PCA-issued via ACM | DNS | ALB\u002FNLB\u002FAPI GW | **Custom pipeline** |\n| PCA-exported | N\u002FA | On-prem\u002FIoT | **Full manual pipeline** |\n\nImported certs (private key) are REVIEW_REQUIRED by construction.\n\n### Step 2: CloudWatch alarm on DaysToExpiry\n\n```bash\naws cloudwatch put-metric-alarm \\\n  --alarm-name acm-cert-expiring-30-days \\\n  --namespace AWS\u002FCertificateManager \\\n  --metric-name DaysToExpiry \\\n  --dimensions Name=CertificateArn,Value=arn:aws:acm:us-east-1:111111111111:certificate\u002Fabc-123 \\\n  --statistic Minimum --period 86400 --threshold 30 \\\n  --comparison-operator LessThanThreshold --evaluation-periods 1 \\\n  --alarm-actions arn:aws:sns:us-east-1:111111111111:cert-expiry-alerts\n```\n\nFleet-wide alarm variant moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand when wiring detection across the whole cert fleet.\n\n**Threshold matrix:**\n\n| Threshold | Purpose | Action |\n|---|---|---|\n| 45 days | Early warning | Notify Slack; verify managed renewal will fire |\n| 30 days | Action required | If managed renewal hasn't fired, investigate |\n| 14 days | Urgent | Manual renewal path; engage on-call |\n| 7 days | Critical | Page on-call; exec escalation |\n\nThe metric updates once daily. PENDING_VALIDATION and EXPIRED certs do\nNOT emit this metric. A fleet-wide alarm identifies that SOME cert is\nexpiring but not WHICH — pair with the scan Lambda.\n\n### Step 3: EventBridge daily cert scan\n\n```bash\naws events put-rule \\\n  --name acm-daily-cert-scan \\\n  --schedule-expression \"rate(1 day)\" --state ENABLED\n\naws events put-targets \\\n  --rule acm-daily-cert-scan \\\n  --targets '[{\"Id\":\"cert-scan-lambda\",\"Arn\":\"arn:aws:lambda:us-east-1:111111111111:function:acm-cert-scan\",\"DeadLetterConfig\":{\"Arn\":\"arn:aws:sqs:us-east-1:111111111111:cert-scan-dlq\"}}]'\n```\n\nCert-scan Lambda implementation moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md).\nLoad on demand when deploying the EventBridge scan target (the risk table below stays).\n\n| Risk | Criteria | Action |\n|---|---|---|\n| CRITICAL | \u003C 7 days | Page on-call |\n| HIGH | \u003C 30 days AND INELIGIBLE | Manual renewal |\n| MEDIUM | \u003C 45 days AND orphaned | Re-associate or delete |\n| LOW | \u003C 60 days, managed renewal should fire | Verify status |\n| OK | >= 60 days AND ELIGIBLE | No action |\n\n### Step 4: Lambda renewal function (custom renewal flow)\n\nFor certs requiring custom renewal (orphaned, imported, PCA-issued):\n\nFull `renew_certificate` implementation moved verbatim to [references\u002Facm-renewal-paths.md](references\u002Facm-renewal-paths.md) (Path 2: custom renewal pipeline).\nLoad on demand when emitting the custom renewal function (the decision tree below stays).\n\n**Renewal flow decision tree:**\n\n```\nDNS-validated + attached to supported service?\n├─ Yes → ACM managed renewal. Verify RenewalEligibility = ELIGIBLE.\n└─ No → Custom pipeline: request → validate → attach → verify.\n    If imported → MANUAL re-import flow.\n    If PCA-issued → issue from PCA + validate + attach.\n```\n\n### Step 5: DNS validation via Route 53\n\n```bash\naws acm describe-certificate \\\n  --certificate-arn arn:aws:acm:us-east-1:111111111111:certificate\u002Fabc-123 \\\n  --query 'Certificate.DomainValidationOptions[].ResourceRecord'\n\naws route53 change-resource-record-sets \\\n  --hosted-zone-id Z1ABCDEF23456 \\\n  --change-batch '{\"Changes\":[{\"Action\":\"UPSERT\",\"ResourceRecordSet\":{\n    \"Name\":\"_abc123.example.com.\",\"Type\":\"CNAME\",\"TTL\":300,\n    \"ResourceRecords\":[{\"Value\":\"_xyz789.acm-validations.aws.\"}]\n  }}]}'\n```\n\n**Wildcard and SAN:** A wildcard cert (`*.example.com`) needs ONE CNAME.\nA SAN cert needs ONE CNAME PER domain. A SAN combining `example.com` +\n`*.example.com` needs TWO CNAMEs.\n\n**Common DNS validation failures:**\n\nTable moved verbatim to [references\u002Ferror-handling.md](references\u002Ferror-handling.md).\nLoad on demand when DNS validation stalls or renewal fails later.\n\n### Step 6: ALB\u002FNLB listener certificate rotation\n\nFor managed renewal, the listener automatically uses the renewed cert\n(ARN unchanged). For custom rotation (new ARN):\n\n```bash\n# Single cert\naws elbv2 modify-listener \\\n  --listener-arn arn:aws:elasticloadbalancing:us-east-1:111111111111:listener\u002Fapp\u002Fmy-alb\u002Fabc\u002Fdef \\\n  --certificates CertificateArn=arn:aws:acm:us-east-1:111111111111:certificate\u002Fnew-abc\n\n# SNI (multiple certs — FIRST is default)\naws elbv2 modify-listener \\\n  --listener-arn arn:aws:elasticloadbalancing:us-east-1:111111111111:listener\u002Fapp\u002Fmy-alb\u002Fabc\u002Fdef \\\n  --certificates \\\n    CertificateArn=arn:aws:acm:us-east-1:111111111111:certificate\u002Fdefault-abc \\\n    CertificateArn=arn:aws:acm:us-east-1:111111111111:certificate\u002Fsni-www-def \\\n    CertificateArn=arn:aws:acm:us-east-1:111111111111:certificate\u002Fsni-api-ghi\n```\n\n**NEVER** replace the entire cert list without preserving SNI order.\nUse `add-listener-certificates` to add the new cert, verify, then\n`remove-listener-certificates` to remove the old one.\n\n### Step 7: CloudFront distribution certificate update\n\n```bash\naws cloudfront update-distribution \\\n  --id E1ABCDEF23456 --if-match ETVWXYZ \\\n  --distribution-config '{\"CallerReference\":\"rotation-001\",...,\n    \"ViewerCertificate\":{\n      \"CloudFrontDefaultCertificate\":false,\n      \"ACMCertificateArn\":\"arn:aws:acm:us-east-1:111111111111:certificate\u002Fnew-cert\",\n      \"SSLSupportMethod\":\"sni-only\",\n      \"MinimumProtocolVersion\":\"TLSv1.2_2021\"}}'\n```\n\n**Rules:** Fetch current ETag via `get-distribution` first. `CallerReference`\nmust be unique per update. Propagation takes 5-60 min — check for\n`Status: Deployed`. Cert MUST be in us-east-1.\n\n### Step 8: API Gateway custom domain rotation\n\n```bash\n# REST API (v1)\naws apigateway update-domain-name \\\n  --domain-name api.example.com \\\n  --patch-operations op=replace,path=\u002FcertificateArn,value=arn:aws:acm:us-east-1:111111111111:certificate\u002Fnew\n\n# HTTP API (v2)\naws apigatewayv2 update-domain-name \\\n  --domain-name api.example.com --domain-name-id abc123 \\\n  --domain-name-configurations CertificateArn=arn:aws:acm:us-east-1:111111111111:certificate\u002Fnew\n```\n\nEdge-optimized APIs require us-east-1 certs. Regional APIs require\nsame-region certs. API mappings are independent of cert rotation.\n\n### Step 9: ACM PCA private certificate lifecycle\n\n```bash\n# Check CA validity\naws acm-pca describe-certificate-authority \\\n  --certificate-authority-arn arn:aws:acm-pca:us-east-1:111111111111:certificate-authority\u002Fabc \\\n  --query 'CertificateAuthority.{Status:Status,NotAfter:NotAfter}'\n\n# Issue new end-certificate\naws acm-pca issue-certificate \\\n  --certificate-authority-arn arn:aws:acm-pca:us-east-1:111111111111:certificate-authority\u002Fabc \\\n  --csr file:\u002F\u002Fcsr.pem --signing-algorithm SHA256WITHRSA \\\n  --validity Value=365,Type=DAYS --idempotency-token pca-renewal-001\n```\n\n**PCA gotchas:** PCA-issued certs via ACM CAN be managed-renewed IF\nattached to a supported service and the CA is active. PCA-exported\ncerts have no managed renewal. The CA itself has a validity period (1-10\nyears subordinate, up to 25 root) and must be renewed manually.\n\n### Step 10: Cross-account certificate sharing\n\nCloudFront auto-shares us-east-1 certs across the org. ALB\u002FNLB\u002FAPI\nGateway do NOT support cross-account certs — request separately in each\naccount.\n\nConsumer IAM role needs:\n\n```json\n{\"Effect\":\"Allow\",\"Action\":[\"acm:GetCertificate\",\"acm:DescribeCertificate\"],\n \"Resource\":\"arn:aws:acm:us-east-1:111111111111:certificate\u002F*\"}\n```\n\n### Step 11: SNI verification\n\n```bash\nopenssl s_client -connect my-alb-123.us-east-1.elb.amazonaws.com:443 \\\n  -servername www.example.com \u003C\u002Fdev\u002Fnull 2>\u002Fdev\u002Fnull | openssl x509 -noout -subject -dates\n```\n\nThe `notAfter` must reflect the NEW cert. If it shows the old cert's\nexpiry, propagation is incomplete — wait and retry.\n\n### Step 12: CloudTrail audit\n\nCloudTrail lookup + anomaly-metric-filter commands moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md).\nLoad on demand when auditing cert API calls (Step 12).\n\n## STRICT output contract\n\nEvery renewal design MUST emit a single block using these literal labels, in\nthis order. Do NOT substitute markdown headings or camelCase variants —\nassertion-based evals and downstream automation parse the literal labels\n`CERTIFICATE:`, `VERDICT:`, `CHECKLIST:`, `GAP:`, `TEMPLATE:`.\n\n```text\nCERTIFICATE: \u003Ccertificate-arn>\nVERDICT: AUTOMATION_DEPLOYED | REVIEW_REQUIRED\nCHECKLIST:\n  [x] DaysToExpiry: \u003Ccountdown> (NotBefore \u003CYYYY-MM-DD>, NotAfter \u003CYYYY-MM-DD>)\n  [x] Renewal method: ACM_AUTO | MANUAL_REIMPORT | PCA_ISSUE | EMAIL_APPROVAL | CUSTOM_PIPELINE\n  [x] RenewalEligibility: ELIGIBLE | INELIGIBLE\n  [x] DNS validation: VALIDATED | PENDING | FAILED | N\u002FA (CNAME \u003Crecord> -> \u003Ctarget>)\n  [x] InUseBy: ALB \u003Carn> | CloudFront \u003Cdist-id> | API Gateway \u003Cdomain> | ORPHANED\n  [x] RenewalStatus: PENDING_AUTO_RENEWAL | IN_PROGRESS | SUCCESS | FAILED\n  [x] Detection: CloudWatch DaysToExpiry \u003C \u003Cthreshold> + EventBridge scan rate(1 day)\nGAP: \u003Cif REVIEW_REQUIRED, the specific gap and remediation>\nTEMPLATE: \u003CCLI snippet or YAML; \"(held in draft)\" if blocked>\n```\n\n### FORBIDDEN output patterns — NEVER\n\n1. NEVER emit `VERDICT: AUTOMATION_DEPLOYED` while any CHECKLIST item is\n   `[ ]` (unchecked). Any unmet requirement forces `REVIEW_REQUIRED`.\n\n2. NEVER claim `Renewal method: ACM_AUTO` for an imported (private-key)\n   cert. ACM holds no stored private key — those are `MANUAL_REIMPORT` by\n   construction, regardless of `RenewalEligibility`.\n\n3. NEVER report a renewal as complete without a fresh SNI check\n   (`openssl s_client -servername \u003Cdomain> -connect \u003Cendpoint>:443`)\n   showing the new `notAfter`. CloudFront propagation is 5-60 min; ALB\n   is immediate but verify anyway.\n\n4. NEVER report `DNS validation: VALIDATED` unless the CNAME\n   (`_abc.www.example.com -> _xyz.acm-validations.aws.`) is still\n   resolvable via `dig`. A deleted CNAME silently breaks the next\n   managed renewal even when the cert is currently `ISSUED`.\n\n5. NEVER emit a CloudFront renewal where the cert is outside `us-east-1`.\n   CloudFront silently ignores certs in any other region — the\n   distribution continues serving the old cert with no error.\n\n6. NEVER omit the `InUseBy` classification. An orphaned cert\n   (`InUseBy: []`) disables ACM managed renewal even when\n   `RenewalEligibility: ELIGIBLE`. Always classify explicitly.\n\n7. NEVER emit `DaysToExpiry` as a bare number — always pair it with the\n   detection wiring (CloudWatch alarm threshold + EventBridge scan). A\n   countdown with no alarm is noise, not automation.\n\n### Worked example — AUTOMATION_DEPLOYED (cert at 14 days, auto-renewal in progress)\n\n```text\nCERTIFICATE: arn:aws:acm:us-east-1:111111111111:certificate\u002Fabc-123-def-456\nVERDICT: AUTOMATION_DEPLOYED\nCHECKLIST:\n  [x] DaysToExpiry: 14 (NotBefore 2025-08-11, NotAfter 2026-08-26; managed-renewal window opened at 60d on 2026-06-27)\n  [x] Renewal method: ACM_AUTO (DNS-validated cert attached to ALB — managed renewal path)\n  [x] RenewalEligibility: ELIGIBLE\n  [x] DNS validation: VALIDATED (CNAME _abc123.www.example.com -> _xyz789.acm-validations.aws., TTL 300, dig confirmed)\n  [x] InUseBy: arn:aws:elasticloadbalancing:us-east-1:111111111111:listener\u002Fapp\u002Fprod-alb\u002Fabc\u002Fdef (ALB HTTPS :443, SNI default cert)\n  [x] RenewalStatus: PENDING_AUTO_RENEWAL (ACM has fired daily renewal attempts since 60d window; CNAME propagation delayed; EventBridge scan + CloudWatch alarm \u003C 30d both active)\n  [x] Detection: CloudWatch alarm acm-www-expiring-14d (DaysToExpiry \u003C 30, SNS arn:aws:sns:us-east-1:111111111111:cert-expiry-alerts) + EventBridge acm-daily-cert-scan rate(1 day)\nGAP: None\nTEMPLATE:\n  # CloudWatch alarm — urgent tier (\u003C 30 days) on the specific cert ARN\n  aws cloudwatch put-metric-alarm \\\n    --alarm-name acm-www-expiring-14d --namespace AWS\u002FCertificateManager \\\n    --metric-name DaysToExpiry \\\n    --dimensions Name=CertificateArn,Value=arn:aws:acm:us-east-1:111111111111:certificate\u002Fabc-123-def-456 \\\n    --statistic Minimum --period 86400 --threshold 30 --comparison-operator LessThanThreshold \\\n    --evaluation-periods 1 --alarm-actions arn:aws:sns:us-east-1:111111111111:cert-expiry-alerts\n\n  # EventBridge daily scan (catches gaps managed renewal cannot — orphaned, imported, PCA CA expiry)\n  aws events put-rule --name acm-daily-cert-scan --schedule-expression \"rate(1 day)\" --state ENABLED\n\n  # No re-import needed; managed renewal rotates the cert in place (ARN unchanged).\n  # Confirm renewal completion via SNI after RenewalStatus flips to SUCCESS:\n  openssl s_client -connect prod-alb-123.us-east-1.elb.amazonaws.com:443 -servername www.example.com \\\n    \u003C\u002Fdev\u002Fnull 2>\u002Fdev\u002Fnull | openssl x509 -noout -subject -dates\n```\n\n### Worked example — REVIEW_REQUIRED (imported orphaned cert)\nFull block moved verbatim to [references\u002Fworked-examples.md](references\u002Fworked-examples.md).\nLoad on demand when the verdict is REVIEW_REQUIRED (imported\u002Forphaned cert).\n\n### Decision tree — renewal path classification\n\n```\nStart: cert with DaysToExpiry ≤ 60\n├─ Imported cert (Status: ISSUED, RenewalEligibility: INELIGIBLE)?\n│   └─ Yes → MANUAL_REIMPORT → VERDICT: REVIEW_REQUIRED\n│            (external CA + aws acm import-certificate + re-attach)\n├─ RenewalEligibility = ELIGIBLE AND InUseBy ≠ []?\n│   ├─ Yes → Validation method?\n│   │       ├─ DNS + CNAME resolvable → ACM_AUTO → VERDICT: AUTOMATION_DEPLOYED\n│   │       │                           (verify SNI post-rotation)\n│   │       └─ DNS CNAME missing OR EMAIL → REVIEW_REQUIRED\n│   │                                     (fix CNAME or migrate EMAIL→DNS)\n│   └─ No (orphaned or INELIGIBLE) → go to next branch\n├─ PCA-issued via ACM (Status: ISSUED, CertificateAuthorityArn present)?\n│   ├─ CA Status = ACTIVE AND cert attached → ACM_AUTO with CA-health check\n│   └─ CA expired OR cert orphaned → REVIEW_REQUIRED (renew CA first)\n└─ PCA-exported (used outside AWS)?\n    └─ Full manual pipeline → REVIEW_REQUIRED (issue from PCA + export + ship)\n```\n\n## Anti-Patterns — NEVER do these\n\n- NEVER assume ACM managed renewal covers all certificates. It covers\n  ONLY DNS\u002Femail-validated certs attached to supported services. Always\n  check `RenewalEligibility`.\n\n- NEVER delete DNS validation CNAMEs after issuance. They must persist\n  for the cert's lifetime for ACM to re-validate during renewal.\n\n- NEVER request a new certificate without checking for existing ones.\n  `request-certificate` creates duplicates. Use `list-certificates` first.\n\n- NEVER put a CloudFront cert outside us-east-1. It silently fails.\n\n- NEVER update an ALB listener cert list without preserving SNI order.\n  `modify-listener --certificates` REPLACES the entire list.\n\n- NEVER use email validation for new certificates. It requires human\n  action on every renewal. Use DNS validation.\n\n- NEVER forget PCA CA expiry. An expired CA breaks all certs it issued\n  even if end-certs haven't reached their own expiry. Check CA\n  `NotAfter` 90+ days in advance.\n\n- NEVER update a CloudFront distribution with a stale ETag. It fails\n  silently. Always `get-distribution` for the current ETag first.\n\n- NEVER omit the DLQ on the EventBridge cert-scan target. Without a\n  DLQ, failed scans are silently dropped.\n\n- NEVER skip SNI verification after rotation. The config may show the\n  new cert but the TLS handshake may still serve the old cert during\n  propagation.\n\n- NEVER share certs cross-account for ALB\u002FNLB. They require same-account\n  certs. Request separately in each account.\n\n- NEVER rotate all certs simultaneously. Rotate one, verify, then\n  proceed. A batch failure leaves the fleet inconsistent.\n\n- NEVER omit CloudTrail auditing. A compromised credential can\n  `delete-certificate` to disrupt renewal.\n\n## Pre-flight safety checks\n\n- **CONFIRMATION GATE** before any state-changing operation:\n  `CONFIRM: About to \u003Caction> for certificate \u003Cdomain> in account\n  \u003Caccount>. Proceed? (yes\u002Fno)`\n\n- **Back up configs:** Save listener\u002Fdistribution config before\n  modifying.\n\n- **Before production rotation:** verify new cert status is `issued`:\n  `aws acm describe-certificate --certificate-arn \u003Cnew> --query 'Certificate.Status'`\n\n- **Before deleting old cert:** verify `InUseBy` is `[]`.\n\n- **For PCA rotation:** verify CA is `ACTIVE`.\n\n## Appendix A — Renewal eligibility matrix\n\nMatrix moved verbatim to [references\u002Facm-renewal-paths.md](references\u002Facm-renewal-paths.md).\nLoad on demand for the full renewal-path classification.\n\n## Appendix B — Decision tree\nTree moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand for the condensed renewal-path decision logic (the main decision tree under STRICT output contract stays).\n\n## Appendix C — CloudFormation skeleton\nFull CloudFormation skeleton moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand when emitting IaC for the renewal pipeline.\n\n## Recent AWS features (2024-2026)\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand for 2024-2026 ACM\u002FPCA\u002FCloudFront feature coverage.\n\n## Expert heuristic: renewal coverage gap\n\nHeuristic + verification protocol moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand when deciding detection depth for a cert fleet.\n\n## References (load on demand)\n\n- [references\u002Facm-renewal-paths.md](references\u002Facm-renewal-paths.md) — renewal-path CLI references; custom-pipeline Lambda implementation; renewal eligibility matrix.\n- [references\u002Fimported-cert-manual-renewal.md](references\u002Fimported-cert-manual-renewal.md) — manual re-import flow for imported private-key certs.\n- [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — Step 0 expert knowledge, appendices (decision tree, CloudFormation skeleton), 2024-2026 features, coverage-gap heuristic.\n- [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — cert-scan Lambda and CloudTrail audit commands.\n- [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — REVIEW_REQUIRED worked example (secondary).\n- [references\u002Ferror-handling.md](references\u002Ferror-handling.md) — DNS validation failure table.\n\n## Domain\n\nAWS CloudOps \u002F Security Automation — TLS certificate lifecycle.\n\n## AWS documentation\n\n- **ACM Managed Renewal** — https:\u002F\u002Fdocs.aws.amazon.com\u002Facm\u002Flatest\u002Fuserguide\u002Fmanaged-renewal.html\n- **ACM DNS Validation** — https:\u002F\u002Fdocs.aws.amazon.com\u002Facm\u002Flatest\u002Fuserguide\u002Fdns-validation.html\n- **AWS Private CA** — https:\u002F\u002Fdocs.aws.amazon.com\u002Facm-pca\u002Flatest\u002Fuserguide\u002FPcaWelcome.html\n- **CloudFront Viewer Certificates** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonCloudFront\u002Flatest\u002FDeveloperGuide\u002Fusing-https-alternate-domain-names.html\n- **ALB SNI** — https:\u002F\u002Fdocs.aws.amazon.com\u002Felasticloadbalancing\u002Flatest\u002Fapplication\u002Fcreate-https-listeners.html\n",{"name":5,"license":15,"metadata":24,"description":7,"compatibility":41},{"tags":25,"phase":26,"author":27,"domain":28,"family":29,"version":30,"keywords":31,"task_type":32,"complexity":33,"skill_class":34,"when_to_use":35,"requires_llm":36,"verdict_shape":37,"lifecycle_status":38,"invocation_schema":39,"supports_pipeline":36,"activation_triggers":40},"aws-acm, certificate-renewal, tls, security, cloudwatch, eventbridge, lambda, automate","4","Jacky Chan — AWS Community Builder","aws-cloudops","Security","0.1.0","ACM, certificate renewal, DaysToExpiry, CloudWatch alarm, EventBridge scheduled rule, Lambda renewal, DNS validation, Route 53 CNAME, ACM PCA, ALB listener certificate, CloudFront distribution, API Gateway custom domain, SNI verification, wildcard certificate, SAN certificate, CloudTrail audit","automate","high","capability","Building ACM certificate renewal automation, wiring CloudWatch alarms for cert expiry, deploying EventBridge + Lambda renewal pipelines, managing PCA certificate lifecycles, rotating certs on ALB\u002FNLB\u002FCloudFront\u002FAPI Gateway, or auditing cert API calls.","true","AUTOMATION_DEPLOYED | REVIEW_REQUIRED","active","Input: either (a) a list of ACM certificate ARNs with associated services and renewal status, OR (b) a cert renewal automation requirement. Output: deterministic RENEWAL block per certificate — DETECTION\u002FRENEWAL_FLOW\u002FVALIDATION\u002FNOTIFICATION\u002FAUDIT\u002FVERDICT — where VERDICT is AUTOMATION_DEPLOYED or REVIEW_REQUIRED.","automate certificate renewal, ACM expiry alarm, DaysToExpiry CloudWatch, certificate rotation Lambda, DNS validation Route 53, ACM PCA lifecycle, ALB listener certificate update, CloudFront certificate renewal, API Gateway custom domain cert, SNI verification, cross-account certificate sharing","Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). No AWS CLI required for offline workflow design. Live deployment uses aws acm describe-certificates, request-certificate, get-certificate, aws acm-pca issue-certificate, aws elbv2 modify-listener, aws apigateway update-domain-name, aws cloudfront update-distribution, aws route53 change-resource-record-sets, aws events put-rule\u002Fput-targets, aws lambda create-function — AWS CLI v2.","main","eeace51bd5dd1db2030729d83eeab988861553aa","skills\u002Fcertificate-renewal-automator",0,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills","https:\u002F\u002Fgithub.com\u002Fjhkchan","CTO & Co-Founder @Beever-AI  & @votee. CAISP. AWS Community Builder. Organizer@GDGCloudHK. MongoDB Champion. Technopreneur + Infornographer.","2026-09-24 08:54:10",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add jhkchan\u002Faws-agent-skills --skill certificate-renewal-automator",{"tool":56,"command":57},"bunx","bunx skills add jhkchan\u002Faws-agent-skills --skill certificate-renewal-automator",{"tool":59,"command":60},"pnpm","pnpm dlx skills add jhkchan\u002Faws-agent-skills --skill certificate-renewal-automator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcertificate-renewal-automator\u002FSKILL.md",true,[64,70,74,78,82,86,90,94,98,102,106,110,114,118,122,126,130,134,138,142,146],{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},"eval\u002Ftest-cases.yaml","REFERENCE","参考文档",6145,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcertificate-renewal-automator\u002Feval\u002Ftest-cases.yaml",{"path":71,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":72,"sourceHtmlUrl":73},"evals\u002Fbaselines\u002Facm-dns-alb-auto-renewal.md",758,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcertificate-renewal-automator\u002Fevals\u002Fbaselines\u002Facm-dns-alb-auto-renewal.md",{"path":75,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":76,"sourceHtmlUrl":77},"evals\u002Fbaselines\u002Fcloudfront-cert-rotation.md",570,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcertificate-renewal-automator\u002Fevals\u002Fbaselines\u002Fcloudfront-cert-rotation.md",{"path":79,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":80,"sourceHtmlUrl":81},"evals\u002Fbaselines\u002Forphaned-imported-cert.md",565,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcertificate-renewal-automator\u002Fevals\u002Fbaselines\u002Forphaned-imported-cert.md",{"path":83,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":84,"sourceHtmlUrl":85},"evals\u002Fbaselines\u002Fpca-private-ca-pipeline.md",648,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcertificate-renewal-automator\u002Fevals\u002Fbaselines\u002Fpca-private-ca-pipeline.md",{"path":87,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":88,"sourceHtmlUrl":89},"evals\u002Fbaselines\u002Fsan-validation-gap.md",586,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcertificate-renewal-automator\u002Fevals\u002Fbaselines\u002Fsan-validation-gap.md",{"path":91,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":92,"sourceHtmlUrl":93},"evals\u002Feval_config.yaml",1728,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcertificate-renewal-automator\u002Fevals\u002Feval_config.yaml",{"path":95,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":96,"sourceHtmlUrl":97},"evals\u002Fevals.json",4252,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcertificate-renewal-automator\u002Fevals\u002Fevals.json",{"path":99,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":100,"sourceHtmlUrl":101},"evals\u002Fprompts\u002Facm-dns-alb-auto-renewal.md",784,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcertificate-renewal-automator\u002Fevals\u002Fprompts\u002Facm-dns-alb-auto-renewal.md",{"path":103,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":104,"sourceHtmlUrl":105},"evals\u002Fprompts\u002Fcloudfront-cert-rotation.md",685,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcertificate-renewal-automator\u002Fevals\u002Fprompts\u002Fcloudfront-cert-rotation.md",{"path":107,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":108,"sourceHtmlUrl":109},"evals\u002Fprompts\u002Forphaned-imported-cert.md",665,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcertificate-renewal-automator\u002Fevals\u002Fprompts\u002Forphaned-imported-cert.md",{"path":111,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":112,"sourceHtmlUrl":113},"evals\u002Fprompts\u002Fpca-private-ca-pipeline.md",748,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcertificate-renewal-automator\u002Fevals\u002Fprompts\u002Fpca-private-ca-pipeline.md",{"path":115,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":116,"sourceHtmlUrl":117},"evals\u002Fprompts\u002Fsan-validation-gap.md",767,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcertificate-renewal-automator\u002Fevals\u002Fprompts\u002Fsan-validation-gap.md",{"path":119,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":120,"sourceHtmlUrl":121},"examples\u002Fend-to-end.md",6811,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcertificate-renewal-automator\u002Fexamples\u002Fend-to-end.md",{"path":123,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":124,"sourceHtmlUrl":125},"references\u002Facm-renewal-paths.md",8612,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcertificate-renewal-automator\u002Freferences\u002Facm-renewal-paths.md",{"path":127,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":128,"sourceHtmlUrl":129},"references\u002Fadvanced-patterns.md",7302,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcertificate-renewal-automator\u002Freferences\u002Fadvanced-patterns.md",{"path":131,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":132,"sourceHtmlUrl":133},"references\u002Fdiagnostic-commands.md",1778,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcertificate-renewal-automator\u002Freferences\u002Fdiagnostic-commands.md",{"path":135,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":136,"sourceHtmlUrl":137},"references\u002Ferror-handling.md",564,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcertificate-renewal-automator\u002Freferences\u002Ferror-handling.md",{"path":139,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":140,"sourceHtmlUrl":141},"references\u002Fimported-cert-manual-renewal.md",5456,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcertificate-renewal-automator\u002Freferences\u002Fimported-cert-manual-renewal.md",{"path":143,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":144,"sourceHtmlUrl":145},"references\u002Fworked-examples.md",1456,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcertificate-renewal-automator\u002Freferences\u002Fworked-examples.md",{"path":147,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":148,"sourceHtmlUrl":149},"skill.usf.yaml",4550,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcertificate-renewal-automator\u002Fskill.usf.yaml",[151,158,165,172,179,186],{"skillNo":152,"name":153,"nameZh":6,"description":154,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":155,"categories":156,"keywords":157,"publishedAt":19},"01M7ADVD60X4PCAPKSE58P9NDC","xray-tracing-deployer","Deploys AWS X-Ray distributed tracing with production-grade configuration: X-Ray daemon deployment (EC2 systemd, ECS sidecar, EKS DaemonSet, Lambda built-in), SDK instrumentation (Java, Python, Node.js, Go, .NET) with annotations and metadata, sampling rules (default reservoir + rate vs custom rules with URL \u002F method \u002F service-name predicates), service map generation, trace query and retrieval, groups and insights, CloudWatch ServiceLens integration, IAM permissions (PutTraceSegments, GetSamplingRules), and latest features (Lambda Powertools tracing, OpenTelemetry \u002F ADOT Collector support, W3C trace context). Emits a READY_TO_DEPLOY checklist with every configuration item verified. Use when enabling X-Ray on a new application, adding tracing to ECS \u002F EKS \u002F Lambda, validating a sampling configuration, or generating daemon deployment CLI and IaC templates. Triggers: X-Ray, distributed tracing, X-Ray daemon, sampling rules, service map, X-Ray SDK, OpenTelemetry, ADOT, Lambda Powertools, CloudWatch ServiceLens.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxray-tracing-deployer\u002FSKILL.md",[],[],{"skillNo":159,"name":160,"nameZh":6,"description":161,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":162,"categories":163,"keywords":164,"publishedAt":19},"01M7ADTVJ7DCBM9CB1FY51GH7J","wellarchitected-workload-auditor","Audits AWS Well-Architected Tool workloads for review staleness, per-pillar high-risk issue counts, milestone tracking gaps, and remediation plan completeness. Emits a deterministic verdict (STALE_REVIEW | HIGH_RISK | CONFIG_GAP | OK) per workload with per-pillar risk breakdown, milestone trend analysis, and specific remediation. Use when reviewing Well-Architected workloads, checking WA review freshness, auditing high-risk issues per pillar, validating milestone coverage, or tracking remediation plans.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwellarchitected-workload-auditor\u002FSKILL.md",[],[],{"skillNo":166,"name":167,"nameZh":6,"description":168,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":169,"categories":170,"keywords":171,"publishedAt":19},"01M7ADT59G6FTTNZYHT2QRPNNP","wellarchitected-review-operator","Operates AWS Well-Architected Tool reviews end-to-end — creates workloads, runs pillar reviews (operational excellence, security, reliability, performance, cost optimization, sustainability, Prosperity), answers questions with risk-tier rationale, generates reports and improvement plans, creates milestones, and integrates with Trusted Advisor and Well-Architected Labs. Runs deterministic pre-checks (workload existence, lens availability, pillar coverage), emits the exact update-answer \u002F get-consolidated-report CLI behind a CONFIRM gate, and verifies risk-tier transitions. Emits READY | BLOCKED | COMPLETED. Use when creating a workload, answering pillar questions, generating an improvement plan, creating a milestone, or integrating with Trusted Advisor. Triggers: well-architected tool, well architected review, workload review, pillar, operational excellence, security, reliability, performance, cost optimization, sustainability, prosperity, improvement plan, milestone, trusted advisor.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwellarchitected-review-operator\u002FSKILL.md",[],[],{"skillNo":173,"name":174,"nameZh":6,"description":175,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":176,"categories":177,"keywords":178,"publishedAt":19},"01M7ADSH5JA9QHNPPHQCD7EVA7","wafv2-web-acl-deployer","Provisions AWS WAFv2 Web ACLs with correct production defaults: scope selection (CLOUDFRONT vs REGIONAL), managed rule groups (AWSManagedRulesCommonRuleSet, SQLiRuleSet, LinuxRuleSet, WindowsRuleSet, IPReputationList, BotControlRuleSet, AmazonIpReputationList, ATP), custom rules (byte match, IP set, regex pattern, geo match, size constraint, rate-based), rule priority ordering, logging destinations (Kinesis Firehose, CloudWatch Logs, S3), resource association (ALB, API Gateway, CloudFront), rate-based rules with aggregate keys (IP, forwarded IP), Challenge and CAPTCHA actions, and account takeover prevention. Emits a READY_TO_DEPLOY checklist. Use when creating a Web ACL, attaching managed rules, configuring rate limiting, enabling WAF logging, associating a Web ACL with an ALB\u002FAPI Gateway\u002FCloudFront, or configuring CAPTCHA\u002FChallenge actions. Triggers: create WAF Web ACL, WAFv2, managed rule groups, WAF rate limiting, WAF logging, WAF CAPTCHA, WAF Challenge action, bot control, ATP managed rules.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwafv2-web-acl-deployer\u002FSKILL.md",[],[],{"skillNo":180,"name":181,"nameZh":6,"description":182,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":183,"categories":184,"keywords":185,"publishedAt":19},"01M7ADRYFAT8R73FBNCHRC573X","wafv2-web-acl-auditor","Audits AWS WAFv2 Web ACL configurations to determine whether the ACL provides effective protection: default-action posture (Allow vs Block), managed-rule-group coverage gaps, rule effectiveness (BLOCK vs COUNT, shadow\u002Fbypass rules, stale exclusions), rate-based rule correctness, logging and visibility configuration, and text-transformation bypass vectors. Emits a deterministic verdict per Web ACL. Use when reviewing a WAFv2 Web ACL for security posture, checking managed-rule coverage, validating rate-limit configuration, auditing WAF logging, or hardening a WAF before production deployment. Triggers: WAF, WAFv2, Web ACL, managed rule group, AWSManagedRules, rate-based rule, CAPTCHA, Challenge, OverrideAction, Count mode, forwarded IP, Bot Control, ATP, text transformation, WAF logging, WAF visibility, OWASP, SQLi, XSS, RFI.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwafv2-web-acl-auditor\u002FSKILL.md",[],[],{"skillNo":187,"name":188,"nameZh":6,"description":189,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":190,"categories":191,"keywords":192,"publishedAt":19},"01M7ADR8W7G72JX4KFGN03QK8Q","waf-rule-deployer","Provisions AWS WAFv2 rule sets with production defaults: Web ACL creation (CloudFront scope in us-east-1 vs Regional scope), rule groups (managed vs custom) with capacity planning in WCU (Web ACL Capacity Units, 1500 default per ACL), managed rule groups (AWSManagedRulesCommonRuleSet, AWSManagedRulesSQLiRuleSet, AWSManagedRulesAmazonIpReputationList, AWSManagedRulesLinuxRuleSet, AWSManagedRulesWindowsRuleSet, AWSManagedRulesUnixRuleSet), custom rules (byte-match, regex pattern set, geo-match, rate-based), IP set and regex pattern set resources, rule priority ordering (lowest number evaluated first), action types (allow, block, count, CAPTCHA, Challenge), bot control managed rule group, account takeover. Triggers: create WAF rule, WAF managed rule group, WAF custom rule, WAF byte match, WAF geo match, WAF rate based rule, WAF IP set, WAF regex pattern set, WAF WCU budget, WAF CloudFront ACL, WAF logging Kinesis Firehose, WAF bot control, WAF ATP, WAF label matching, WAF Challenge action, WAF CAPTCHA.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwaf-rule-deployer\u002FSKILL.md",[],[]]