[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A539SE05KSDMMC7S2PRD9Y":3,"skill-same:01M7A539SE05KSDMMC7S2PRD9Y":151},{"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":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":49,"updatedAt":50,"install":51,"resources":64},"01M7A539SE05KSDMMC7S2PRD9Y","cloudtrail-lake-operator",null,"Operates AWS CloudTrail Lake end-to-end — Event Data Store (EDS) creation with the full ingestion surface (CloudTrail management events, CloudTrail data events for S3\u002FLambda, AWS Config snapshots, Audit Manager evidence, non-AWS events via Partner integrations, CloudTrail Insights), organization scope and SSE-KMS encryption, PartiQL queries (WHERE on eventTime\u002F eventSource\u002FeventName\u002FuserIdentity, JOIN across same-Region EDS, aggregation via GROUP BY\u002FCOUNT\u002FSUM\u002FAVG), query optimization via partitioning and columnar tuning, Athena federation via the CloudTrailLake connector for cross-account\u002Fcross-Region queries, QuickSight dashboards on top of Athena, and non-AWS ingestion via PutAuditEvents with registered Partner sources. Runs deterministic pre-checks behind a CONFIRM gate and emits a READY, BLOCKED, or COMPLETED verdict. Use when creating or modifying an EDS, configuring organization ingestion, writing PartiQL queries, diagnosing slow or empty queries, federating via Athena, or ingesting non-AWS events.","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\u002Fcloudtrail-lake-operator\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: cloudtrail-lake-operator\ndescription: Operates AWS CloudTrail Lake end-to-end — Event Data Store (EDS) creation with the full ingestion surface (CloudTrail management events, CloudTrail data events for S3\u002FLambda, AWS Config snapshots, Audit Manager evidence, non-AWS events via Partner integrations, CloudTrail Insights), organization scope and SSE-KMS encryption, PartiQL queries (WHERE on eventTime\u002F eventSource\u002FeventName\u002FuserIdentity, JOIN across same-Region EDS, aggregation via GROUP BY\u002FCOUNT\u002FSUM\u002FAVG), query optimization via partitioning and columnar tuning, Athena federation via the CloudTrailLake connector for cross-account\u002Fcross-Region queries, QuickSight dashboards on top of Athena, and non-AWS ingestion via PutAuditEvents with registered Partner sources. Runs deterministic pre-checks behind a CONFIRM gate and emits a READY, BLOCKED, or COMPLETED verdict. Use when creating or modifying an EDS, configuring organization ingestion, writing PartiQL queries, diagnosing slow or empty queries, federating via Athena, or ingesting non-AWS events.\nlicense: Apache-2.0\ncompatibility: Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). No AWS CLI required for offline plan classification. Live-account operations use aws cloudtrail create-event-data-store, update-event-data-store, delete-event-data-store, list-event-data-stores, get-query, start-query, describe-query, get-query-results, get-event-data-store, list-queries, put-audit-events (with partner-type), aws lakeformation grant permissions (for Athena federation), aws athena...\nmetadata:\n  domain: aws-cloudops\n  complexity: high\n  requires_llm: 'true'\n  phase: '4'\n  supports_pipeline: 'true'\n  entry_point: 'false'\n  family: Governance\n  task_type: operate\n  skill_class: capability\n  lifecycle_status: active\n  verdict_shape: READY | BLOCKED | COMPLETED\n  when_to_use: Creating or modifying an Event Data Store (EDS), configuring multi-account or organization-level ingestion into CloudTrail Lake, ingesting non-AWS events (SaaS apps, on-prem) via PutAuditEvents, writing PartiQL queries (SELECT, WHERE, JOIN, aggregation, time-window analytics), diagnosing a slow or empty- result query, federating Lake queries via Athena for cross- account or cross-Region analysis, building QuickSight dashboards on top of Athena-federated CloudTrail Lake, or configuring CloudTrail Insights events ingestion.\n  activation_triggers: create Event Data Store, CloudTrail Lake EDS, PartiQL query CloudTrail, federated query Athena, Athena CloudTrail Lake connector, non-AWS events CloudTrail, PutAuditEvents, ingest SaaS audit logs to AWS, CloudTrail data events to Lake, CloudTrail management events to Lake, AWS Config snapshots to Lake, Audit Manager evidence to Lake, CloudTrail Insights to Lake, organization CloudTrail Lake, multi-account CloudTrail Lake, CloudTrail Lake query slow, CloudTrail Lake empty results, QuickSight CloudTrail Lake\n  invocation_schema: 'Input: either (a) a CloudTrail Lake Event Data Store configuration (get-event-data-store, list-event-data-stores, get-query, get-query-results) plus the intended operation (create-eds, update-eds, run-query, diagnose-empty-query, diagnose-slow-query, federate-via-athena, configure-non-aws- ingestion, configure-quicksight), OR (b) a specific EDS + PartiQL SQL pair for live-account execution. Output: deterministic OPERATION \u002F VERDICT \u002F PRE_CHECKS \u002F STEPS \u002F POST_VERIFY \u002F NOTES block per operation, where VERDICT is one of READY, BLOCKED, COMPLETED.'\n  version: 0.1.0\n  author: Jacky Chan — AWS Community Builder\n  keywords: AWS CloudTrail Lake, CloudTrail Lake, Event Data Store, EDS, PartiQL, CloudTrail query, federated query Athena, Athena CloudTrail Lake connector, non-AWS events CloudTrail, PutAuditEvents, CloudTrail data events, CloudTrail management events, AWS Config configuration snapshots, AWS Audit Manager evidence, CloudTrail Insights, organization trail Lake, multi-account CloudTrail Lake, Lake query optimization, CloudTrail Lake partitioning, QuickSight CloudTrail Lake\n  tags: aws, cloudtrail, lake, governance, audit, security, partiql, athena, quicksight, operate\n---\n\n# AWS CloudTrail Lake Operator\n\n## What this skill does\n\nExecutes AWS CloudTrail Lake operations correctly and safely across\nthe full ingestion-to-query surface. Runs deterministic pre-checks\nbefore any state-changing CLI — Event Data Store (EDS) Region\nselection (Lake is a Regional service; cross-Region ingestion\nrequires organization-level EDS), KMS encryption configuration\n(SSE-KMS via customer-managed key + key policy grant to\n`cloudtrail.amazonaws.com`), ingestion-source compatibility\n(allowed event categories: `CloudTrail management`, `CloudTrail\ndata`, `Config configuration snapshots`, `Audit Manager evidence`,\n`non-AWS events via Partner`, `CloudTrail Insights`), organization\ningestion (`isOrganizationService: true` requires the EDS be\ncreated by the management account), retention-period validity (90\nto 3653 days, or `INDEFINITE`), partitioning strategy (Lake\nauto-partitions on event time, but custom partition keys can be\nderived from `eventTime`, `eventSource`, `userIdentity.accountId`),\nPartiQL query syntax validity (SELECT, WHERE on `eventTime`,\n`eventSource`, `eventName`, `userIdentity` fields; JOIN across EDS\nin the same Region), Athena federation prerequisites (the Athena\nCloudTrailLake data source connector deployed, Lake Formation\ngrants on the connector, workgroup configured), QuickSight\npermissions (QuickSight service role allowed to assume the Athena\nworkgroup role), and non-AWS ingestion setup (a Partner event\nsource registered, the partner IAM role with\n`cloudtrail:PutAuditEvents`). Executes the change behind a CONFIRM\ngate, then verifies by running a smoke-test query and confirming\nrow count and approximate latency within expected bounds.\n\n## Quick navigation\n\n| Section | What it covers | When to read it |\n|---|---|---|\n| **§ Quick reference** | Verdict thresholds (BLOCKED\u002FREADY\u002FCOMPLETED) + pre-check priority | Before any operation |\n| **§ Mindset** | Why Lake is a Regional columnar store; the partition-or-perish trap; the no-schema-flex trap | Understanding the safety model |\n| **§ Pre-flight** | EDS + Athena federation gate — KMS, ingestion source, organization scope, query workgroup | Before executing any CLI |\n| **§ Process** | Per-operation planning: create-eds, update-eds, run-query, diagnose-empty-query, diagnose-slow-query, federate-via-athena, configure-non-aws-ingestion, configure-quicksight | When choosing which operation to run |\n| **§ Output format** | STRICT output contract — OPERATION\u002FVERDICT\u002FPRE_CHECKS\u002FSTEPS\u002FPOST_VERIFY\u002FNOTES template | Formatting the response |\n| **§ Anti-Patterns** | NEVER list — common mistakes that strand events or produce empty query results | Review before risky operations |\n| **§ Pre-flight safety** | Capture pre-state, KMS key policy, organization scope, Athena workgroup | Defense-in-depth |\n| **§ Expert heuristic** | Lake is a columnar store — never assume a query that compiles is fast | Avoiding the partition-or-perish trap |\n\n## STRICT output contract\n\nEVERY response MUST end with a single fenced text block in this exact\nshape (the operator's downstream tooling greps for it). No deviations:\n\n```text\nOPERATION: \u003Ccreate-eds | update-eds | run-query | diagnose-empty-query | diagnose-slow-query | federate-via-athena | configure-non-aws-ingestion | configure-quicksight>\nVERDICT: READY | BLOCKED | COMPLETED\nTARGET: \u003Ceds-id> (region: \u003Cregion>, ingestion: \u003Csources>) (query: \u003Csql-or-\"none\">)\nPRE_CHECKS:\n  - [PASS] \u003Ccheck description>\n  - [FAIL] \u003Ccheck description> — \u003Creason>\nSTEPS:\n  1. \u003CCLI command with flags populated, or \"(none — pre-checks failed)\">\n  2. \u003Cwait \u002F monitoring command>\nPOST_VERIFY:\n  - [PASS] \u003Cverification description> | (pending execution)\n  - [FAIL] \u003Cverification description> — \u003Creason>\nNOTES: \u003Cschedule, monitoring, caveats>\n```\n\nRules of the contract:\n\n- VERDICT is exactly one of `READY`, `BLOCKED`, `COMPLETED`. No other\n  values. `READY` means pre-checks passed and a CONFIRM gate is\n  pending; `BLOCKED` means at least one pre-check failed — do NOT\n  emit STEPS that mutate state; `COMPLETED` means post-verification\n  passed after execution.\n- If PRE_CHECKS has any `[FAIL]`, VERDICT MUST be `BLOCKED` and STEPS\n  MUST be `(none — pre-checks failed)`.\n- If VERDICT is `READY`, STEPS[1] MUST be the CONFIRM prompt and\n  STEPS[2] MUST be the actual CLI.\n- If VERDICT is `COMPLETED`, POST_VERIFY MUST contain at least one\n  `[PASS]` and no `[FAIL]`.\n- Never wrap the block in JSON, never abbreviate the field names,\n  never omit a section. If a section is empty, write `(none)`.\n\n## Quick reference — verdict thresholds\n\n| Verdict | Trigger condition | Action |\n|---|---|---|\n| `BLOCKED` | One or more pre-checks failed (EDS Region mismatch vs ingestion target, KMS key policy missing `cloudtrail.amazonaws.com` grant, organization EDS created by member account, retention period outside 90-3653 days, event category not in the allowed list, Athena workgroup missing, Lake Formation grant absent on the connector, partner event source not registered, QuickSight service role cannot assume the Athena workgroup role, PartiQL syntax error, JOIN across EDS in different Regions) | List failures, do NOT execute |\n| `READY` | All pre-checks passed; awaiting CONFIRM gate | Emit exact CLI sequence, wait for operator yes |\n| `COMPLETED` | Query returned `QueryStatus: FINISHED` AND post-verification passed (rows match expected count, latency within expected bound, no `QueryStatus: FAILED` or `CANCELLED`) | Emit verification results, monitoring plan |\n\n**Priority order for pre-checks (apply in this sequence, all must pass\nfor READY):**\n\n1. **EDS exists and is `Status: ENABLED`.** A `DELETING` or\n   `PENDING_DELETION` EDS cannot be queried or written to.\n2. **Region alignment.** Lake is Regional; a query can only reference\n   EDS in the same Region as the query API call. Cross-Region\n   analysis requires Athena federation or EDS replication.\n3. **Ingestion source compatibility.** The EDS `EventCategory` list\n   must include the intended source(s): `Management`, `Data`,\n   `ConfigConfiguration`, `AuditManagerEvidence`, `NetworkActivity`,\n   `Insights`, or non-AWS (Partner). Mismatches produce zero rows\n   in queries.\n4. **KMS encryption chain.** For SSE-KMS EDS, the customer-managed\n   key policy MUST grant `cloudtrail.amazonaws.com`\n   `kms:GenerateDataKey`, `kms:Decrypt`, and the caller needs\n   `kms:Decrypt` to read results.\n5. **Organization scope.** `isOrganizationService: true` EDS can\n   only be created by the management account. Member accounts can\n   only create standalone EDS for their own events.\n6. **Retention period validity.** 90 to 3653 days, or the literal\n   string `INDEFINITE`. Anything outside this range is rejected.\n7. **Multi-account ingestion.** For an org EDS, the management\n   account must enable AWS Organizations access for CloudTrail.\n8. **PartiQL syntax.** `SELECT` is the only DML allowed (no INSERT,\n   UPDATE, DELETE — non-AWS ingestion uses `PutAuditEvents` API).\n   WHERE must reference supported columns. Aggregation functions\n   (`COUNT`, `SUM`, `AVG`, `MIN`, `MAX`) and `GROUP BY` are\n   supported. JOIN across EDS in the same Region is supported.\n9. **Athena federation prerequisites.** Athena CloudTrailLake\n   connector deployed (Lambda-backed), Lake Formation grant on the\n   connector to the caller, Athena workgroup configured with output\n   location.\n10. **Non-AWS ingestion setup.** Partner event source registered;\n    partner IAM role has `cloudtrail:PutAuditEvents` plus\n    `kms:GenerateDataKey` on the EDS KMS key.\n\n> Cost\u002Ftime baselines moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — load on demand.\n\n## Mindset\n\n**One-line takeaway:** CloudTrail Lake is a Regional columnar store\nwith a fixed event schema — a query that compiles is not necessarily\nfast, and a zero-row result is more often a partition-miss than an\nempty source. Driven by three Lake realities:\n\n- **Lake is Regional.** An EDS in `us-east-1` cannot be queried from\n  `eu-west-1` via the Lake API directly. Cross-Region or cross-account\n  analysis requires Athena federation (with the CloudTrailLake\n  connector) or replicating events into a second EDS. Operators\n  routinely assume Lake is global like CloudTrail itself; it is NOT.\n- **Partition pruning is the only performance lever.** Lake\n  auto-partitions on event time; a WHERE clause on `eventTime` is\n  the single most impactful filter. Without a time bound, every\n  query is a full-table scan. Other partition keys (`eventSource`,\n  `eventName`) can help but are secondary to time.\n- **Non-AWS events require an explicit Partner integration.** The\n  EDS must declare `EventCategory: non-AWS` (Partner) and the\n  Partner event source must be registered. `PutAuditEvents` from a\n  non-Partner IAM role is rejected. Operators routinely assume any\n  external audit log can be pushed to Lake; only Partners in the\n  CloudTrail Lake partner program are supported.\n\n## Pre-flight: EDS + Athena federation gate\n\nRun before classification. Misclassifying these produces wrong plans.\n\n**Pagination:** `list-event-data-stores` paginates at 50.\n`list-queries` paginates at 50 by default. `get-query-results`\npaginates up to 1,000 rows per call; for larger results iterate.\n\n> Live-account pre-flight command listing moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — load on demand.\n\n> Malformed-input handling moved verbatim to [references\u002Ferror-handling.md](references\u002Ferror-handling.md) — load on demand.\n\n| EDS \u002F query attribute | Effect on operation |\n|---|---|\n| EDS `Status: DELETING` | create-eds BLOCKED; queries BLOCKED. Wait or pick another EDS. |\n| EDS `Status: PENDING_DELETION` | Recovery requires `undelete-event-data-store` within 7 days. Otherwise gone. |\n| `KmsKeyId` set but key policy missing `cloudtrail.amazonaws.com` | BLOCKED; key policy MUST grant cloudtrail `kms:GenerateDataKey`, `kms:Decrypt`. |\n| `IsOrganizationsEnabled: true` EDS created by member account | BLOCKED at creation; org EDS must be created by management account. |\n| `EventCategory` list missing the intended source | Queries return zero rows even when source data exists. |\n| `RetentionPeriod: 30` (\u003C 90) | BLOCKED at creation; min is 90 days. |\n| `RetentionPeriod: 4000` (> 3653) | BLOCKED at creation; max is 3653 days (10 years). |\n| `TerminationProtectionEnabled: true` and operator wants `delete-eds` | BLOCKED; disable protection first via `update-event-data-store`. |\n| Query SQL missing `WHERE eventTime BETWEEN ...` | WARNING; full-table scan. Always include a time bound. |\n| Query SQL references column not in Lake schema (e.g., `region`) | BLOCKED at runtime; only `awsRegion`, not `region`. |\n| Query SQL uses `JOIN` across EDS in different Regions | BLOCKED at runtime; JOIN is same-Region only. |\n| Query SQL uses DML other than `SELECT` | BLOCKED; Lake is read-only via PartiQL. |\n| Athena workgroup missing | BLOCKED; create or pick existing workgroup. |\n| Lake Formation grant missing on connector Lambda | BLOCKED; federated query returns `AccessDenied`. |\n| Partner event source not registered | BLOCKED; `PutAuditEvents` from partner role is rejected. |\n| Partner role missing `cloudtrail:PutAuditEvents` | BLOCKED; attach the IAM policy. |\n| QuickSight service role cannot assume Athena workgroup role | BLOCKED; add trust policy on the Athena role. |\n\n## Process — operation planning (apply in order)\n\n### Step 0: Expert knowledge — non-obvious CloudTrail Lake behaviors\n\n> Step 0 expert knowledge moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — load on demand.\n\n### Step 1: Pre-check gate — BLOCKED if any check fails\n\nRun ALL pre-checks for the chosen operation. If ANY fails, the verdict\nis BLOCKED with the failed checks in PRE_CHECKS. Do NOT execute.\n\n**For ALL operations:**\n1. EDS `EventDataStoreArn` exists (or operator is creating new) in\n   the expected account\u002FRegion.\n2. EDS `Status: ENABLED` (not `DELETING`, `PENDING_DELETION`).\n3. Caller has `cloudtrail:GetQuery`, `cloudtrail:StartQuery` on the\n   EDS ARN.\n\n**For create-eds (new `create-event-data-store`):**\n4. Caller is the management account IF `--is-organization-service`\n   is set.\n5. `--retention-period` is between 90 and 3653 days, or the literal\n   `INDEFINITE`.\n6. `--kms-key-id` (if set) exists; key policy grants\n   `cloudtrail.amazonaws.com` `kms:GenerateDataKey`, `kms:Decrypt`.\n7. `--advanced-event-selectors` reference valid event categories\n   (`Management`, `Data`, `ConfigConfiguration`,\n   `AuditManagerEvidence`, `NetworkActivity`, `Insights`, non-AWS).\n8. `--termination-protection-enabled` set (default true).\n9. For non-AWS: the Partner event source is registered.\n\n**For update-eds:**\n5. EDS exists.\n6. `TerminationProtectionEnabled` not blocking the update (deletion\n   requires first disabling).\n7. New `EventConfigurations` is internally consistent.\n8. Pre-state captured (full prior configuration).\n\n**For run-query:**\n5. PartiQL SQL is syntactically valid.\n6. SQL includes `WHERE eventTime BETWEEN ...` (partition pruning).\n7. SQL references only Lake-supported columns (`eventTime`,\n   `eventSource`, `eventName`, `awsRegion`, `userIdentity.*`,\n   `requestParameters.*`, `responseElements.*`, etc.).\n8. If `JOIN`, both EDS exist in the same Region.\n9. The EDS `EventCategory` list includes the categories the SQL\n   filters on.\n\n**For diagnose-empty-query (read-only, no BLOCKED gate):**\n4. Read the failure-mode table to identify the root cause from\n   `QueryStatus`, `BytesScanned`, `ResultsCount`.\n\n**For diagnose-slow-query (read-only, no BLOCKED gate):**\n4. Inspect `describe-query` for `BytesScanned`,\n   `QueryRunTimeInSeconds`. The fix is partition pruning or column\n   reduction.\n\n**For federate-via-athena:**\n5. Athena workgroup exists.\n6. CloudTrailLake connector Lambda deployed in the Region.\n7. Lake Formation grant on the connector Lambda for the EDS.\n8. Athena workgroup role has `cloudtrail:GetQuery`,\n   `cloudtrail:StartQuery`, `cloudtrail:GetQueryResults` on the EDS,\n   plus `kms:Decrypt` if SSE-KMS.\n\n**For configure-non-aws-ingestion:**\n5. Partner event source registered (Partner name matches a known\n   CloudTrail Lake partner).\n6. Partner IAM role has `cloudtrail:PutAuditEvents` on the EDS.\n7. Partner IAM role has `kms:GenerateDataKey` on the EDS KMS key.\n8. EDS `EventCategory` includes non-AWS.\n\n**For configure-quicksight:**\n5. QuickSight account registered.\n6. Athena workgroup exists and is configured for QuickSight.\n7. QuickSight service role can assume the Athena workgroup role.\n8. QuickSight SPICE capacity available (if importing).\n\n> Failure-mode table moved verbatim to [references\u002Ferror-handling.md](references\u002Ferror-handling.md) — load on demand.\n\n### Step 2: READY — emit operation plan\n\nIf all pre-checks pass, emit `VERDICT: READY` with the exact CLI\nsequence and the CONFIRM gate. The plan includes:\n\n- The exact AWS CLI command with all flags populated. For\n  `start-query` this is the SQL with the EDS ARN(s).\n- Expected query latency (10-30s partitioned; 5-15 min full scan).\n- Expected cost ($0.005\u002FGB scanned; partition pruning is the lever).\n- The CONFIRM gate prompt.\n- The monitoring step (`describe-query` poll until\n  `QueryStatus: FINISHED`).\n\n### Step 3: Execute behind CONFIRM gate\n\n- **MANDATORY CONFIRMATION GATE.** Before any state-changing CLI\n  (`create-event-data-store`, `update-event-data-store`,\n  `delete-event-data-store`, `start-query`, `restore-event-data-store`,\n  `undelete-event-data-store`), emit: `CONFIRM: About to \u003Coperation>\n  on EDS \u003Ceds-id> in account \u003Caccount> region \u003Cregion>. This will\n  \u003Cconsequence>. Proceed? (yes\u002Fno)`. Do NOT execute until the\n  operator confirms.\n- Capture pre-state for rollback: `aws cloudtrail get-event-data-store\n  --event-data-store \u003Cid> --output json > \u002Ftmp\u002F\u003Cid>-pre-$(date +%s).json`.\n- Execute the CLI. For `start-query`, the API returns a `QueryId`\n  immediately; the query runs asynchronously.\n- Poll `describe-query --query-id \u003Cid>` every 10 seconds (or longer\n  for big scans) until `QueryStatus` is `FINISHED`, `FAILED`, or\n  `CANCELLED`.\n\n### Step 4: Post-verification — COMPLETED\n\nAfter `QueryStatus: FINISHED`, run post-verification. ALL checks\nmust pass for `COMPLETED`.\n\n1. `describe-query` returns `QueryStatus: FINISHED`.\n2. `ResultsCount` matches the operator's expected row count (or\n   falls within a stated tolerance).\n3. `QueryRunTimeInSeconds` is within the expected bound (10-30s\n   partitioned; 5-15 min full scan).\n4. `BytesScanned` is reasonable for the time window (e.g., a 7-day\n   window on a 100 GB EDS scans ~7\u002F90 * 100 = ~7.8 GB).\n5. `get-query-results` returns rows with the expected columns.\n6. For aggregation queries: spot-check 3 aggregates against raw\n   rows.\n7. For Athena federated queries: Athena `query-execution` returns\n   `SUCCEEDED`; output location has the result object.\n\nIf ANY verification fails, emit `VERDICT: ERROR` with the failure\ndetails — do not claim COMPLETED. Route the failure back to\ndiagnose-empty-query or diagnose-slow-query.\n\n## Output format (per operation)\n\nSee § STRICT output contract above. The block MUST appear exactly in\nthat shape.\n\n### Worked example — create-eds (Management + Data, SSE-KMS, org-scoped)\n\n```text\nOPERATION: create-eds\nVERDICT: READY\nTARGET: new EDS \"org-governance-edS\" (region: us-east-1,\n          ingestion: Management + Data events, organization scope)\nPRE_CHECKS:\n  - [PASS] Caller is the management account 111111111111\n  - [PASS] --retention-period 365 within [90, 3653]\n  - [PASS] --kms-key-id arn:aws:kms:us-east-1:111111111111:key\u002FedS-cmk\n    exists, key policy grants cloudtrail.amazonaws.com\n    kms:GenerateDataKey + kms:Decrypt\n  - [PASS] AdvancedEventSelectors reference Management + Data\n    categories\n  - [PASS] --is-organization-service: AWS Organizations access for\n    CloudTrail is enabled\n  - [PASS] --termination-protection-enabled: true (default)\nSTEPS:\n  1. CONFIRM: About to create organization-scoped Event Data Store\n     \"org-governance-edS\" in account 111111111111 region us-east-1.\n     Ingests Management + Data events for ALL accounts in org\n     o-abc123def. Retention: 365 days. SSE-KMS with key edS-cmk.\n     First-day ingestion: ~5-50M events depending on activity.\n     Proceed? (yes\u002Fno)\n  2. aws cloudtrail create-event-data-store \\\n       --name org-governance-edS \\\n       --kms-key-id arn:aws:kms:us-east-1:111111111111:key\u002FedS-cmk \\\n       --retention-period 365 \\\n       --termination-protection-enabled \\\n       --is-organization-service \\\n       --advanced-event-selectors file:\u002F\u002F\u002Ftmp\u002Fselectors.json\n  3. aws cloudtrail list-event-data-stores --name-suffix org-governance-edS\nPOST_VERIFY: (pending execution)\nNOTES:\n  - This EDS ingests Management + Data events from ALL member\n    accounts in org o-abc123def. Data events for S3 dominate volume;\n    tune AdvancedEventSelectors to limit to specific buckets\u002Fprefixes\n    to control cost.\n  - Cost estimate at 25M events\u002Fday: ~$25\u002Fday ingestion +\n    ~$0.05\u002FGB-month storage. Lake Formation grants required for any\n    downstream reader.\n  - The KMS key policy MUST list cloudtrail.amazonaws.com — without\n    it, ingestion silently fails. Verify with\n    aws kms get-key-policy --key-id edS-cmk --policy-name default.\n  - This EDS is org-scoped; member accounts CANNOT create their own\n    org EDS. Member-account standalone EDS for their own events is\n    still allowed.\n```\n\n### Worked example — diagnose-empty-query (BLOCKED with fix)\n\n> Full example moved verbatim to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — load on demand.\n\n### Worked example — federate-via-athena (COMPLETED)\n\n> Full example moved verbatim to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — load on demand.\n\n## Anti-Patterns — NEVER\n\n- NEVER assume CloudTrail Lake is global. Each EDS lives in a\n  specific Region; cross-Region queries require Athena federation\n  with the CloudTrailLake connector. Hard-coded \"global\" assumptions\n  produce `EDS not in this Region` failures.\n\n- NEVER run a Lake query without a `WHERE eventTime BETWEEN ...`\n  filter. Lake auto-partitions on event time; without a time bound,\n  every query scans every partition. Add even a wide window (last\n  90 days) before narrowing.\n\n- NEVER assume a zero-row result means the EDS is empty. The\n  `EventCategory` list may not include the queried source, the\n  `eventTime` window may be outside retention, or the column name\n  may be wrong (`region` vs `awsRegion`). Always verify the EDS\n  config before concluding emptiness.\n\n- NEVER create an organization-scoped EDS from a member account.\n  Org-scoped EDS must be created by the management account. Member\n  accounts can only create standalone EDS for their own events.\n\n- NEVER set `--retention-period` outside [90, 3653] days. Values\n  below 90 or above 3653 are rejected by the API. Use\n  `INDEFINITE` (literal string) for unlimited retention.\n\n- NEVER assume `PutAuditEvents` works for any non-AWS source. Only\n  registered CloudTrail Lake Partners can push non-AWS events.\n  Operators cannot self-register; the Partner initiates.\n\n- NEVER delete an EDS without first checking\n  `TerminationProtectionEnabled`. If true (default for new EDS),\n  the delete fails. First call `update-event-data-store\n  --no-termination-protection-enabled`.\n\n- NEVER assume Athena federation is free. A federated query incurs\n  Athena scan cost ($5\u002FTB) on top of Lake query cost ($0.005\u002FGB).\n  Federation is for convenience, not cost savings.\n\n- NEVER SELECT * in a Lake query. Lake is columnar; selecting fewer\n  columns reduces bytes scanned and cost. Always project only the\n  columns needed.\n\n- NEVER use a column name other than what Lake exposes. Common\n  mistake: `region` instead of `awsRegion`, `time` instead of\n  `eventTime`. Always reference the Lake schema.\n\n- NEVER JOIN EDS across Regions via the native Lake API. JOIN is\n  same-Region only. Cross-Region JOINs require Athena federation\n  with multiple connector instances.\n\n- NEVER assume Lake Formation grants are inherited. The\n  CloudTrailLake connector Lambda MUST have an explicit Lake\n  Formation grant on the underlying EDS. IAM alone is not\n  sufficient.\n\n- NEVER configure non-AWS ingestion without verifying Partner\n  registration. `PutAuditEvents` from a non-Partner role fails\n  silently in some configurations.\n\n- NEVER auto-execute a state-changing CloudTrail Lake CLI without\n  the CONFIRM gate. `delete-event-data-store` (after disabling\n  termination protection) is irreversible past the 7-day recovery\n  window.\n\n- NEVER skip capturing pre-state before `update-event-data-store`.\n  The prior configuration (event selectors, retention, KMS) is\n  overwritten; capture for rollback.\n\n- NEVER assume QuickSight connects to Lake directly. QuickSight\n  must go through Athena. Configure the Athena workgroup first,\n  then add Athena as a QuickSight data source.\n\n## Pre-flight safety checks (run before any remediation CLI)\n\n> Pre-flight safety checks moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — load on demand.\n\n## Expert heuristic: the partition-or-perish rule\n\n> Partition-or-perish heuristic moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — load on demand.\n\n## Recent AWS features (2024-2026)\n\n> Recent AWS features moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — load on demand.\n\n## References (load on demand)\n\n- [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — secondary worked examples (diagnose-empty-query BLOCKED, federate-via-athena COMPLETED)\n- [references\u002Ferror-handling.md](references\u002Ferror-handling.md) — malformed-input handling + the CloudTrail Lake failure-mode table\n- [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — live-account pre-flight command listing + pre-flight safety checks\n- [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — cost\u002Ftime baselines, Step 0 expert knowledge, partition-or-perish heuristic, recent AWS features\n- [references\u002Fpartiql-syntax-and-query-optimization.md](references\u002Fpartiql-syntax-and-query-optimization.md) — PartiQL subset, Lake event schema, partitioning and optimization patterns\n- [references\u002Fathena-federation-and-non-aws-ingestion.md](references\u002Fathena-federation-and-non-aws-ingestion.md) — Athena CloudTrailLake connector, Lake Formation grants, non-AWS Partner ingestion, QuickSight\n\n## Domain\n\nAWS CloudOps \u002F CloudTrail Lake, governance audit, multi-account\nsecurity analytics, and non-AWS event ingestion.\n\n## AWS documentation\n\n- **CloudTrail Lake User Guide** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fawscloudtrail\u002Flatest\u002Fuserguide\u002Fcloudtrail-lake.html\n- **Create an Event Data Store** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fawscloudtrail\u002Flatest\u002Fuserguide\u002Fquery-event-data-store.html\n- **CloudTrail Lake PartiQL queries** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fawscloudtrail\u002Flatest\u002Fuserguide\u002Fquery-federation.html\n- **CloudTrail Lake non-AWS events** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fawscloudtrail\u002Flatest\u002Fuserguide\u002Fquery-non-aws-events.html\n- **Athena CloudTrail Lake federation** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fathena\u002Flatest\u002Fug\u002Fcloudtrail-lake.html\n- **CloudTrail Lake pricing** — https:\u002F\u002Faws.amazon.com\u002Fcloudtrail\u002Fpricing\u002F\n- **CloudTrail Lake organization ingestion** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fawscloudtrail\u002Flatest\u002Fuserguide\u002Forganization-event-data-store.html\n- **CloudTrail Lake queries with JOIN** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fawscloudtrail\u002Flatest\u002Fuserguide\u002Fquery-language.html\n- **CloudTrail Lake KMS encryption** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fawscloudtrail\u002Flatest\u002Fuserguide\u002Fencryption-with-kms.html\n- **CloudTrail API Reference** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fawscloudtrail\u002Flatest\u002FAPIReference\u002FWelcome.html\n- **CloudTrail CLI Reference** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcli\u002Flatest\u002Freference\u002Fcloudtrail\u002F\n","# AWS CloudTrail Lake Operator\n\n## What this skill does\n\nExecutes AWS CloudTrail Lake operations correctly and safely across\nthe full ingestion-to-query surface. Runs deterministic pre-checks\nbefore any state-changing CLI — Event Data Store (EDS) Region\nselection (Lake is a Regional service; cross-Region ingestion\nrequires organization-level EDS), KMS encryption configuration\n(SSE-KMS via customer-managed key + key policy grant to\n`cloudtrail.amazonaws.com`), ingestion-source compatibility\n(allowed event categories: `CloudTrail management`, `CloudTrail\ndata`, `Config configuration snapshots`, `Audit Manager evidence`,\n`non-AWS events via Partner`, `CloudTrail Insights`), organization\ningestion (`isOrganizationService: true` requires the EDS be\ncreated by the management account), retention-period validity (90\nto 3653 days, or `INDEFINITE`), partitioning strategy (Lake\nauto-partitions on event time, but custom partition keys can be\nderived from `eventTime`, `eventSource`, `userIdentity.accountId`),\nPartiQL query syntax validity (SELECT, WHERE on `eventTime`,\n`eventSource`, `eventName`, `userIdentity` fields; JOIN across EDS\nin the same Region), Athena federation prerequisites (the Athena\nCloudTrailLake data source connector deployed, Lake Formation\ngrants on the connector, workgroup configured), QuickSight\npermissions (QuickSight service role allowed to assume the Athena\nworkgroup role), and non-AWS ingestion setup (a Partner event\nsource registered, the partner IAM role with\n`cloudtrail:PutAuditEvents`). Executes the change behind a CONFIRM\ngate, then verifies by running a smoke-test query and confirming\nrow count and approximate latency within expected bounds.\n\n## Quick navigation\n\n| Section | What it covers | When to read it |\n|---|---|---|\n| **§ Quick reference** | Verdict thresholds (BLOCKED\u002FREADY\u002FCOMPLETED) + pre-check priority | Before any operation |\n| **§ Mindset** | Why Lake is a Regional columnar store; the partition-or-perish trap; the no-schema-flex trap | Understanding the safety model |\n| **§ Pre-flight** | EDS + Athena federation gate — KMS, ingestion source, organization scope, query workgroup | Before executing any CLI |\n| **§ Process** | Per-operation planning: create-eds, update-eds, run-query, diagnose-empty-query, diagnose-slow-query, federate-via-athena, configure-non-aws-ingestion, configure-quicksight | When choosing which operation to run |\n| **§ Output format** | STRICT output contract — OPERATION\u002FVERDICT\u002FPRE_CHECKS\u002FSTEPS\u002FPOST_VERIFY\u002FNOTES template | Formatting the response |\n| **§ Anti-Patterns** | NEVER list — common mistakes that strand events or produce empty query results | Review before risky operations |\n| **§ Pre-flight safety** | Capture pre-state, KMS key policy, organization scope, Athena workgroup | Defense-in-depth |\n| **§ Expert heuristic** | Lake is a columnar store — never assume a query that compiles is fast | Avoiding the partition-or-perish trap |\n\n## STRICT output contract\n\nEVERY response MUST end with a single fenced text block in this exact\nshape (the operator's downstream tooling greps for it). No deviations:\n\n```text\nOPERATION: \u003Ccreate-eds | update-eds | run-query | diagnose-empty-query | diagnose-slow-query | federate-via-athena | configure-non-aws-ingestion | configure-quicksight>\nVERDICT: READY | BLOCKED | COMPLETED\nTARGET: \u003Ceds-id> (region: \u003Cregion>, ingestion: \u003Csources>) (query: \u003Csql-or-\"none\">)\nPRE_CHECKS:\n  - [PASS] \u003Ccheck description>\n  - [FAIL] \u003Ccheck description> — \u003Creason>\nSTEPS:\n  1. \u003CCLI command with flags populated, or \"(none — pre-checks failed)\">\n  2. \u003Cwait \u002F monitoring command>\nPOST_VERIFY:\n  - [PASS] \u003Cverification description> | (pending execution)\n  - [FAIL] \u003Cverification description> — \u003Creason>\nNOTES: \u003Cschedule, monitoring, caveats>\n```\n\nRules of the contract:\n\n- VERDICT is exactly one of `READY`, `BLOCKED`, `COMPLETED`. No other\n  values. `READY` means pre-checks passed and a CONFIRM gate is\n  pending; `BLOCKED` means at least one pre-check failed — do NOT\n  emit STEPS that mutate state; `COMPLETED` means post-verification\n  passed after execution.\n- If PRE_CHECKS has any `[FAIL]`, VERDICT MUST be `BLOCKED` and STEPS\n  MUST be `(none — pre-checks failed)`.\n- If VERDICT is `READY`, STEPS[1] MUST be the CONFIRM prompt and\n  STEPS[2] MUST be the actual CLI.\n- If VERDICT is `COMPLETED`, POST_VERIFY MUST contain at least one\n  `[PASS]` and no `[FAIL]`.\n- Never wrap the block in JSON, never abbreviate the field names,\n  never omit a section. If a section is empty, write `(none)`.\n\n## Quick reference — verdict thresholds\n\n| Verdict | Trigger condition | Action |\n|---|---|---|\n| `BLOCKED` | One or more pre-checks failed (EDS Region mismatch vs ingestion target, KMS key policy missing `cloudtrail.amazonaws.com` grant, organization EDS created by member account, retention period outside 90-3653 days, event category not in the allowed list, Athena workgroup missing, Lake Formation grant absent on the connector, partner event source not registered, QuickSight service role cannot assume the Athena workgroup role, PartiQL syntax error, JOIN across EDS in different Regions) | List failures, do NOT execute |\n| `READY` | All pre-checks passed; awaiting CONFIRM gate | Emit exact CLI sequence, wait for operator yes |\n| `COMPLETED` | Query returned `QueryStatus: FINISHED` AND post-verification passed (rows match expected count, latency within expected bound, no `QueryStatus: FAILED` or `CANCELLED`) | Emit verification results, monitoring plan |\n\n**Priority order for pre-checks (apply in this sequence, all must pass\nfor READY):**\n\n1. **EDS exists and is `Status: ENABLED`.** A `DELETING` or\n   `PENDING_DELETION` EDS cannot be queried or written to.\n2. **Region alignment.** Lake is Regional; a query can only reference\n   EDS in the same Region as the query API call. Cross-Region\n   analysis requires Athena federation or EDS replication.\n3. **Ingestion source compatibility.** The EDS `EventCategory` list\n   must include the intended source(s): `Management`, `Data`,\n   `ConfigConfiguration`, `AuditManagerEvidence`, `NetworkActivity`,\n   `Insights`, or non-AWS (Partner). Mismatches produce zero rows\n   in queries.\n4. **KMS encryption chain.** For SSE-KMS EDS, the customer-managed\n   key policy MUST grant `cloudtrail.amazonaws.com`\n   `kms:GenerateDataKey`, `kms:Decrypt`, and the caller needs\n   `kms:Decrypt` to read results.\n5. **Organization scope.** `isOrganizationService: true` EDS can\n   only be created by the management account. Member accounts can\n   only create standalone EDS for their own events.\n6. **Retention period validity.** 90 to 3653 days, or the literal\n   string `INDEFINITE`. Anything outside this range is rejected.\n7. **Multi-account ingestion.** For an org EDS, the management\n   account must enable AWS Organizations access for CloudTrail.\n8. **PartiQL syntax.** `SELECT` is the only DML allowed (no INSERT,\n   UPDATE, DELETE — non-AWS ingestion uses `PutAuditEvents` API).\n   WHERE must reference supported columns. Aggregation functions\n   (`COUNT`, `SUM`, `AVG`, `MIN`, `MAX`) and `GROUP BY` are\n   supported. JOIN across EDS in the same Region is supported.\n9. **Athena federation prerequisites.** Athena CloudTrailLake\n   connector deployed (Lambda-backed), Lake Formation grant on the\n   connector to the caller, Athena workgroup configured with output\n   location.\n10. **Non-AWS ingestion setup.** Partner event source registered;\n    partner IAM role has `cloudtrail:PutAuditEvents` plus\n    `kms:GenerateDataKey` on the EDS KMS key.\n\n> Cost\u002Ftime baselines moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — load on demand.\n\n## Mindset\n\n**One-line takeaway:** CloudTrail Lake is a Regional columnar store\nwith a fixed event schema — a query that compiles is not necessarily\nfast, and a zero-row result is more often a partition-miss than an\nempty source. Driven by three Lake realities:\n\n- **Lake is Regional.** An EDS in `us-east-1` cannot be queried from\n  `eu-west-1` via the Lake API directly. Cross-Region or cross-account\n  analysis requires Athena federation (with the CloudTrailLake\n  connector) or replicating events into a second EDS. Operators\n  routinely assume Lake is global like CloudTrail itself; it is NOT.\n- **Partition pruning is the only performance lever.** Lake\n  auto-partitions on event time; a WHERE clause on `eventTime` is\n  the single most impactful filter. Without a time bound, every\n  query is a full-table scan. Other partition keys (`eventSource`,\n  `eventName`) can help but are secondary to time.\n- **Non-AWS events require an explicit Partner integration.** The\n  EDS must declare `EventCategory: non-AWS` (Partner) and the\n  Partner event source must be registered. `PutAuditEvents` from a\n  non-Partner IAM role is rejected. Operators routinely assume any\n  external audit log can be pushed to Lake; only Partners in the\n  CloudTrail Lake partner program are supported.\n\n## Pre-flight: EDS + Athena federation gate\n\nRun before classification. Misclassifying these produces wrong plans.\n\n**Pagination:** `list-event-data-stores` paginates at 50.\n`list-queries` paginates at 50 by default. `get-query-results`\npaginates up to 1,000 rows per call; for larger results iterate.\n\n> Live-account pre-flight command listing moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — load on demand.\n\n> Malformed-input handling moved verbatim to [references\u002Ferror-handling.md](references\u002Ferror-handling.md) — load on demand.\n\n| EDS \u002F query attribute | Effect on operation |\n|---|---|\n| EDS `Status: DELETING` | create-eds BLOCKED; queries BLOCKED. Wait or pick another EDS. |\n| EDS `Status: PENDING_DELETION` | Recovery requires `undelete-event-data-store` within 7 days. Otherwise gone. |\n| `KmsKeyId` set but key policy missing `cloudtrail.amazonaws.com` | BLOCKED; key policy MUST grant cloudtrail `kms:GenerateDataKey`, `kms:Decrypt`. |\n| `IsOrganizationsEnabled: true` EDS created by member account | BLOCKED at creation; org EDS must be created by management account. |\n| `EventCategory` list missing the intended source | Queries return zero rows even when source data exists. |\n| `RetentionPeriod: 30` (\u003C 90) | BLOCKED at creation; min is 90 days. |\n| `RetentionPeriod: 4000` (> 3653) | BLOCKED at creation; max is 3653 days (10 years). |\n| `TerminationProtectionEnabled: true` and operator wants `delete-eds` | BLOCKED; disable protection first via `update-event-data-store`. |\n| Query SQL missing `WHERE eventTime BETWEEN ...` | WARNING; full-table scan. Always include a time bound. |\n| Query SQL references column not in Lake schema (e.g., `region`) | BLOCKED at runtime; only `awsRegion`, not `region`. |\n| Query SQL uses `JOIN` across EDS in different Regions | BLOCKED at runtime; JOIN is same-Region only. |\n| Query SQL uses DML other than `SELECT` | BLOCKED; Lake is read-only via PartiQL. |\n| Athena workgroup missing | BLOCKED; create or pick existing workgroup. |\n| Lake Formation grant missing on connector Lambda | BLOCKED; federated query returns `AccessDenied`. |\n| Partner event source not registered | BLOCKED; `PutAuditEvents` from partner role is rejected. |\n| Partner role missing `cloudtrail:PutAuditEvents` | BLOCKED; attach the IAM policy. |\n| QuickSight service role cannot assume Athena workgroup role | BLOCKED; add trust policy on the Athena role. |\n\n## Process — operation planning (apply in order)\n\n### Step 0: Expert knowledge — non-obvious CloudTrail Lake behaviors\n\n> Step 0 expert knowledge moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — load on demand.\n\n### Step 1: Pre-check gate — BLOCKED if any check fails\n\nRun ALL pre-checks for the chosen operation. If ANY fails, the verdict\nis BLOCKED with the failed checks in PRE_CHECKS. Do NOT execute.\n\n**For ALL operations:**\n1. EDS `EventDataStoreArn` exists (or operator is creating new) in\n   the expected account\u002FRegion.\n2. EDS `Status: ENABLED` (not `DELETING`, `PENDING_DELETION`).\n3. Caller has `cloudtrail:GetQuery`, `cloudtrail:StartQuery` on the\n   EDS ARN.\n\n**For create-eds (new `create-event-data-store`):**\n4. Caller is the management account IF `--is-organization-service`\n   is set.\n5. `--retention-period` is between 90 and 3653 days, or the literal\n   `INDEFINITE`.\n6. `--kms-key-id` (if set) exists; key policy grants\n   `cloudtrail.amazonaws.com` `kms:GenerateDataKey`, `kms:Decrypt`.\n7. `--advanced-event-selectors` reference valid event categories\n   (`Management`, `Data`, `ConfigConfiguration`,\n   `AuditManagerEvidence`, `NetworkActivity`, `Insights`, non-AWS).\n8. `--termination-protection-enabled` set (default true).\n9. For non-AWS: the Partner event source is registered.\n\n**For update-eds:**\n5. EDS exists.\n6. `TerminationProtectionEnabled` not blocking the update (deletion\n   requires first disabling).\n7. New `EventConfigurations` is internally consistent.\n8. Pre-state captured (full prior configuration).\n\n**For run-query:**\n5. PartiQL SQL is syntactically valid.\n6. SQL includes `WHERE eventTime BETWEEN ...` (partition pruning).\n7. SQL references only Lake-supported columns (`eventTime`,\n   `eventSource`, `eventName`, `awsRegion`, `userIdentity.*`,\n   `requestParameters.*`, `responseElements.*`, etc.).\n8. If `JOIN`, both EDS exist in the same Region.\n9. The EDS `EventCategory` list includes the categories the SQL\n   filters on.\n\n**For diagnose-empty-query (read-only, no BLOCKED gate):**\n4. Read the failure-mode table to identify the root cause from\n   `QueryStatus`, `BytesScanned`, `ResultsCount`.\n\n**For diagnose-slow-query (read-only, no BLOCKED gate):**\n4. Inspect `describe-query` for `BytesScanned`,\n   `QueryRunTimeInSeconds`. The fix is partition pruning or column\n   reduction.\n\n**For federate-via-athena:**\n5. Athena workgroup exists.\n6. CloudTrailLake connector Lambda deployed in the Region.\n7. Lake Formation grant on the connector Lambda for the EDS.\n8. Athena workgroup role has `cloudtrail:GetQuery`,\n   `cloudtrail:StartQuery`, `cloudtrail:GetQueryResults` on the EDS,\n   plus `kms:Decrypt` if SSE-KMS.\n\n**For configure-non-aws-ingestion:**\n5. Partner event source registered (Partner name matches a known\n   CloudTrail Lake partner).\n6. Partner IAM role has `cloudtrail:PutAuditEvents` on the EDS.\n7. Partner IAM role has `kms:GenerateDataKey` on the EDS KMS key.\n8. EDS `EventCategory` includes non-AWS.\n\n**For configure-quicksight:**\n5. QuickSight account registered.\n6. Athena workgroup exists and is configured for QuickSight.\n7. QuickSight service role can assume the Athena workgroup role.\n8. QuickSight SPICE capacity available (if importing).\n\n> Failure-mode table moved verbatim to [references\u002Ferror-handling.md](references\u002Ferror-handling.md) — load on demand.\n\n### Step 2: READY — emit operation plan\n\nIf all pre-checks pass, emit `VERDICT: READY` with the exact CLI\nsequence and the CONFIRM gate. The plan includes:\n\n- The exact AWS CLI command with all flags populated. For\n  `start-query` this is the SQL with the EDS ARN(s).\n- Expected query latency (10-30s partitioned; 5-15 min full scan).\n- Expected cost ($0.005\u002FGB scanned; partition pruning is the lever).\n- The CONFIRM gate prompt.\n- The monitoring step (`describe-query` poll until\n  `QueryStatus: FINISHED`).\n\n### Step 3: Execute behind CONFIRM gate\n\n- **MANDATORY CONFIRMATION GATE.** Before any state-changing CLI\n  (`create-event-data-store`, `update-event-data-store`,\n  `delete-event-data-store`, `start-query`, `restore-event-data-store`,\n  `undelete-event-data-store`), emit: `CONFIRM: About to \u003Coperation>\n  on EDS \u003Ceds-id> in account \u003Caccount> region \u003Cregion>. This will\n  \u003Cconsequence>. Proceed? (yes\u002Fno)`. Do NOT execute until the\n  operator confirms.\n- Capture pre-state for rollback: `aws cloudtrail get-event-data-store\n  --event-data-store \u003Cid> --output json > \u002Ftmp\u002F\u003Cid>-pre-$(date +%s).json`.\n- Execute the CLI. For `start-query`, the API returns a `QueryId`\n  immediately; the query runs asynchronously.\n- Poll `describe-query --query-id \u003Cid>` every 10 seconds (or longer\n  for big scans) until `QueryStatus` is `FINISHED`, `FAILED`, or\n  `CANCELLED`.\n\n### Step 4: Post-verification — COMPLETED\n\nAfter `QueryStatus: FINISHED`, run post-verification. ALL checks\nmust pass for `COMPLETED`.\n\n1. `describe-query` returns `QueryStatus: FINISHED`.\n2. `ResultsCount` matches the operator's expected row count (or\n   falls within a stated tolerance).\n3. `QueryRunTimeInSeconds` is within the expected bound (10-30s\n   partitioned; 5-15 min full scan).\n4. `BytesScanned` is reasonable for the time window (e.g., a 7-day\n   window on a 100 GB EDS scans ~7\u002F90 * 100 = ~7.8 GB).\n5. `get-query-results` returns rows with the expected columns.\n6. For aggregation queries: spot-check 3 aggregates against raw\n   rows.\n7. For Athena federated queries: Athena `query-execution` returns\n   `SUCCEEDED`; output location has the result object.\n\nIf ANY verification fails, emit `VERDICT: ERROR` with the failure\ndetails — do not claim COMPLETED. Route the failure back to\ndiagnose-empty-query or diagnose-slow-query.\n\n## Output format (per operation)\n\nSee § STRICT output contract above. The block MUST appear exactly in\nthat shape.\n\n### Worked example — create-eds (Management + Data, SSE-KMS, org-scoped)\n\n```text\nOPERATION: create-eds\nVERDICT: READY\nTARGET: new EDS \"org-governance-edS\" (region: us-east-1,\n          ingestion: Management + Data events, organization scope)\nPRE_CHECKS:\n  - [PASS] Caller is the management account 111111111111\n  - [PASS] --retention-period 365 within [90, 3653]\n  - [PASS] --kms-key-id arn:aws:kms:us-east-1:111111111111:key\u002FedS-cmk\n    exists, key policy grants cloudtrail.amazonaws.com\n    kms:GenerateDataKey + kms:Decrypt\n  - [PASS] AdvancedEventSelectors reference Management + Data\n    categories\n  - [PASS] --is-organization-service: AWS Organizations access for\n    CloudTrail is enabled\n  - [PASS] --termination-protection-enabled: true (default)\nSTEPS:\n  1. CONFIRM: About to create organization-scoped Event Data Store\n     \"org-governance-edS\" in account 111111111111 region us-east-1.\n     Ingests Management + Data events for ALL accounts in org\n     o-abc123def. Retention: 365 days. SSE-KMS with key edS-cmk.\n     First-day ingestion: ~5-50M events depending on activity.\n     Proceed? (yes\u002Fno)\n  2. aws cloudtrail create-event-data-store \\\n       --name org-governance-edS \\\n       --kms-key-id arn:aws:kms:us-east-1:111111111111:key\u002FedS-cmk \\\n       --retention-period 365 \\\n       --termination-protection-enabled \\\n       --is-organization-service \\\n       --advanced-event-selectors file:\u002F\u002F\u002Ftmp\u002Fselectors.json\n  3. aws cloudtrail list-event-data-stores --name-suffix org-governance-edS\nPOST_VERIFY: (pending execution)\nNOTES:\n  - This EDS ingests Management + Data events from ALL member\n    accounts in org o-abc123def. Data events for S3 dominate volume;\n    tune AdvancedEventSelectors to limit to specific buckets\u002Fprefixes\n    to control cost.\n  - Cost estimate at 25M events\u002Fday: ~$25\u002Fday ingestion +\n    ~$0.05\u002FGB-month storage. Lake Formation grants required for any\n    downstream reader.\n  - The KMS key policy MUST list cloudtrail.amazonaws.com — without\n    it, ingestion silently fails. Verify with\n    aws kms get-key-policy --key-id edS-cmk --policy-name default.\n  - This EDS is org-scoped; member accounts CANNOT create their own\n    org EDS. Member-account standalone EDS for their own events is\n    still allowed.\n```\n\n### Worked example — diagnose-empty-query (BLOCKED with fix)\n\n> Full example moved verbatim to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — load on demand.\n\n### Worked example — federate-via-athena (COMPLETED)\n\n> Full example moved verbatim to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — load on demand.\n\n## Anti-Patterns — NEVER\n\n- NEVER assume CloudTrail Lake is global. Each EDS lives in a\n  specific Region; cross-Region queries require Athena federation\n  with the CloudTrailLake connector. Hard-coded \"global\" assumptions\n  produce `EDS not in this Region` failures.\n\n- NEVER run a Lake query without a `WHERE eventTime BETWEEN ...`\n  filter. Lake auto-partitions on event time; without a time bound,\n  every query scans every partition. Add even a wide window (last\n  90 days) before narrowing.\n\n- NEVER assume a zero-row result means the EDS is empty. The\n  `EventCategory` list may not include the queried source, the\n  `eventTime` window may be outside retention, or the column name\n  may be wrong (`region` vs `awsRegion`). Always verify the EDS\n  config before concluding emptiness.\n\n- NEVER create an organization-scoped EDS from a member account.\n  Org-scoped EDS must be created by the management account. Member\n  accounts can only create standalone EDS for their own events.\n\n- NEVER set `--retention-period` outside [90, 3653] days. Values\n  below 90 or above 3653 are rejected by the API. Use\n  `INDEFINITE` (literal string) for unlimited retention.\n\n- NEVER assume `PutAuditEvents` works for any non-AWS source. Only\n  registered CloudTrail Lake Partners can push non-AWS events.\n  Operators cannot self-register; the Partner initiates.\n\n- NEVER delete an EDS without first checking\n  `TerminationProtectionEnabled`. If true (default for new EDS),\n  the delete fails. First call `update-event-data-store\n  --no-termination-protection-enabled`.\n\n- NEVER assume Athena federation is free. A federated query incurs\n  Athena scan cost ($5\u002FTB) on top of Lake query cost ($0.005\u002FGB).\n  Federation is for convenience, not cost savings.\n\n- NEVER SELECT * in a Lake query. Lake is columnar; selecting fewer\n  columns reduces bytes scanned and cost. Always project only the\n  columns needed.\n\n- NEVER use a column name other than what Lake exposes. Common\n  mistake: `region` instead of `awsRegion`, `time` instead of\n  `eventTime`. Always reference the Lake schema.\n\n- NEVER JOIN EDS across Regions via the native Lake API. JOIN is\n  same-Region only. Cross-Region JOINs require Athena federation\n  with multiple connector instances.\n\n- NEVER assume Lake Formation grants are inherited. The\n  CloudTrailLake connector Lambda MUST have an explicit Lake\n  Formation grant on the underlying EDS. IAM alone is not\n  sufficient.\n\n- NEVER configure non-AWS ingestion without verifying Partner\n  registration. `PutAuditEvents` from a non-Partner role fails\n  silently in some configurations.\n\n- NEVER auto-execute a state-changing CloudTrail Lake CLI without\n  the CONFIRM gate. `delete-event-data-store` (after disabling\n  termination protection) is irreversible past the 7-day recovery\n  window.\n\n- NEVER skip capturing pre-state before `update-event-data-store`.\n  The prior configuration (event selectors, retention, KMS) is\n  overwritten; capture for rollback.\n\n- NEVER assume QuickSight connects to Lake directly. QuickSight\n  must go through Athena. Configure the Athena workgroup first,\n  then add Athena as a QuickSight data source.\n\n## Pre-flight safety checks (run before any remediation CLI)\n\n> Pre-flight safety checks moved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — load on demand.\n\n## Expert heuristic: the partition-or-perish rule\n\n> Partition-or-perish heuristic moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — load on demand.\n\n## Recent AWS features (2024-2026)\n\n> Recent AWS features moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — load on demand.\n\n## References (load on demand)\n\n- [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — secondary worked examples (diagnose-empty-query BLOCKED, federate-via-athena COMPLETED)\n- [references\u002Ferror-handling.md](references\u002Ferror-handling.md) — malformed-input handling + the CloudTrail Lake failure-mode table\n- [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — live-account pre-flight command listing + pre-flight safety checks\n- [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — cost\u002Ftime baselines, Step 0 expert knowledge, partition-or-perish heuristic, recent AWS features\n- [references\u002Fpartiql-syntax-and-query-optimization.md](references\u002Fpartiql-syntax-and-query-optimization.md) — PartiQL subset, Lake event schema, partitioning and optimization patterns\n- [references\u002Fathena-federation-and-non-aws-ingestion.md](references\u002Fathena-federation-and-non-aws-ingestion.md) — Athena CloudTrailLake connector, Lake Formation grants, non-AWS Partner ingestion, QuickSight\n\n## Domain\n\nAWS CloudOps \u002F CloudTrail Lake, governance audit, multi-account\nsecurity analytics, and non-AWS event ingestion.\n\n## AWS documentation\n\n- **CloudTrail Lake User Guide** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fawscloudtrail\u002Flatest\u002Fuserguide\u002Fcloudtrail-lake.html\n- **Create an Event Data Store** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fawscloudtrail\u002Flatest\u002Fuserguide\u002Fquery-event-data-store.html\n- **CloudTrail Lake PartiQL queries** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fawscloudtrail\u002Flatest\u002Fuserguide\u002Fquery-federation.html\n- **CloudTrail Lake non-AWS events** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fawscloudtrail\u002Flatest\u002Fuserguide\u002Fquery-non-aws-events.html\n- **Athena CloudTrail Lake federation** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fathena\u002Flatest\u002Fug\u002Fcloudtrail-lake.html\n- **CloudTrail Lake pricing** — https:\u002F\u002Faws.amazon.com\u002Fcloudtrail\u002Fpricing\u002F\n- **CloudTrail Lake organization ingestion** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fawscloudtrail\u002Flatest\u002Fuserguide\u002Forganization-event-data-store.html\n- **CloudTrail Lake queries with JOIN** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fawscloudtrail\u002Flatest\u002Fuserguide\u002Fquery-language.html\n- **CloudTrail Lake KMS encryption** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fawscloudtrail\u002Flatest\u002Fuserguide\u002Fencryption-with-kms.html\n- **CloudTrail API Reference** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fawscloudtrail\u002Flatest\u002FAPIReference\u002FWelcome.html\n- **CloudTrail CLI Reference** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcli\u002Flatest\u002Freference\u002Fcloudtrail\u002F\n",{"name":5,"license":15,"metadata":24,"description":7,"compatibility":42},{"tags":25,"phase":26,"author":27,"domain":28,"family":29,"version":30,"keywords":31,"task_type":32,"complexity":33,"entry_point":34,"skill_class":35,"when_to_use":36,"requires_llm":37,"verdict_shape":38,"lifecycle_status":39,"invocation_schema":40,"supports_pipeline":37,"activation_triggers":41},"aws, cloudtrail, lake, governance, audit, security, partiql, athena, quicksight, operate","4","Jacky Chan — AWS Community Builder","aws-cloudops","Governance","0.1.0","AWS CloudTrail Lake, CloudTrail Lake, Event Data Store, EDS, PartiQL, CloudTrail query, federated query Athena, Athena CloudTrail Lake connector, non-AWS events CloudTrail, PutAuditEvents, CloudTrail data events, CloudTrail management events, AWS Config configuration snapshots, AWS Audit Manager evidence, CloudTrail Insights, organization trail Lake, multi-account CloudTrail Lake, Lake query optimization, CloudTrail Lake partitioning, QuickSight CloudTrail Lake","operate","high","false","capability","Creating or modifying an Event Data Store (EDS), configuring multi-account or organization-level ingestion into CloudTrail Lake, ingesting non-AWS events (SaaS apps, on-prem) via PutAuditEvents, writing PartiQL queries (SELECT, WHERE, JOIN, aggregation, time-window analytics), diagnosing a slow or empty- result query, federating Lake queries via Athena for cross- account or cross-Region analysis, building QuickSight dashboards on top of Athena-federated CloudTrail Lake, or configuring CloudTrail Insights events ingestion.","true","READY | BLOCKED | COMPLETED","active","Input: either (a) a CloudTrail Lake Event Data Store configuration (get-event-data-store, list-event-data-stores, get-query, get-query-results) plus the intended operation (create-eds, update-eds, run-query, diagnose-empty-query, diagnose-slow-query, federate-via-athena, configure-non-aws- ingestion, configure-quicksight), OR (b) a specific EDS + PartiQL SQL pair for live-account execution. Output: deterministic OPERATION \u002F VERDICT \u002F PRE_CHECKS \u002F STEPS \u002F POST_VERIFY \u002F NOTES block per operation, where VERDICT is one of READY, BLOCKED, COMPLETED.","create Event Data Store, CloudTrail Lake EDS, PartiQL query CloudTrail, federated query Athena, Athena CloudTrail Lake connector, non-AWS events CloudTrail, PutAuditEvents, ingest SaaS audit logs to AWS, CloudTrail data events to Lake, CloudTrail management events to Lake, AWS Config snapshots to Lake, Audit Manager evidence to Lake, CloudTrail Insights to Lake, organization CloudTrail Lake, multi-account CloudTrail Lake, CloudTrail Lake query slow, CloudTrail Lake empty results, QuickSight CloudTrail Lake","Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). No AWS CLI required for offline plan classification. Live-account operations use aws cloudtrail create-event-data-store, update-event-data-store, delete-event-data-store, list-event-data-stores, get-query, start-query, describe-query, get-query-results, get-event-data-store, list-queries, put-audit-events (with partner-type), aws lakeformation grant permissions (for Athena federation), aws athena...","main","eeace51bd5dd1db2030729d83eeab988861553aa","skills\u002Fcloudtrail-lake-operator",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":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add jhkchan\u002Faws-agent-skills --skill cloudtrail-lake-operator",{"tool":57,"command":58},"bunx","bunx skills add jhkchan\u002Faws-agent-skills --skill cloudtrail-lake-operator",{"tool":60,"command":61},"pnpm","pnpm dlx skills add jhkchan\u002Faws-agent-skills --skill cloudtrail-lake-operator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudtrail-lake-operator\u002FSKILL.md",true,[65,71,75,79,83,87,91,95,99,103,107,111,115,119,123,127,131,135,139,143,147],{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"eval\u002Ftest-cases.yaml","REFERENCE","参考文档",9362,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudtrail-lake-operator\u002Feval\u002Ftest-cases.yaml",{"path":72,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":73,"sourceHtmlUrl":74},"evals\u002Fbaselines\u002Fathena-federated-cross-region-completed.md",602,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudtrail-lake-operator\u002Fevals\u002Fbaselines\u002Fathena-federated-cross-region-completed.md",{"path":76,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":77,"sourceHtmlUrl":78},"evals\u002Fbaselines\u002Fcreate-eds-mgmt-events-sse-kms-ready.md",790,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudtrail-lake-operator\u002Fevals\u002Fbaselines\u002Fcreate-eds-mgmt-events-sse-kms-ready.md",{"path":80,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":81,"sourceHtmlUrl":82},"evals\u002Fbaselines\u002Fdiagnose-empty-query-event-category-mismatch-blocked.md",633,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudtrail-lake-operator\u002Fevals\u002Fbaselines\u002Fdiagnose-empty-query-event-category-mismatch-blocked.md",{"path":84,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":85,"sourceHtmlUrl":86},"evals\u002Fbaselines\u002Fdiagnose-slow-query-missing-time-filter-blocked.md",543,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudtrail-lake-operator\u002Fevals\u002Fbaselines\u002Fdiagnose-slow-query-missing-time-filter-blocked.md",{"path":88,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":89,"sourceHtmlUrl":90},"evals\u002Fbaselines\u002Frun-partiql-aggregation-ready.md",547,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudtrail-lake-operator\u002Fevals\u002Fbaselines\u002Frun-partiql-aggregation-ready.md",{"path":92,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":93,"sourceHtmlUrl":94},"evals\u002Feval_config.yaml",1979,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudtrail-lake-operator\u002Fevals\u002Feval_config.yaml",{"path":96,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":97,"sourceHtmlUrl":98},"evals\u002Fevals.json",4417,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudtrail-lake-operator\u002Fevals\u002Fevals.json",{"path":100,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":101,"sourceHtmlUrl":102},"evals\u002Fprompts\u002Fathena-federated-cross-region-completed.md",1717,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudtrail-lake-operator\u002Fevals\u002Fprompts\u002Fathena-federated-cross-region-completed.md",{"path":104,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":105,"sourceHtmlUrl":106},"evals\u002Fprompts\u002Fcreate-eds-mgmt-events-sse-kms-ready.md",1240,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudtrail-lake-operator\u002Fevals\u002Fprompts\u002Fcreate-eds-mgmt-events-sse-kms-ready.md",{"path":108,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":109,"sourceHtmlUrl":110},"evals\u002Fprompts\u002Fdiagnose-empty-query-event-category-mismatch-blocked.md",925,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudtrail-lake-operator\u002Fevals\u002Fprompts\u002Fdiagnose-empty-query-event-category-mismatch-blocked.md",{"path":112,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":113,"sourceHtmlUrl":114},"evals\u002Fprompts\u002Fdiagnose-slow-query-missing-time-filter-blocked.md",839,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudtrail-lake-operator\u002Fevals\u002Fprompts\u002Fdiagnose-slow-query-missing-time-filter-blocked.md",{"path":116,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":117,"sourceHtmlUrl":118},"evals\u002Fprompts\u002Frun-partiql-aggregation-ready.md",704,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudtrail-lake-operator\u002Fevals\u002Fprompts\u002Frun-partiql-aggregation-ready.md",{"path":120,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":121,"sourceHtmlUrl":122},"examples\u002FREADME.md",8615,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudtrail-lake-operator\u002Fexamples\u002FREADME.md",{"path":124,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":125,"sourceHtmlUrl":126},"references\u002Fadvanced-patterns.md",10166,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudtrail-lake-operator\u002Freferences\u002Fadvanced-patterns.md",{"path":128,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":129,"sourceHtmlUrl":130},"references\u002Fathena-federation-and-non-aws-ingestion.md",9664,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudtrail-lake-operator\u002Freferences\u002Fathena-federation-and-non-aws-ingestion.md",{"path":132,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":133,"sourceHtmlUrl":134},"references\u002Fdiagnostic-commands.md",3711,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudtrail-lake-operator\u002Freferences\u002Fdiagnostic-commands.md",{"path":136,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":137,"sourceHtmlUrl":138},"references\u002Ferror-handling.md",2755,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudtrail-lake-operator\u002Freferences\u002Ferror-handling.md",{"path":140,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":141,"sourceHtmlUrl":142},"references\u002Fpartiql-syntax-and-query-optimization.md",8738,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudtrail-lake-operator\u002Freferences\u002Fpartiql-syntax-and-query-optimization.md",{"path":144,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":145,"sourceHtmlUrl":146},"references\u002Fworked-examples.md",4341,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudtrail-lake-operator\u002Freferences\u002Fworked-examples.md",{"path":148,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":149,"sourceHtmlUrl":150},"skill.usf.yaml",4733,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudtrail-lake-operator\u002Fskill.usf.yaml",[152,159,166,173,180,187],{"skillNo":153,"name":154,"nameZh":6,"description":155,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":156,"categories":157,"keywords":158,"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":160,"name":161,"nameZh":6,"description":162,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":163,"categories":164,"keywords":165,"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":167,"name":168,"nameZh":6,"description":169,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":170,"categories":171,"keywords":172,"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":174,"name":175,"nameZh":6,"description":176,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":177,"categories":178,"keywords":179,"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":181,"name":182,"nameZh":6,"description":183,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":184,"categories":185,"keywords":186,"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":188,"name":189,"nameZh":6,"description":190,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":191,"categories":192,"keywords":193,"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",[],[]]