复制安装命令
用 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: secrets-manager
description: AWS Secrets Manager for secure secret storage and rotation. Use when storing credentials, configuring automatic rotation, managing secret versions, retrieving secrets in applications, or integrating with RDS.
last_updated: "2026-01-07"
doc_source: https://docs.aws.amazon.com/secretsmanager/latest/userguide/AWS Secrets Manager helps protect access to applications, services, and IT resources. Store, retrieve, and automatically rotate credentials, API keys, and other secrets.
Encrypted data stored in Secrets Manager. Can contain:
Each secret can have multiple versions:
Automatic credential rotation using Lambda functions. Built-in support for:
AWS CLI:
# Create secret with JSON
aws secretsmanager create-secret \
--name prod/myapp/database \
--description "Production database credentials" \
--secret-string '{"username":"admin","password":"MySecurePassword123!","host":"mydb.cluster-xyz.us-east-1.rds.amazonaws.com","port":5432,"database":"myapp"}'
# Create secret with binary data
aws secretsmanager create-secret \
--name prod/myapp/certificate \
--secret-binary fileb://certificate.pem
boto3:
import boto3
import json
secrets = boto3.client('secretsmanager')
response = secrets.create_secret(
Name='prod/myapp/database',
Description='Production database credentials',
SecretString=json.dumps({
'username': 'admin',
'password': 'MySecurePassword123!',
'host': 'mydb.cluster-xyz.us-east-1.rds.amazonaws.com',
'port': 5432,
'database': 'myapp'
}),
Tags=[
{'Key': 'Environment', 'Value': 'production'},
{'Key': 'Application', 'Value': 'myapp'}
]
)
import boto3
import json
secrets = boto3.client('secretsmanager')
def get_secret(secret_name):
response = secrets.get_secret_value(SecretId=secret_name)
if 'SecretString' in response:
return json.loads(response['SecretString'])
else:
import base64
return base64.b64decode(response['SecretBinary'])
# Usage
credentials = get_secret('prod/myapp/database')
db_password = credentials['password']
from aws_secretsmanager_caching import SecretCache, SecretCacheConfig
# Configure cache
cache_config = SecretCacheConfig(
max_cache_size=100,
secret_refresh_interval=3600,
secret_version_stage_refresh_interval=3600
)
cache = SecretCache(config=cache_config)
def get_cached_secret(secret_name):
secret = cache.get_secret_string(secret_name)
return json.loads(secret)
# Update secret value
aws secretsmanager update-secret \
--secret-id prod/myapp/database \
--secret-string '{"username":"admin","password":"NewPassword456!"}'
# Put new version with staging labels
aws secretsmanager put-secret-value \
--secret-id prod/myapp/database \
--secret-string '{"username":"admin","password":"NewPassword456!"}' \
--version-stages AWSCURRENT
aws secretsmanager rotate-secret \
--secret-id prod/myapp/database \
--rotation-lambda-arn arn:aws:lambda:us-east-1:123456789012:function:SecretsManagerRDSPostgreSQLRotation \
--rotation-rules AutomaticallyAfterDays=30
# Use CloudFormation for RDS secret with rotation
aws cloudformation deploy \
--template-file rds-secret.yaml \
--stack-name rds-secret
# rds-secret.yaml
AWSTemplateFormatVersion: '2010-09-09'
Resources:
DBSecret:
Type: AWS::SecretsManager::Secret
Properties:
Name: prod/myapp/database
GenerateSecretString:
SecretStringTemplate: '{"username": "admin"}'
GenerateStringKey: password
PasswordLength: 32
ExcludeCharacters: '"@/\'
DBSecretRotation:
Type: AWS::SecretsManager::RotationSchedule
Properties:
SecretId: !Ref DBSecret
RotationLambdaARN: !GetAtt RotationLambda.Arn
RotationRules:
AutomaticallyAfterDays: 30
import json
import urllib.request
def handler(event, context):
# Use AWS Parameters and Secrets Lambda Extension
secrets_port = 2773
secret_name = 'prod/myapp/database'
url = f'http://localhost:{secrets_port}/secretsmanager/get?secretId={secret_name}'
headers = {'X-Aws-Parameters-Secrets-Token': os.environ['AWS_SESSION_TOKEN']}
request = urllib.request.Request(url, headers=headers)
response = urllib.request.urlopen(request)
secret = json.loads(response.read())['SecretString']
credentials = json.loads(secret)
return credentials
| Command | Description |
|---|---|
aws secretsmanager create-secret | Create secret |
aws secretsmanager describe-secret | Get secret metadata |
aws secretsmanager get-secret-value | Retrieve secret value |
aws secretsmanager update-secret | Update secret |
aws secretsmanager delete-secret | Delete secret |
aws secretsmanager restore-secret | Restore deleted secret |
aws secretsmanager list-secrets | List secrets |
| Command | Description |
|---|---|
aws secretsmanager put-secret-value | Add new version |
aws secretsmanager list-secret-version-ids | List versions |
aws secretsmanager update-secret-version-stage | Move staging labels |
| Command | Description |
|---|---|
aws secretsmanager rotate-secret | Configure/trigger rotation |
aws secretsmanager cancel-rotate-secret | Cancel rotation |
environment/application/secret-type{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"secretsmanager:GetSecretValue",
"secretsmanager:DescribeSecret"
],
"Resource": "arn:aws:secretsmanager:us-east-1:123456789012:secret:prod/*",
"Condition": {
"StringEquals": {
"secretsmanager:ResourceTag/Environment": "production"
}
}
}
]
}
Causes:
secretsmanager:GetSecretValueDebug:
# Check secret resource policy
aws secretsmanager get-resource-policy --secret-id my-secret
# Check IAM permissions
aws iam simulate-principal-policy \
--policy-source-arn arn:aws:iam::123456789012:role/my-role \
--action-names secretsmanager:GetSecretValue \
--resource-arns arn:aws:secretsmanager:us-east-1:123456789012:secret:my-secret
Debug:
# Check rotation status
aws secretsmanager describe-secret --secret-id my-secret
# Check Lambda logs
aws logs filter-log-events \
--log-group-name /aws/lambda/SecretsManagerRotation \
--filter-pattern "ERROR"
Common causes:
# List secrets to find correct name
aws secretsmanager list-secrets \
--filters Key=name,Values=myapp
# Check if deleted (within recovery window)
aws secretsmanager list-secrets \
--include-planned-deletion
评论 (0)
暂无评论,成为第一个评论者吧!