<< All versions
Skill v1.0.0
currentLLM-judged scan90/1001075551341/claude_code_config/aws-cloud
──Details
PublishedOctober 24, 2026 at 04:26 AM
Content Hashsha256:b705db5c3710f82d...
Git SHAf78638b4a0c1
──Files
Files (1 file, 3.6 KB)
SKILL.md3.6 KBactive
SKILL.md · 234 lines · 3.6 KB
version: "1.0.0" name: aws-cloud description: 部署AWS云服务、配置AWS资源、编写CloudFormation/IAM策略、使用AWS CLI/SDK triggers: [AWS, 亚马逊云, EC2, S3, Lambda, RDS, CloudFormation, IAM策略, AWS CLI, AWS SDK, 云服务部署]
AWS 云服务
核心能力
AWS 服务配置、CLI 命令、CloudFormation 模板、IAM 策略编写。
适用场景
- AWS 资源部署
- CloudFormation 模板编写
- IAM 策略配置
- S3/EC2/Lambda/RDS 操作
- AWS CLI 命令
- AWS SDK 开发
常用服务
计算
| 服务 | 用途 | |
|---|---|---|
| EC2 | 虚拟服务器 | |
| Lambda | 无服务器函数 | |
| ECS | 容器服务 | |
| EKS | Kubernetes |
存储
| 服务 | 用途 | |
|---|---|---|
| S3 | 对象存储 | |
| EBS | 块存储 | |
| EFS | 文件存储 |
数据库
| 服务 | 用途 | |
|---|---|---|
| RDS | 关系数据库 | |
| DynamoDB | NoSQL | |
| Aurora | 高性能关系库 |
CLI 常用命令
S3 操作
bash
# 上传aws s3 cp file.txt s3://bucket/# 下载aws s3 cp s3://bucket/file.txt ./# 同步aws s3 sync ./local s3://bucket/# 列表aws s3 ls s3://bucket/
EC2 操作
bash
# 启动实例aws ec2 run-instances --image-id ami-xxx --instance-type t3.micro# 列出实例aws ec2 describe-instances# 停止/启动aws ec2 stop-instances --instance-ids i-xxxaws ec2 start-instances --instance-ids i-xxx
Lambda 操作
bash
# 创建函数aws lambda create-function \--function-name myFunc \--runtime python3.9 \--handler index.handler \--zip-file fileb://function.zip# 调用aws lambda invoke --function-name myFunc output.json
CloudFormation 模板
yaml
AWSTemplateFormatVersion: '2010-09-09'Description: Web Application StackResources:WebServer:Type: AWS::EC2::InstanceProperties:ImageId: ami-0xxxInstanceType: t3.microSecurityGroupIds:- !Ref WebSecurityGroupWebSecurityGroup:Type: AWS::EC2::SecurityGroupProperties:GroupDescription: Web Server SGSecurityGroupIngress:- IpProtocol: tcpFromPort: 80ToPort: 80CidrIp: 0.0.0.0/0Outputs:InstanceId:Value: !Ref WebServer
IAM 烈策
最小权限原则
json
{"Version": "2012-10-17","Statement": [{"Effect": "Allow","Action": ["s3:GetObject","s3:PutObject"],"Resource": "arn:aws:s3:::bucket-name/*"}]}
避免
不安全模式:- 使用 "*" 作为 Action- 使用 "*" 作为 Resource- Admin 权限用于应用
SDK 使用示例
Python (boto3)
python
import boto3# S3s3 = boto3.client('s3')s3.upload_file('file.txt', 'bucket', 'key')# EC2ec2 = boto3.resource('ec2')instances = ec2.instances.all()# Lambdalambda_client = boto3.client('lambda')response = lambda_client.invoke(FunctionName='myFunc')
Node.js
javascript
const AWS = require('aws-sdk');// S3const s3 = new AWS.S3();await s3.putObject({Bucket: 'bucket',Key: 'key',Body: data}).promise();// DynamoDBconst dynamo = new AWS.DynamoDB.DocumentClient();await dynamo.put({TableName: 'table',Item: { id: '1', data: 'value' }}).promise();
注意事项
必须:- 使用最小权限 IAM- 配置 CloudWatch 监控- 定期轮换密钥- 使用参数存储敏感信息避免:- 硬编码密钥- 公开 S3 bucket- 安全组开放过多端口- 未配置日志
相关技能
deploy-script- 部署脚本docker-devops- Docker 配置nginx-config- 反向代理配置logging-monitoring- 监控配置