$npx -y skills add github/awesome-copilot --skill aws-resource-queryQuery AWS resources using natural language. Covers EC2, S3, RDS, Lambda, ECS, EKS, Secrets Manager, IAM, VPC, networking, messaging, and more. Strictly read-only — no writes, deletes, or mutations.
| 1 | # AWS Resource Query |
| 2 | |
| 3 | Answer natural language questions about AWS resources by translating intent into read-only AWS CLI commands. This skill **never** runs commands that create, modify, or delete resources. |
| 4 | |
| 5 | ## Safety Contract |
| 6 | |
| 7 | **STRICTLY READ-ONLY.** This skill exclusively uses: |
| 8 | - `aws <service> describe-*` |
| 9 | - `aws <service> list-*` |
| 10 | - `aws <service> get-*` |
| 11 | - `aws sts get-caller-identity` |
| 12 | - `aws configure get` |
| 13 | - `aws resourcegroupstaggingapi get-resources` |
| 14 | - `aws ce get-*` |
| 15 | - `aws support describe-*` |
| 16 | |
| 17 | **NEVER** run any of the following, regardless of what the user asks: |
| 18 | `create-*`, `run-*`, `start-*`, `stop-*`, `reboot-*`, `delete-*`, `terminate-*`, `put-*`, `update-*`, `modify-*`, `attach-*`, `detach-*`, `send-*`, `publish-*`, `invoke-*`, `execute-*` |
| 19 | |
| 20 | If the user's query implies a write action, respond: |
| 21 | > "This skill is read-only. I can show you the current state of [resource], but I cannot [create/modify/delete] it. Would you like to see what currently exists?" |
| 22 | |
| 23 | ## Workflow |
| 24 | |
| 25 | ### Step 1: Parse Intent |
| 26 | Identify: target service(s), scope (all / filtered / specific), detail level, and region. |
| 27 | |
| 28 | ### Step 2: Confirm Account & Region |
| 29 | ```bash |
| 30 | aws sts get-caller-identity --query '{Account:Account,UserId:UserId}' |
| 31 | aws configure get region |
| 32 | ``` |
| 33 | Append `--region <region>` to all commands when the user specifies one. |
| 34 | |
| 35 | ### Step 3: Execute & Format |
| 36 | Run the matched read-only command(s) below and format results as a readable table. For large result sets show a count first and offer to filter further. |
| 37 | |
| 38 | --- |
| 39 | |
| 40 | ## Intent → Command Mapping |
| 41 | |
| 42 | ### COMPUTE |
| 43 | |
| 44 | #### EC2 Instances |
| 45 | ```bash |
| 46 | # "list EC2 instances" / "show my VMs" / "what instances are running" |
| 47 | aws ec2 describe-instances \ |
| 48 | --query 'Reservations[].Instances[].[InstanceId,InstanceType,State.Name,Tags[?Key==`Name`].Value|[0],PrivateIpAddress,PublicIpAddress]' \ |
| 49 | --output table |
| 50 | |
| 51 | # "running instances only" |
| 52 | aws ec2 describe-instances --filters Name=instance-state-name,Values=running \ |
| 53 | --query 'Reservations[].Instances[].[InstanceId,InstanceType,Tags[?Key==`Name`].Value|[0],PrivateIpAddress]' \ |
| 54 | --output table |
| 55 | |
| 56 | # "stopped instances" |
| 57 | aws ec2 describe-instances --filters Name=instance-state-name,Values=stopped \ |
| 58 | --query 'Reservations[].Instances[].[InstanceId,InstanceType,Tags[?Key==`Name`].Value|[0]]' \ |
| 59 | --output table |
| 60 | |
| 61 | # "instance types in use" |
| 62 | aws ec2 describe-instances --query 'Reservations[].Instances[].InstanceType' --output text | sort | uniq -c | sort -rn |
| 63 | |
| 64 | # "auto scaling groups" / "ASGs" |
| 65 | aws autoscaling describe-auto-scaling-groups \ |
| 66 | --query 'AutoScalingGroups[].[AutoScalingGroupName,MinSize,MaxSize,DesiredCapacity]' --output table |
| 67 | |
| 68 | # "elastic IPs" / "EIPs" |
| 69 | aws ec2 describe-addresses \ |
| 70 | --query 'Addresses[].[PublicIp,InstanceId,AllocationId,AssociationId]' --output table |
| 71 | |
| 72 | # "key pairs" |
| 73 | aws ec2 describe-key-pairs \ |
| 74 | --query 'KeyPairs[].[KeyName,CreateTime]' --output table |
| 75 | |
| 76 | # "AMIs I own" |
| 77 | aws ec2 describe-images --owners self \ |
| 78 | --query 'Images[].[ImageId,Name,CreationDate,State]' --output table |
| 79 | |
| 80 | # "spot instances" |
| 81 | aws ec2 describe-spot-instance-requests \ |
| 82 | --query 'SpotInstanceRequests[].[SpotInstanceRequestId,State,InstanceId,LaunchSpecification.InstanceType]' --output table |
| 83 | ``` |
| 84 | |
| 85 | #### Lambda Functions |
| 86 | ```bash |
| 87 | # "list Lambda functions" / "show serverless functions" |
| 88 | aws lambda list-functions \ |
| 89 | --query 'Functions[].[FunctionName,Runtime,MemorySize,Timeout,LastModified]' --output table |
| 90 | |
| 91 | # "Lambda function details for <name>" |
| 92 | aws lambda get-function-configuration --function-name <name> |
| 93 | |
| 94 | # "Lambda event source mappings" / "Lambda triggers" |
| 95 | aws lambda list-event-source-mappings \ |
| 96 | --query 'EventSourceMappings[].[FunctionArn,EventSourceArn,State,BatchSize]' --output table |
| 97 | |
| 98 | # "Lambda layers" |
| 99 | aws lambda list-layers \ |
| 100 | --query 'Layers[].[LayerName,LatestMatchingVersion.LayerVersionArn]' --output table |
| 101 | |
| 102 | # "Lambda concurrency for <name>" |
| 103 | aws lambda get-function-concurrency --function-name <name> |
| 104 | ``` |
| 105 | |
| 106 | #### ECS |
| 107 | ```bash |
| 108 | # "ECS clusters" |
| 109 | aws ecs list-clusters --query 'clusterArns' --output table |
| 110 | |
| 111 | # "ECS cluster details" |
| 112 | aws ecs describe-clusters \ |
| 113 | --clusters $(aws ecs list-clusters --query 'clusterArns[]' --output text) \ |
| 114 | --query 'clusters[].[clusterName,status,runningTasksCount,activeServicesCount]' --output table |
| 115 | |
| 116 | # "ECS services in <cluster>" |
| 117 | aws ecs describe-services --cluster <cluster> \ |
| 118 | --services $(aws ecs list-services --cluster <cluster> --query 'serviceArns[]' --output text) \ |
| 119 | --query 'services[].[serviceName,status,runningCount,desiredCount]' --output table |
| 120 | |
| 121 | # "ECS task definitions" |
| 122 | aws ecs list-task-definitions --query 'taskDefinitionArns' --output table |
| 123 | ``` |
| 124 | |
| 125 | #### EKS |
| 126 | ```bash |
| 127 | # "EKS clusters" / "Kubernetes clusters" |
| 128 | aws eks list-clusters --query 'clusters' --output table |
| 129 | |
| 130 | # "EKS cluster details for <name>" |
| 131 | aws eks |