Claude + AWS MCP: Biến Claude Thành AI DevOps Assistant Cho AWS Chuyên mục Devops 2026-05-11 0 Lượt xem 0 Lượt thích 0 Bình luận
Nếu bạn đang vận hành hệ thống trên AWS và cảm thấy việc:
- check ECS
- debug deployment
- inspect CloudWatch
- analyze billing
- query RDS
- mở AWS Console liên tục
quá mất thời gian…
thì AWS MCP sẽ là thứ cực kỳ đáng thử 😄
Mình vừa setup thành công Claude Code + AWS MCP để Claude có thể:
- truy cập AWS account thật
- gọi AWS CLI/API
- phân tích infra
- debug ECS deployment
- summarize logs
- optimize cost
gần giống một AI SRE assistant.
MCP là gì?
MCP (Model Context Protocol) là giao thức cho phép AI kết nối tới external tools.
Ví dụ:
- AWS
- GitHub
- PostgreSQL
- Slack
- Browser automation
- custom internal tools
Claude có thể dùng MCP để:
- gọi API
- chạy command
- đọc dữ liệu thật
- reasoning trên dữ liệu đó
Kiến trúc AWS MCP
Flow hoạt động:
Claude
↓
MCP Proxy
↓
AWS Hosted MCP Endpoint
↓
AWS APIs
Nó query AWS thật 😄
AWS MCP làm được gì?
Ví dụ:
ECS
List ECS clusters
Check unhealthy tasks
Analyze ECS deployment failures
CloudWatch
Show recent production errors
Inspect CloudWatch alarms
Aurora / RDS
Describe Aurora clusters
Analyze DB performance
Cost Optimization
Analyze AWS spending
Suggest Savings Plans
Find unused resources
Setup Claude + AWS MCP
1. Install Claude Code
curl -fsSL https://claude.ai/install.sh | bash
Verify:
claude --help
2. Install AWS CLI
Check auth:
aws sts get-caller-identity
Nếu command này fail thì MCP cũng fail.
3. Install uv
AWS MCP hiện dùng Python/uv ecosystem.
Install:
curl -LsSf https://astral.sh/uv/install.sh | sh
source ~/.bashrc
Verify:
uv --version
4. Add AWS MCP vào Claude
Command mình dùng thành công:
claude mcp add aws \
--env AWS_REGION=ap-northeast-1 \
-- uvx mcp-proxy-for-aws@latest \
https://aws-mcp.us-east-1.api.aws/mcp
Vì sao endpoint dùng us-east-1?
Đây chỉ là AWS hosted MCP endpoint.
Nó KHÔNG phải region workload của bạn.
Ví dụ:
- ECS vẫn ở Tokyo
- Aurora vẫn ở Tokyo
- CloudWatch vẫn ở Tokyo
Do region thật được quyết định bởi:
AWS_REGION=ap-northeast-1
5. Verify MCP
Check:
claude mcp list
Nếu OK:
✓ Connected
6. Start Claude
claude
7. Kiểm tra MCP đang hoạt động
Trong Claude:
Use AWS MCP tools to list my ECS clusters in ap-northeast-1
Kết quả thực tế
Claude đã:
- gọi AWS MCP
- execute AWS CLI thật
- parse JSON
- summarize thành table
Ví dụ tool call:
aws - aws___call_aws (MCP)
Claude tự generate:
aws ecs list-clusters --region ap-northeast-1
và:
aws ecs describe-clusters ...
Sau đó tự tổng hợp:
| Cluster | Running | Pending |
|---|---|---|
| **-dev-cluster | 2 | 0 |
| **-stage-cluster | 1 | 1 |
Claude còn detect:
- pending task
- unhealthy service
- deployment issues
rất hữu ích 😄
Điều mình thích nhất
Claude không chỉ:
- trả output
mà còn:
- reasoning
- phân tích infra
- đưa recommendation
- summarize logs/events
gần giống:
- SRE assistant
- Cloud architect assistant
- DevOps copilot
Những MCP khác rất đáng thử
Playwright MCP
Browser automation:
claude mcp add playwright -- npx @playwright/mcp
Claude có thể:
- mở browser
- login
- thao tác Google Sheets
- click UI thật 😄
PostgreSQL MCP
claude mcp add postgres -- npx @modelcontextprotocol/server-postgres
GitHub MCP
claude mcp add github -- npx @modelcontextprotocol/server-github
Kết luận
AWS MCP làm Claude mạnh hơn rất nhiều cho DevOps/AWS workflows.
Đặc biệt với hệ thống:
- ECS
- Aurora
- CloudWatch
- Blue/Green deployment
- Cost optimization
thì trải nghiệm rất giống đang có:
- AI operator
- AI SRE
- AI cloud assistant
thay vì chỉ là chatbot 😄
Bình luận (0)