复制安装命令
用 Codex 或 Claude 安装复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它先审查 Skill 页面再帮你安装。
复制前请先查看来源、License 和安全提示。
Supercharge Claude Code with AWS cloud engineering skills across 18 core AWS services.
用 Codex 或 Claude 安装复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它先审查 Skill 页面再帮你安装。
复制前请先查看来源、License 和安全提示。
来源文件:README.md
Supercharge Claude Code with AWS cloud engineering skills across 18 core AWS services.
Developing AWS solutions is complex spanning IAM, compute, storage, security, serverless, networking, and more.
AWS Agent Skills equips Claude Code (and Codex) with deep expertise across 18 AWS domains, enabling automated cloud engineering support from IaC templates to debugging guidance and security best practices.
Automatically checks AWS documentation for updates on a weekly basis to ensure skills stay current with AWS service changes.
AWS MCP is great for live docs and API calls, but AWS Agent Skills is designed for reasoning first. It gives AI Agents a curated, LLM-optimized AWS knowledge base with real-world patterns, edge cases, and best practices, without streaming large docs or schemas. Because the skills are local and pre compressed, it is far more token efficient, keeps the context window small and predictable, and avoids MCP infrastructure, latency, and expanded credential exposure.
# Add the marketplace
/plugin marketplace add itsmostafa/aws-agent-skills
# Install the plugin
/plugin install aws-agent-skills
/plugin install https://github.com/itsmostafa/aws-agent-skills
/plugin install ./path/to/aws-agent-skills
$skill-installer install https://github.com/itsmostafa/aws-agent-skills/<skill-name>
For example, to install the rlhf skill:
$skill-installer install https://github.com/itsmostafa/aws-agent-skills/rlhf
| Skill | Description |
|---|---|
| iam | Identity and Access Management - users, roles, policies, permissions |
| lambda | Serverless functions - deployment, triggers, debugging |
| dynamodb | NoSQL database - table design, queries, indexes |
| s3 | Object storage - buckets, objects, security, lifecycle |
| api-gateway | REST and HTTP APIs - integrations, authorization |
| ec2 | Virtual machines - instances, AMIs, networking |
| ecs | Container orchestration - clusters, services, tasks |
| eks | Kubernetes - clusters, node groups, IRSA |
| cloudformation | Infrastructure as Code - templates, stacks, drift |
| cloudwatch | Monitoring - logs, metrics, alarms, dashboards |
| rds | Relational databases - instances, backups, replication |
| sqs | Message queues - standard, FIFO, dead-letter queues |
| sns | Notifications - topics, subscriptions, filtering |
| cognito | User authentication - user pools, identity pools, OAuth |
| step-functions | Workflow orchestration - state machines, error handling |
| secrets-manager | Secret storage - rotation, versioning, RDS integration |
| eventbridge | Event bus - rules, patterns, cross-account events |
| bedrock | Foundation models - inference, RAG, custom models |
Ask Claude to help with IAM:
Each skill contains:
SKILL.md - Core concepts, patterns, CLI reference, best practices, troubleshootingSkills include metadata showing when content was last updated, so you always know how current the information is.
---
name: service-name
description: Service description. Use when <trigger phrases>.
---
# AWS Service Name
## Overview
## Core Concepts
## Common Patterns
## CLI Reference
## Best Practices
## Troubleshooting
## References
MIT License - see LICENSE for details.
name: api-gateway
description: AWS API Gateway for REST and HTTP API management. Use when creating APIs, configuring integrations, setting up authorization, managing stages, implementing rate limiting, or troubleshooting API issues.
last_updated: "2026-01-07"
doc_source: https://docs.aws.amazon.com/apigateway/latest/developerguide/Amazon API Gateway is a fully managed service for creating, publishing, and securing APIs at any scale. Supports REST APIs, HTTP APIs, and WebSocket APIs.
| Type | Description | Use Case |
|---|---|---|
| HTTP API | Low-latency, cost-effective | Simple APIs, Lambda proxy |
| REST API | Full-featured, more control | Complex APIs, transformation |
| WebSocket API | Bidirectional communication | Real-time apps, chat |
| Type | Description |
|---|---|
| Lambda Proxy | Pass-through to Lambda (recommended) |
| Lambda Custom | Transform request/response |
| HTTP Proxy | Pass-through to HTTP endpoint |
| AWS Service | Direct integration with AWS services |
| Mock | Return static response |
AWS CLI:
# Create HTTP API
aws apigatewayv2 create-api \
--name my-api \
--protocol-type HTTP \
--target arn:aws:lambda:us-east-1:123456789012:function:MyFunction
# Get API endpoint
aws apigatewayv2 get-api --api-id abc123 --query 'ApiEndpoint'
SAM Template:
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Resources:
MyApi:
Type: AWS::Serverless::HttpApi
Properties:
StageName: prod
MyFunction:
Type: AWS::Serverless::Function
Properties:
Handler: app.handler
Runtime: python3.12
Events:
ApiEvent:
Type: HttpApi
Properties:
ApiId: !Ref MyApi
Path: /items
Method: GET
# Create REST API
aws apigateway create-rest-api \
--name my-rest-api \
--endpoint-configuration types=REGIONAL
API_ID=abc123
# Get root resource ID
ROOT_ID=$(aws apigateway get-resources --rest-api-id $API_ID --query 'items[0].id' --output text)
# Create resource
aws apigateway create-resource \
--rest-api-id $API_ID \
--parent-id $ROOT_ID \
--path-part items
RESOURCE_ID=xyz789
# Create method
aws apigateway put-method \
--rest-api-id $API_ID \
--resource-id $RESOURCE_ID \
--http-method GET \
--authorization-type NONE
# Create Lambda integration
aws apigateway put-integration \
--rest-api-id $API_ID \
--resource-id $RESOURCE_ID \
--http-method GET \
--type AWS_PROXY \
--integration-http-method POST \
--uri arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:123456789012:function:MyFunction/invocations
# Deploy to stage
aws apigateway create-deployment \
--rest-api-id $API_ID \
--stage-name prod
import json
def handler(event, context):
# HTTP API event
http_method = event.get('requestContext', {}).get('http', {}).get('method')
path = event.get('rawPath', '')
query_params = event.get('queryStringParameters', {})
body = event.get('body', '')
if body and event.get('isBase64Encoded'):
import base64
body = base64.b64decode(body).decode('utf-8')
# Process request
response_body = {'message': 'Success', 'path': path}
return {
'statusCode': 200,
'headers': {
'Content-Type': 'application/json'
},
'body': json.dumps(response_body)
}
HTTP API:
aws apigatewayv2 update-api \
--api-id abc123 \
--cors-configuration '{
"AllowOrigins": ["https://example.com"],
"AllowMethods": ["GET", "POST", "PUT", "DELETE"],
"AllowHeaders": ["Content-Type", "Authorization"],
"MaxAge": 86400
}'
REST API:
# Enable CORS on resource
aws apigateway put-method \
--rest-api-id $API_ID \
--resource-id $RESOURCE_ID \
--http-method OPTIONS \
--authorization-type NONE
aws apigateway put-integration \
--rest-api-id $API_ID \
--resource-id $RESOURCE_ID \
--http-method OPTIONS \
--type MOCK \
--request-templates '{"application/json": "{\"statusCode\": 200}"}'
aws apigateway put-method-response \
--rest-api-id $API_ID \
--resource-id $RESOURCE_ID \
--http-method OPTIONS \
--status-code 200 \
--response-parameters '{
"method.response.header.Access-Control-Allow-Headers": true,
"method.response.header.Access-Control-Allow-Methods": true,
"method.response.header.Access-Control-Allow-Origin": true
}'
aws apigateway put-integration-response \
--rest-api-id $API_ID \
--resource-id $RESOURCE_ID \
--http-method OPTIONS \
--status-code 200 \
--response-parameters '{
"method.response.header.Access-Control-Allow-Headers": "'\''Content-Type,Authorization'\''",
"method.response.header.Access-Control-Allow-Methods": "'\''GET,POST,PUT,DELETE,OPTIONS'\''",
"method.response.header.Access-Control-Allow-Origin": "'\''*'\''"
}'
aws apigatewayv2 create-authorizer \
--api-id abc123 \
--name jwt-authorizer \
--authorizer-type JWT \
--identity-source '$request.header.Authorization' \
--jwt-configuration '{
"Issuer": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_abc123",
"Audience": ["client-id"]
}'
| Command | Description |
|---|---|
aws apigatewayv2 create-api | Create API |
aws apigatewayv2 get-apis | List APIs |
aws apigatewayv2 create-route | Create route |
aws apigatewayv2 create-integration | Create integration |
aws apigatewayv2 create-stage | Create stage |
aws apigatewayv2 create-authorizer | Create authorizer |
| Command | Description |
|---|---|
aws apigateway create-rest-api | Create API |
aws apigateway get-rest-apis | List APIs |
aws apigateway create-resource | Create resource |
aws apigateway put-method | Create method |
aws apigateway put-integration | Create integration |
aws apigateway create-deployment | Deploy API |
Causes:
Debug:
# Check API key
aws apigateway get-api-key --api-key abc123 --include-value
# Check authorizer
aws apigatewayv2 get-authorizer --api-id abc123 --authorizer-id xyz789
Causes:
Lambda response format:
# Correct format
return {
'statusCode': 200,
'headers': {'Content-Type': 'application/json'},
'body': json.dumps({'message': 'success'})
}
# Wrong - missing statusCode
return {'message': 'success'}
Causes:
Solutions:
Debug:
评论 (0)
暂无评论,成为第一个评论者吧!