querying-aws-cloudwatch
Skill2.8k starsChanged 6 months agoApache-2.0View on GitHub
Runs SQL queries on CloudWatch Logs data exported as Apache Iceberg tables in S3 Tables. Covers VPC Flow Logs, WAF logs, CloudFront access logs, Route 53 resolver logs, Network Firewall logs, EKS audit logs, Verified Access logs, SES logs, VPC Lattice logs, Step Functions logs, NLB access logs, and 20+ other AWS vended data sources. Applies when analyzing network traffic, investigating security incidents, querying exported logs with SQL, enabling S3 Tables integration, configuring log export, correlating logs with other data, or running Athena queries on the aws-cloudwatch table bucket. Trigger phrases: query logs with SQL, analyze logs in Athena, SQL on VPC flow logs, investigate network traffic, run SQL on exported logs, enable S3 Tables for CloudWatch, correlate logs, historical log analysis, set up log querying.
Trending
Quiet since October.about the whole repository
Who's talking about aws/agent-toolkit-for-aws
- A Hacker News story“Agent Toolkit for AWS”Hacker News · Jun 8, 2026 · 5 points
- @yug1224.com“AIエージェントがAWS環境の構築や運用を効率よく行うための公式ツールキットらしい ClaudeやCursorなどのエージェントに導入して開発を自動化するのが楽しみ yug1224 starred …”Bluesky · Jun 27, 2026 · 2 likes
- @librecanada.bsky.social“GitHub - Webpage "GitHub - aws/agent-toolkit-for-aws: Official, AWS-supported MCP servers, skills, and …”Bluesky · May 10, 2026 · 2 likes
- @yug1224.com“AIエージェントにAWSの操作や開発をサポートさせるためのツールキットらしい 実務でAIを活用してインフラ構築を効率化するのに使えそう yug1224 starred aws/agent-toolkit-for-aws…”Bluesky · Jun 27, 2026 · 1 likes
- sudosubin/agents.nix“agent-skills.github.aws.agent-toolkit-for-aws: 0-unstable-2026-10-03 → 0-unstable-2026-10-05”GitHub · Oct 5, 2026
The biggest 5 of 44 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 44
Talked about on GitHub, Bluesky and Hacker News (44 times).
On GitHub · 39
- Oct 5, 2026agent-skills.github.aws.agent-toolkit-for-aws: 0-unstable-2026-10-03 → 0-unstable-2026-10-05 — sudosubin/agents.nix0 reactions
- Oct 4, 2026codex-plugins.github.aws.agent-toolkit-for-aws: init at 0-unstable-2026-10-03 — sudosubin/agents.nix0 reactions
- Oct 4, 2026codex-marketplaces.github.aws.agent-toolkit-for-aws: init at 0-unstable-2026-10-03 — sudosubin/agents.nix0 reactions
- Oct 4, 2026claude-code-plugins.github.aws.agent-toolkit-for-aws: init at 0-unstable-2026-10-03 — sudosubin/agents.nix0 reactions
- Oct 4, 2026agent-plugins.github.aws.agent-toolkit-for-aws: init at 0-unstable-2026-10-03 — sudosubin/agents.nix0 reactions
34 more on GitHub
- Oct 3, 2026agent-skills.github.aws.agent-toolkit-for-aws: init at 0-unstable-2026-10-03 — sudosubin/agents.nix0 reactions
- Oct 3, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Oct 1, 2026docs(aws): update EFS performance guidance — mouadja02/skills0 reactions
- Sep 30, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 28, 2026aws-skills: upstream update — robomotionio/robomotion-skills0 reactions
- Sep 24, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 23, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 23, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 19, 2026Agent toolkit for AWS — freeflow-community/skill-explorer0 reactions · 1 comment
- Sep 19, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 19, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 8, 2026aws-core: marketplace pins agent-toolkit-for-aws to a pre-fix commit — asm-exec resolves no secrets (fixed upstream, PR #296) — anthropics/claude-plugins-official0 reactions
- Sep 8, 2026feat(telemetry): hook-driven migration telemetry emitter with on-disk attribution — awslabs/startups0 reactions · 1 comment
- Sep 3, 2026(aws-api-mcp-server): MIGRATION.md lists aws___call_aws as a live tool, AWS removed it on 2026-08-31 — awslabs/mcp0 reactions
- Aug 25, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Aug 21, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Aug 18, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Aug 14, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Aug 11, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Aug 7, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Aug 7, 2026Skills 需补充 references 参考文档(对标 AWS agent-toolkit) — huaweicloud-mate/huaweicloud-devkit0 reactions
- Aug 4, 2026fix: discover skills nested under two categories — vercel-labs/skills0 reactions
- Aug 4, 2026Expand development environment sections — aws/aws-durable-execution-docs0 reactions · 1 comment
- Aug 4, 2026Schedule Batch: Media Host port (JPG convert, S3 upload/delete) with fake + live adapter — SandroBlunt/OrganicGrowthLegacy0 reactions
- Aug 3, 2026add agent skill for using this package — correspondMerchant/LAGO-R-Package0 reactions
- Jul 31, 2026[docs]: Remove Duplicated Kiro Power Content — aws/aws-durable-execution-docs0 reactions
- Jul 25, 2026Install and configure APM tool — scalasm/strands-agents0 reactions
- Jul 7, 2026feat: add Claude Platform on AWS migration skill (.claude/skills/) — aws-samples/anthropic-on-aws0 reactions · 5 comments
- Jul 6, 2026Add weekly AWS resources - 2026-07-06 — sebastianmarines/awesome-aws0 reactions
- Jun 26, 2026agent-toolkit-for-aws: AWS 환경을 위한 MCP 서버 및 도구 모음 — roomedia/ax-trend0 reactions
- Jun 26, 2026Add aws/agent-toolkit-for-aws to Awesome Open Source AI — alvinreal/awesome-opensource-ai0 reactions
- Jun 23, 2026Sandbox backend: AWS Lambda microVMs (Firecracker) — sseshachala/conductai0 reactions
- Jun 17, 2026Agent skills — ryandam9/Explorer0 reactions
- May 14, 2026[Bug]: Cannot install skill using the `npx skills add` command — vercel-labs/skills0 reactions
On Bluesky · 4
- Jun 27, 2026AIエージェントがAWS環境の構築や運用を効率よく行うための公式ツールキットらしい ClaudeやCursorなどのエージェントに導入して開発を自動化するのが楽しみ yug1224 starred aws/agent-toolkit-for-aws… — @yug1224.com2 likes and reposts · 1 reply
- May 10, 2026GitHub - Webpage "GitHub - aws/agent-toolkit-for-aws: Official, AWS-supported MCP servers, skills, and plugins to help AI agents build on… — @librecanada.bsky.social2 likes and reposts
- Jun 27, 2026AIエージェントにAWSの操作や開発をサポートさせるためのツールキットらしい 実務でAIを活用してインフラ構築を効率化するのに使えそう yug1224 starred aws/agent-toolkit-for-aws… — @yug1224.com1 likes and repost
- May 8, 2026aws/agent-toolkit-for-aws: Official, AWS-supported MCP servers, skills, and plugins to help AI agents build on AWS #devopsish — @chrisshort.net0 likes and reposts · 1 reply
On Hacker News · 1
- Jun 8, 2026Agent Toolkit for AWS5 points
In this repository185 other files it gives its agents.
- analyzing-release-readinessSkill
- chatting-with-aws-devops-agentSkill
- coordinating-multi-space-devops-agentSkill
- diff-scanning-with-aws-security-agentSkill
- investigating-incidents-with-aws-devops-agentSkill
- pentesting-with-aws-security-agentSkill
- remediating-with-aws-security-agentSkill
- running-release-testsSkill
- scanning-with-aws-security-agentSkill
- setup-devops-agentSkill
- setup-security-agentSkill
- setupSkill
- threat-modeling-with-aws-security-agentSkill
- agents-buildSkill
- agents-connectSkill
- agents-debugSkill
- agents-deploySkill
- agents-get-startedSkill
- agents-hardenSkill
- agents-optimizeSkill
- agents-paySkill
- agents-paySkill
- amazon-bedrockSkill
- aws-ai-mlSkill
- aws-authSkill
- aws-billing-and-cost-managementSkill
- aws-blocksSkill
- aws-cdkSkill
- aws-cloudformationSkill
- aws-computeSkill
- aws-containersSkill
- aws-databaseSkill
- aws-deploymentSkill
- aws-iamSkill
- aws-messaging-and-streamingSkill
- aws-networkingSkill
- aws-observabilitySkill
- aws-sdk-js-v3-usageSkill
- aws-sdk-python-usageSkill
- aws-sdk-swift-usageSkill
- aws-secrets-managerSkill
- aws-securitySkill
- aws-serverlessSkill
- aws-storageSkill
- aws-well-architected-reviewSkill
- launch-with-awsSkill
- signing-in-to-awsSkill
- amazon-opensearch-serviceSkill
- authoring-mwaa-workflowSkill
- connecting-to-data-sourceSkill
- creating-data-lake-tableSkill
- debugging-mwaa-workflowSkill
- exploring-data-catalogSkill
- finding-data-lake-assetsSkill
- ingesting-into-data-lakeSkill
- querying-data-lakeSkill
- redshift-guideSkill
- storing-and-querying-vectorsSkill
- testing-mwaa-workflowSkill
- upgrading-mwaa-environmentsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 262
If using a customer managed KMS key, grant both service principals access:
- Very specific: line 294
Use Lake Formation column-level security to restrict access to sensitive columns (e.g., srcaddr, source_ip_address, httpRequest).
- Very specific: line 296
Prefer specific data source associations over wildcard (*/*) to limit which data sources are exported to queryable tables.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Query AWS CloudWatch System Tables
Overview
Works best with the AWS MCP server for sandboxed execution and audit logging. All commands below use the AWS CLI and work in any environment with configured AWS credentials.
The CloudWatch Logs S3 Tables integration exports log data as Apache Iceberg tables in the AWS-managed aws-cloudwatch table bucket. This enables SQL analysis via Amazon Athena and correlation of log data with non-CloudWatch data (S3 metadata, business tables, etc.). Available at no additional storage charge beyond CloudWatch ingestion pricing.
Decision Tree
| User intent | Use this skill? | Alternative |
| Run SQL across large volumes of log data | Yes | — |
| Correlate logs with S3 metadata or other tables | Yes — join across catalogs | — |
| Quick log search / pattern matching | No | CloudWatch Logs Insights (faster for ad-hoc) |
| Real-time log streaming/tailing | No | CloudWatch Logs console or logs filter-log-events |
| Set up alarms on log patterns | No | CloudWatch Metric Filters / Alarms |
| Query historical logs before integration was enabled | No | CloudWatch Logs (no backfill in S3 Tables) |
Supported Data Sources
The following data sources are available through the S3 Tables integration. Each data source has a namespace pattern used in SQL queries. Not all AWS vended data sources may be available in all Regions; check the CloudWatch console Data Sources tab for current availability.
| Data Source | Namespace pattern | Common use case |
| VPC Flow Logs | amazon_vpc__flow | Network traffic analysis, rejected connections |
| WAF Logs | aws_waf__logs | Blocked requests, rule hit analysis |
| CloudFront Access Logs | amazon_cloudfront__access | CDN traffic patterns, error rates |
| Route 53 Resolver Query Logs | amazon_route53resolver__query | DNS query analysis |
| Network Firewall Logs | aws_networkfirewall__logs | Firewall rule hits, dropped traffic |
| EKS Audit Logs | amazon_eks__audit | Kubernetes API audit trail |
| Verified Access Logs | amazon_verifiedaccess__logs | Zero-trust access decisions |
| SES Mail Logs | amazon_ses__mail | Email delivery/bounce tracking |
| VPC Lattice Access Logs | amazon_vpclattice__access | Service-to-service access patterns |
| Step Functions Logs | aws_stepfunctions__logs | Workflow execution debugging |
| Global Accelerator Flow Logs | aws_globalaccelerator__flow | Global network traffic |
| NLB Access Logs | elastic_load_balancing__nlb_access | Load balancer request tracing |
| Shield Logs | aws_shield__logs | DDoS mitigation events |
| Cognito Logs | amazon_cognito__logs | Auth/identity operations |
| ElastiCache Logs | amazon_elasticache__logs | Redis slow log, engine log |
| SageMaker Logs | amazon_sagemaker__logs | ML training/inference events |
| WorkMail Audit Logs | amazon_workmail__audit | Email security/compliance |
| Bedrock Agent Logs | aws_bedrock_agent_core__logs | AI agent invocations |
| Client VPN Logs | aws_client_vpn__connections | VPN connection tracking |
| Entity Resolution Logs | aws_entity_resolution__logs | Record matching operations |
| MediaPackage Access Logs | aws_elemental_mediapackage__access | Streaming delivery metrics |
| MediaTailor Logs | aws_elemental_mediatailor__logs | Ad insertion events |
| Transfer Family Logs | aws_transfer_family__logs | SFTP/FTPS file transfer tracking |
| Site-to-Site VPN Logs | aws_site_to_site_vpn__logs | VPN tunnel diagnostics |
Note: This table lists the 24 most commonly queried data sources. The integration supports 43+ AWS vended data sources in total. Use
list-namespaceson theaws-cloudwatchbucket to discover all available data sources in your account. Namespace patterns follow the convention<service>__<type>.
Common Tasks
1. Check If Configured
# Check if the aws-cloudwatch table bucket exists
aws s3tables list-table-buckets --region <REGION> \
--query "tableBuckets[?name=='aws-cloudwatch']"- Empty result → integration not enabled. Guide user through setup.
- Bucket exists but no namespaces → integration enabled but no log data yet (only captures events after association).
List available tables:
aws s3tables list-namespaces --table-bucket-arn arn:aws:s3tables:<REGION>:<ACCOUNT>:bucket/aws-cloudwatch --region <REGION>
aws s3tables list-tables --table-bucket-arn arn:aws:s3tables:<REGION>:<ACCOUNT>:bucket/aws-cloudwatch --namespace <NAMESPACE> --region <REGION>2. Enable / Configure
Create integration:
aws observabilityadmin create-s3-table-integration \
--region <REGION> \
--encryption '{"SseAlgorithm": "aws:kms", "KmsKeyArn": "<KMS_KEY_ARN>"}' \
--role-arn <SERVICE_ROLE_ARN>Associate a specific data source (recommended):
aws logs associate-source-to-s3-table-integration \
--region <REGION> \
--integration-arn <INTEGRATION_ARN> \
--data-source '{"name": "<source-name>", "type": "<source-type>"}'Associate all data sources (wildcard):
⚠️ Warning: Wildcard association delivers all current and future data sources to S3 Tables. Use specific associations for tighter control over what log data lands in queryable tables.
aws logs associate-source-to-s3-table-integration \
--region <REGION> \
--integration-arn <INTEGRATION_ARN> \
--data-source '{"name": "*", "type": "*"}'For IAM requirements (service role trust policy, permissions policy, condition keys), see Security Considerations below.
3. Verify Permissions for Querying
Requires:
- S3 Tables federated catalog registered in Glue (
s3tablescatalog) - Lake Formation SELECT + DESCRIBE grants on the table (or IAM-only mode in supported regions)
- Athena execution permissions
Grant access:
aws lakeformation grant-permissions \
--principal DataLakePrincipalIdentifier=<ROLE_ARN> \
--resource '{"Table": {"CatalogId": "<ACCOUNT>:s3tablescatalog/aws-cloudwatch", "DatabaseName": "<NAMESPACE>", "Name": "<TABLE>"}}' \
--permissions DESCRIBE SELECT \
--region <REGION>4. Query
Query syntax:
"s3tablescatalog/aws-cloudwatch"."<namespace>"."<table>"Constraints:
You MUST ALWAYS run get-tables on the target namespace and include the command in your response before writing any SQL query — schemas vary by data source. Never skip this step even if you already know the likely schema. Run
get-tablesonce on the target namespace (one call returns all tables + columns + types + descriptions):aws glue get-tables --catalog-id "<ACCOUNT>:s3tablescatalog/aws-cloudwatch" --database-name "<namespace>" --region <REGION>- You MUST confirm workgroup and output location before executing
- You MUST inform user that only logs received after association are available (no backfill)
Example — VPC Flow Logs rejected traffic:
SELECT srcaddr, dstaddr, dstport, protocol, packets, bytes
FROM "s3tablescatalog/aws-cloudwatch"."amazon_vpc__flow"."<table>"
WHERE action = 'REJECT'
ORDER BY bytes DESC
LIMIT 50;Example — WAF blocked requests:
SELECT timestamp, action, terminatingRuleId, httpSourceId
FROM "s3tablescatalog/aws-cloudwatch"."aws_waf__logs"."<table>"
WHERE action = 'BLOCK'
ORDER BY timestamp DESC
LIMIT 50;Example — correlate VPC Flow Logs with S3 object metadata:
SELECT f.srcaddr, f.dstaddr, f.bytes, j.key, j.record_type
FROM "s3tablescatalog/aws-cloudwatch"."amazon_vpc__flow"."<table>" f
JOIN "s3tablescatalog/aws-s3"."b_<bucket>"."journal" j
ON f.srcaddr = j.source_ip_address
WHERE j.record_type = 'CREATE'
AND f.action = 'ACCEPT';Key Behaviors
- No backfill — only new log events after association are delivered to S3 Tables
- Retention follows log group — when log group retention expires, data is removed from the table
- Deleting a log group removes its data from the S3 table
- No additional storage charge — included in CloudWatch pricing
- Schemas are per-data-source — always run
get-tableson the target namespace before building complex queries
Troubleshooting
| Error | Cause | Fix |
aws-cloudwatch bucket not found | Integration not created | Run create-s3-table-integration |
| Bucket exists but no namespaces | No data sources associated, or no log traffic since association | Associate sources; generate traffic |
CATALOG_NOT_FOUND in Athena | S3 Tables not registered in Glue | Enable integration: S3 console > Table buckets > Enable integration |
AccessDenied on query | Missing Lake Formation grants or IAM permissions | See Security Considerations below |
| Empty results | Logs only flow after association; no backfill | Confirm association exists and log source is actively generating data |
| Schema mismatch / column not found | Log type schema updated by AWS | Run get-tables on the namespace to get current columns |
Security Considerations
Service Role Trust Policy
The service role must allow logs.amazonaws.com to assume it. Always include aws:SourceAccount and aws:SourceArn condition keys to prevent confused deputy attacks:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "logs.amazonaws.com"
},
"Action": "sts:AssumeRole",
"Condition": {
"StringEquals": {
"aws:SourceAccount": "<ACCOUNT>"
},
"ArnLike": {
"aws:SourceArn": ["arn:aws:logs:<REGION>:<ACCOUNT>:log-group:<LOG_GROUP_NAME>"]
}
}
}
]
}Service Role Permissions Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["logs:integrateWithS3Table"],
"Resource": ["arn:aws:logs:<REGION>:<ACCOUNT>:log-group:<LOG_GROUP_NAME>"],
"Condition": {
"StringEquals": {
"aws:ResourceAccount": "<ACCOUNT>"
}
}
}
]
}KMS Key Policy (for encrypted data)
If using a customer managed KMS key, grant both service principals access:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "EnableSystemTablesKeyUsage",
"Effect": "Allow",
"Principal": {"Service": "systemtables.cloudwatch.amazonaws.com"},
"Action": ["kms:DescribeKey", "kms:GenerateDataKey", "kms:Decrypt"],
"Resource": "arn:aws:kms:<REGION>:<ACCOUNT>:key/<KEY_ID>",
"Condition": {"StringEquals": {"aws:SourceAccount": "<ACCOUNT>"}}
},
{
"Sid": "EnableS3TablesMaintenanceKeyUsage",
"Effect": "Allow",
"Principal": {"Service": "maintenance.s3tables.amazonaws.com"},
"Action": ["kms:GenerateDataKey", "kms:Decrypt"],
"Resource": "arn:aws:kms:<REGION>:<ACCOUNT>:key/<KEY_ID>",
"Condition": {"StringLike": {"kms:EncryptionContext:aws:s3:arn": "<TABLE_OR_TABLE_BUCKET_ARN>/*"}}
}
]
}Data Sensitivity
Log data may contain PII including IP addresses, user agents, request parameters, and authentication tokens. Treat all exported log tables as sensitive by default.
Access Control Best Practices
- Use Lake Formation column-level security to restrict access to sensitive columns (e.g.,
srcaddr,source_ip_address,httpRequest). Grant permissions to specific tables and columns rather than wildcards. - Configure SSE-KMS encryption on the Athena workgroup output bucket to protect query results at rest.
- Prefer specific data source associations over wildcard (
*/*) to limit which data sources are exported to queryable tables.
Audit Trail
Enable CloudTrail logging for Athena (StartQueryExecution, GetQueryResults) and Lake Formation (GrantPermissions, RevokePermissions) API calls to maintain an audit trail of who queried what data.
Additional Resources
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

