ecs-fargate-deployer
Deploys AWS ECS Fargate services with production-grade configuration: right-sized task definition (CPU/memory combos, Fargate sizing), container definitions (image, port mappings, env vars, health checks), service definition (desired count, deployment circuit breaker, minimum healthy percent), awsvpc networking (security groups, subnets), ALB integration (target group, listener rules), target-tracking auto-scaling (CPU/memory/ALB request count), separate task execution role and task role, secrets via Secrets Manager / SSM Parameter Store, FireLens and CloudWatch logging, and latest features (Fargate Spot, EFA, container health check improvements). Emits a READY_TO_DEPLOY checklist with every configuration item verified. Use when creating a new ECS Fargate service, deploying a container to production, validating an ECS service configuration, or generating deployment CLI and IaC templates. Triggers: ECS Fargate, task definition, service, ALB, auto-scaling, container, deployment, ECS deploy.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-24
- Stars
- ★ 4
- Forks
- 0
01 前言 Front Matter
- name
- ecs-fargate-deployer
- license
- Apache-2.0
- metadata
- { "tags": "aws, ecs, fargate, cloudops, deploy, containers, task-definition, awsvpc, alb, auto-scaling", "phase": "1", "author": "Jacky Chan — AWS Community Builder", "domain": "aws-cloudops", "family": "Compute", "version": "0.1.0", "keywords": "aws, ecs, fargate, cloudops, deploy, provisioning, containers, task-definition, awsvpc, alb, target-group, auto-scaling, circuit-breaker, firelens, fargate-spot", "task_type": "deploy", "complexity": "high", "entry_point": "false", "skill_class": "capability", "when_to_use": "Invoke when the user wants to create a new ECS Fargate service, deploy a container workload to Fargate, validate an existing ECS service configuration against best practices, generate deployment CLI commands or IaC templates, or troubleshoot a Fargate deployment failure caused by missing prerequisites (task definition, subnets, ALB, execution role, secrets). Do NOT invoke for ECS on EC2 deployments (use an EC2-launch-type-specific skill) or for EKS deployments (use an EKS skill).", "dependencies": "aws-orchestrator", "requires_llm": "true", "verdict_shape": "READY_TO_DEPLOY | PREREQUISITES_MISSING", "lifecycle_status": "active", "supports_pipeline": "true" }
- description
- Deploys AWS ECS Fargate services with production-grade configuration: right-sized task definition (CPU/memory combos, Fargate sizing), container definitions (image, port mappings, env vars, health checks), service definition (desired count, deployment circuit breaker, minimum healthy percent), awsvpc networking (security groups, subnets), ALB integration (target group, listener rules), target-tracking auto-scaling (CPU/memory/ALB request count), separate task execution role and task role, secrets via Secrets Manager / SSM Parameter Store, FireLens and CloudWatch logging, and latest features (Fargate Spot, EFA, container health check improvements). Emits a READY_TO_DEPLOY checklist with every configuration item verified. Use when creating a new ECS Fargate service, deploying a container to production, validating an ECS service configuration, or generating deployment CLI and IaC templates. Triggers: ECS Fargate, task definition, service, ALB, auto-scaling, container, deployment, ECS deploy.
- compatibility
- Requires an LLM agent runtime (Claude Code, Cursor, Windsurf, Codex, Gemini). For live deployment: AWS CLI v2 with ecs, ec2, iam, elasticloadbalancingv2, servicediscovery, logs, secretsmanager, and ssm access. Works with Terraform aws_ecs_service / aws_ecs_task_definition resources, CloudFormation AWS::ECS::* resources, and AWS Copilot.
02 资源文件 19
- 参考文档eval/test-cases.yaml7.0 KB
- 参考文档evals/baselines/fargate-no-nat-gateway.md730 B
- 参考文档evals/baselines/fargate-spot-blended.md890 B
- 参考文档evals/baselines/ml-inference-arm64.md1.1 KB
- 参考文档evals/baselines/public-api-alb-autoscale.md1.3 KB
- 参考文档evals/baselines/wrong-target-type-instance.md934 B
- 参考文档evals/eval_config.yaml1.6 KB
- 参考文档evals/evals.json13.7 KB
- 参考文档evals/prompts/fargate-no-nat-gateway.md579 B
- 参考文档evals/prompts/fargate-spot-blended.md820 B
- 参考文档evals/prompts/ml-inference-arm64.md883 B
- 参考文档evals/prompts/public-api-alb-autoscale.md1008 B
- 参考文档evals/prompts/wrong-target-type-instance.md538 B
- 参考文档example/README.md11.2 KB
- 参考文档references/advanced-patterns.md1.4 KB
- 参考文档references/deployment-cli-commands.md10.9 KB
- 参考文档references/diagnostic-commands.md619 B
- 参考文档references/networking-and-scaling-guide.md16.1 KB
- 参考文档skill.usf.yaml4.4 KB
03 SKILL.md 正文
ECS Fargate Deployer
An AWS CloudOps agent skill that deploys Amazon ECS services on Fargate with correct production defaults. Emits a READY_TO_DEPLOY checklist verifying every configuration item.
Quick navigation
| Need | Section |
|---|---|
| What MUST be in the response | "STRICT output contract" |
| Why the deployment order matters | "Reasoning framework" |
| What to verify before deploying | "Prerequisites" |
| The ordered deployment steps | "Deployment procedure" |
| Common silent-failure pitfalls | "NEVER" |
| Workload-specific defaults | "Workload matrix" |
| 2024-2026 feature changes | "Recent AWS features" |
| Deep CLI sequences | references/deployment-cli-commands.md |
| Networking, ALB, auto-scaling, full NEVER, edge cases | references/networking-and-scaling-guide.md |
STRICT output contract
When this skill is invoked with an ECS Fargate deployment request, the
agent MUST respond with the READY_TO_DEPLOY checklist defined in "Output
format" using the literal all-caps labels SERVICE:, VERDICT:,
CHECKLIST:, and VERIFICATION_COMMANDS:. Do NOT preface the checklist
with prose, headings, or disclaimers — emit the block as the first lines.
Required output structure
SERVICE: <service-name>— the ECS service being deployed.VERDICT: READY_TO_DEPLOYORVERDICT: PREREQUISITES_MISSING.CHECKLIST:followed by indented lines with status markers ([✓],[✗],[OPTIONAL],[INPUT NEEDED]).VERIFICATION_COMMANDS:followed by indentedaws ecs ...commands.
FORBIDDEN output patterns
- No prose preamble before
SERVICE:— first non-empty line MUST beSERVICE:. - No markdown variants of labels — write
VERDICT:, not**VERDICT:**,### Verdict, or`VERDICT`. - No swapping verdict tokens — exactly
READY_TO_DEPLOYorPREREQUISITES_MISSING. - No omitting
VERIFICATION_COMMANDS:— include even when PREREQUISITES_MISSING. - No extra sections after
VERIFICATION_COMMANDS:— the checklist block is the entire response. - No status marker drift — use only
[✓],[✗],[OPTIONAL],[INPUT NEEDED].
Perfect example (copy the shape exactly)
SERVICE: payments-api-prod
VERDICT: READY_TO_DEPLOY
CHECKLIST:
[✓] Cluster — payments-prod (Fargate capacity provider)
[✓] Task definition — payments-api:5 (0.5 vCPU / 1024 MB)
[✓] Container — 123456789012.dkr.ecr.us-east-1.amazonaws.com/payments-api:1.2.3
[✓] Container health check — GET /healthz (30s interval, 5s timeout, 3 retries)
[✓] Networking — awsvpc, subnets subnet-aaa/subnet-bbb, sg-payments-api
[✓] Load balancer — ALB tg-payments-api:8080 (target type ip)
[✓] Desired count — 3 (across 3 AZs)
[✓] Deployment circuit breaker — enabled with rollback
[✓] Minimum healthy percent — 100% / Maximum percent — 200%
[✓] Execution role — payments-exec (ECR + Secrets Manager + SSM)
[✓] Task role — payments-task (DynamoDB + S3 scoped)
[✓] Secrets — DB_PASSWORD from secretsmanager:payments/db:arn
[✓] Logging — FireLens → CloudWatch /ecs/payments-api, retention 30 days
[✓] Auto-scaling — target tracking 60% CPU, min 3 / max 12
VERIFICATION_COMMANDS:
aws ecs describe-services --cluster payments-prod --services payments-api-prod
aws ecs describe-task-definition --task-definition payments-api:5
aws ecs describe-services --cluster payments-prod --services payments-api-prod --query 'services[0].deployments'
aws ec2 describe-security-groups --group-ids sg-payments-api
aws elbv2 describe-target-groups --target-group-arns arn:aws:elasticloadbalancing:us-east-1:123456789012:targetgroup/tg-payments-api/abc
aws logs describe-log-groups --log-group-name-prefix /ecs/payments-api
aws application-autoscaling describe-scaling-policies --service-namespace ecs --resource-id service/payments-prod/payments-api-prod
Reasoning framework (why the deployment order matters)
- Task definition FIRST — a service cannot be created without a valid
taskDefinitionARN. Creating the service first returnsClientException. - Execution role + task role (separate!) — execution role pulls ECR image, retrieves secrets, writes logs. Task role is the app's runtime identity. Conflating them is the #1 IAM mistake on Fargate.
- Cluster + capacity provider — Fargate and Fargate Spot are capacity providers, not launch types. The launch-type API does not support Spot.
- Networking (awsvpc + subnets + SG) — Fargate REQUIRES
networkMode: awsvpc. Use private subnets across >= 2 AZs. Without a NAT Gateway, AWS SDK calls fail silently with timeouts. - Load balancer integration — ALB target group MUST use
target_type=ip(awsvpc tasks register by ENI private IP). - Container health check + circuit breaker — without a container-level health check, the circuit breaker cannot fire.
- Auto-scaling — apply AFTER the service is stable, not during deployment.
Prerequisites (verify before deployment)
| Prerequisite | Why it matters | How to verify |
|---|---|---|
| Cluster | Must exist with Fargate capacity provider. | aws ecs describe-clusters --clusters <name> |
| Container image | ECR image URI with valid tag. | aws ecr describe-images --repository-name <repo> --image-ids imageTag=<tag> |
| VPC subnets | Private subnets in >= 2 AZs. | aws ec2 describe-subnets --subnet-ids <ids> |
| Security group | Inbound to container ports + outbound for deps. | aws ec2 describe-security-groups --group-ids <sg> |
| ALB target group (if ALB) | target_type=ip required. |
aws elbv2 describe-target-groups --target-group-arns <arn> |
| ALB listener (if ALB) | Listener to attach rules to. | aws elbv2 describe-listeners --listener-arns <arn> |
| Execution role | Trust ecs-tasks.amazonaws.com. ECR + Secrets + logs perms. |
aws iam get-role --role-name <exec-role> |
| Task role | Application permissions (DynamoDB, S3, etc.). | aws iam get-role --role-name <task-role> |
| Secrets ARNs (if secrets) | Secrets Manager or SSM Parameter exists. | aws secretsmanager describe-secret --secret-id <id> |
| CloudWatch log group | ECS does NOT auto-create log groups. Pre-create with retention. | aws logs describe-log-groups --log-group-name-prefix /ecs/<service> |
| KMS key (if encrypted) | Grant execution role kms:Decrypt. |
aws kms describe-key --key-id <alias> |
Deployment procedure (apply in order)
Step 1: Task execution role + task role (separate)
Two distinct roles. Never combine them.
Trust policy (both roles):
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Principal": { "Service": "ecs-tasks.amazonaws.com" },
"Action": "sts:AssumeRole"
}]
}
Execution role — ECS agent uses it to pull ECR image, retrieve secrets,
write logs. Attach AmazonECSTaskExecutionRolePolicy plus any
secrets/KMS permissions:
{
"Version": "2012-10-17",
"Statement": [
{"Effect": "Allow", "Action": ["ecr:BatchCheckLayerAvailability", "ecr:GetDownloadUrlForLayer", "ecr:BatchGetImage"], "Resource": "arn:aws:ecr:<region>:<acct>:repository/<repo>"},
{"Effect": "Allow", "Action": ["ecr:GetAuthorizationToken"], "Resource": "*"},
{"Effect": "Allow", "Action": ["logs:CreateLogStream", "logs:PutLogEvents"], "Resource": "arn:aws:logs:<region>:<acct>:log-group:/ecs/<service>:*"},
{"Effect": "Allow", "Action": ["secretsmanager:GetSecretValue", "ssm:GetParameters"], "Resource": ["arn:aws:secretsmanager:<region>:<acct>:secret:<name>*"]},
{"Effect": "Allow", "Action": ["kms:Decrypt"], "Resource": "arn:aws:kms:<region>:<acct>:key/<id>"}
]
}
Task role — assumed by application code at runtime. Scope to specific AWS resources (DynamoDB, S3, SQS). Has nothing to do with image pulls.
| Workload | Task role permissions |
|---|---|
| API backend (DynamoDB) | dynamodb:GetItem, PutItem, Query on table ARN |
| Queue consumer (SQS) | sqs:ReceiveMessage, DeleteMessage on queue ARN |
| S3 processor | s3:GetObject, PutObject on bucket ARN |
NEVER use AdministratorAccess on either role.
Step 2: Task definition (CPU/memory combos)
Fargate enforces specific CPU/memory combinations. Any other combo
fails with ClientException.
| CPU (vCPU) | Memory options (GB) |
|---|---|
| 0.25 | 0.5, 1, 2 |
| 0.5 | 1, 2, 3, 4 |
| 1 | 2, 3, 4, 5, 6, 7, 8 |
| 2 | 4, 5, 6, ..., 16 |
| 4 | 8, 9, 10, ..., 30 |
| 8 | 16, 17, ..., 60 |
| 16 | 32, 33, ..., 120 |
CPU units: 256 = 0.25 vCPU. Memory: 1024 = 1 GB.
| Workload | CPU | Memory | Rationale |
|---|---|---|---|
| Lightweight API | 0.25 vCPU | 0.5 GB | Low traffic, fast startup |
| Standard API | 0.5 vCPU | 1 GB | Typical Node/Python API |
| Heavy API (ML inference) | 1-2 vCPU | 4-8 GB | Parallel processing |
| Worker (queue consumer) | 0.5-1 vCPU | 1-2 GB | I/O-bound |
| Java/JVM (Spring Boot) | 1-2 vCPU | 4-8 GB | JVM heap; always >= 2 GB |
Architecture: Fargate supports X86_64 (default) and ARM64
(Graviton, up to 20% price-performance). Set runtimePlatform.cpuArchitecture.
Step 3: Container definitions
[{
"name": "app",
"image": "123456789012.dkr.ecr.us-east-1.amazonaws.com/payments-api:1.2.3",
"cpu": 512, "memory": 1024, "essential": true,
"portMappings": [{"containerPort": 8080, "protocol": "tcp"}],
"environment": [{"name": "LOG_LEVEL", "value": "info"}],
"secrets": [{"name": "DB_PASSWORD", "valueFrom": "arn:aws:secretsmanager:us-east-1:123456789012:secret:payments/db-XXXXXX"}],
"logConfiguration": {"logDriver": "awslogs", "options": {"awslogs-group": "/ecs/payments-api", "awslogs-region": "us-east-1", "awslogs-stream-prefix": "ecs"}},
"healthCheck": {"command": ["CMD-SHELL", "curl -f http://localhost:8080/healthz || exit 1"], "interval": 30, "timeout": 5, "retries": 3, "startPeriod": 60}
}]
Key fields: image (full ECR URI, NEVER :latest), portMappings
(hostPort ignored on Fargate), environment (plaintext only, NEVER
secrets), secrets (injected at start via ARN reference), healthCheck
(startPeriod gives grace time), essential (true = failure stops task).
Step 4: Service definition
aws ecs create-service \
--cluster payments-prod \
--service-name payments-api-prod \
--task-definition payments-api:5 \
--desired-count 3 \
--launch-type FARGATE \
--network-configuration "awsvpcConfiguration={subnets=[subnet-aaa,subnet-bbb],securityGroups=[sg-payments-api],assignPublicIp=DISABLED}" \
--load-balancers "targetGroupArn=arn:aws:elasticloadbalancing:us-east-1:123456789012:targetgroup/tg-payments-api/abc,containerName=app,containerPort=8080" \
--deployment-configuration "deploymentCircuitBreaker={enable=true,rollback=true},minimumHealthyPercent=100,maximumPercent=200" \
--scheduling-strategy REPLICA
Key fields:
- desiredCount — >= 2 across >= 2 AZs for HA.
- deploymentCircuitBreaker —
enable=true, rollback=trueauto-rolls back failed deployments. Without it, a bad task definition leaves service degraded indefinitely. - minimumHealthyPercent=100 — old tasks stay until new ones are healthy.
- maximumPercent=200 — allows rolling double during deployment.
- assignPublicIp=DISABLED for private subnets (production).
Capacity-provider-strategy create-service variant moved verbatim to references/deployment-cli-commands.md. Load on demand when deploying with FARGATE + FARGATE_SPOT burst capacity.
base=2 guarantees 2 On-Demand tasks; remaining split 4:1 between
FARGATE and FARGATE_SPOT. Spot interruption drains tasks gracefully via
the 2-minute warning.
Step 5: Networking (awsvpc mode)
Fargate REQUIRES networkMode: awsvpc. Each task gets a primary ENI.
- Use PRIVATE subnets in production. Tasks do not need public IPs.
- Spread across >= 2 AZs. Set
availabilityZoneRebalancing=ENABLED. - NAT Gateway for internet access — #1 Fargate networking issue. Without it, task cannot reach ECR, AWS SDK endpoints, or external APIs.
- VPC endpoints for high-volume traffic (S3, DynamoDB, ECR) to avoid NAT Gateway charges. Gateway endpoints (S3, DynamoDB) are free.
- Security group — inbound from ALB SG on container port, outbound for dependencies.
Full networking reference in references/networking-and-scaling-guide.md.
Step 6: Load balancer integration (ALB)
aws elbv2 create-target-group \
--name tg-payments-api --protocol HTTP --port 8080 --vpc-id vpc-xxx \
--target-type ip --health-check-path /healthz \
--health-check-interval-seconds 30 --healthy-threshold-count 2 \
--unhealthy-threshold-count 3 --matcher HttpCode=200
Critical: ALB health check path MUST match the container health check path. A mismatch causes the ALB to mark the task unhealthy even when ECS considers it healthy.
Step 7: Secrets (Secrets Manager / SSM Parameter Store)
Secrets are injected as environment variables at container start. NOT visible in the task definition (only the ARN is).
"secrets": [
{"name": "DB_PASSWORD", "valueFrom": "arn:aws:secretsmanager:us-east-1:123456789012:secret:payments/db-XXXXXX"},
{"name": "API_KEY", "valueFrom": "arn:aws:ssm:us-east-1:123456789012:parameter/payments/api-key"}
]
Execution role needs secretsmanager:GetSecretValue or ssm:GetParameters
plus kms:Decrypt if a customer-managed KMS key is used.
Step 8: Logging (FireLens / CloudWatch)
awslogs driver (default):
"logConfiguration": {
"logDriver": "awslogs",
"options": {"awslogs-group": "/ecs/payments-api", "awslogs-region": "us-east-1", "awslogs-stream-prefix": "ecs"}
}
FireLens (advanced routing): route different log streams to different
destinations (audit → S3, app → CloudWatch, metrics → Kinesis). Uses a
sidecar container with firelensConfiguration: {type: fluentbit}.
Pre-create the log group with retention — ECS does NOT auto-create:
aws logs create-log-group --log-group-name /ecs/payments-api
aws logs put-retention-policy --log-group-name /ecs/payments-api --retention-in-days 30
Step 9: Auto-scaling (target tracking)
Step 9 auto-scaling CLI (register-scalable-target + put-scaling-policy) moved verbatim to references/deployment-cli-commands.md. Load on demand when applying target-tracking auto-scaling after the service is stable.
Metrics: ECSServiceAverageCPUUtilization, ECSServiceAverageMemoryUtilization,
ALBRequestCountPerTarget. Cooldown: scale-out 60s, scale-in 300s (never
< 300s to avoid flapping).
Step 10: Verification
Step 10 verification commands moved verbatim to references/diagnostic-commands.md. Load on demand for post-deployment verification.
Latest ECS Fargate features (2024-2026)
Latest ECS Fargate features (2024-2026) moved verbatim to references/advanced-patterns.md. Load on demand for Spot capacity providers, EFA, health-check START_PERIOD, AZ rebalancing, circuit-breaker rollback, Graviton, platform versions, ECS Exec.
Workload matrix
| Workload | CPU / Memory | AZ count | LB | Auto-scale | Spot | Logging |
|---|---|---|---|---|---|---|
| Public API | 0.5 vCPU / 1 GB | 3 | ALB | CPU 60% | No | awslogs |
| Internal API | 0.5 vCPU / 1 GB | 2 | Internal ALB | CPU 60% | Optional | awslogs |
| Queue worker (SQS) | 0.5-1 vCPU / 1-2 GB | 2 | None | Queue depth | Yes | awslogs |
| Scheduled batch | 1-2 vCPU / 2-4 GB | 1 | None | None | Yes | awslogs |
| ML inference | 4 vCPU / 16 GB | 2 | ALB | CPU 70% | No | FireLens |
| Streaming (Kinesis) | 1 vCPU / 2 GB | 2 | None | None | No | awslogs |
| Java/Spring Boot | 1-2 vCPU / 4-8 GB | 3 | ALB | CPU 65% | No | awslogs + startPeriod 60s |
NEVER (top 5 — full list of 14 in references)
- NEVER use
:latestimage tag in production. It is mutable — a new push silently changes what runs. Pin to a version tag or SHA digest. #1 rollback-breaker. - NEVER combine the execution role and task role into one. Execution role pulls images and writes logs; task role is the app's identity. Combining produces pull failures or least-privilege violations.
- NEVER use a target group with
target_type=instancefor Fargate. Fargate tasks register by ENI private IP — onlytarget_type=ipworks. Silently fails registration. - NEVER deploy Fargate tasks to a public subnet with
assignPublicIp=ENABLEDin production. Use private subnets + NAT Gateway or VPC endpoints. - NEVER deploy without the deployment circuit breaker when using rolling
deployments. Without
enable=true, rollback=true, a bad task definition leaves the service degraded indefinitely.
Expert heuristic — choosing CPU, memory, and AZ spread
Expert heuristic (60/70 rule, memory sizing, AZ spread, Spot blend, ALB vs NLB) moved verbatim to references/networking-and-scaling-guide.md. Load on demand when choosing CPU, memory, and AZ spread.
Pre-flight safety checks (run before any deployment CLI)
- Confirm cluster exists with Fargate capacity provider.
- Confirm ECR image exists — missing image causes
CannotPullContainerError. - Confirm both roles exist and trust
ecs-tasks.amazonaws.com. - Confirm target group is
target_type=ip—instancesilently fails. - Confirm subnets are private and span >= 2 AZs.
- Pre-create CloudWatch log group with retention.
- For existing services, capture current config for rollback.
Full CLI sequences for all checks in references/networking-and-scaling-guide.md.
Output format — MANDATORY literal labels
When invoked with a service deployment request, your ENTIRE response MUST
be the checklist block below. The labels are case-sensitive all-caps
keywords. Do NOT write a preamble. Start with SERVICE: and stop after
the VERIFICATION_COMMANDS: block.
SERVICE: <name>
VERDICT: READY_TO_DEPLOY | PREREQUISITES_MISSING
CHECKLIST:
[✓] Cluster — <cluster> (Fargate capacity provider)
[✓] Task definition — <family>:<rev> (<cpu> vCPU / <memory> MB)
[✓] Container — <image-uri>
[✓] Container health check — <path> (<interval>, <timeout>, <retries>)
[✓] Networking — awsvpc, subnets <subnets>, sg-<name>
[✓] Load balancer — ALB <tg-name>:<port> (target type ip)
[✓] Desired count — <n> (across <az-count> AZs)
[✓] Deployment circuit breaker — enabled with rollback
[✓] Minimum healthy percent — 100% / Maximum percent — 200%
[✓] Execution role — <exec-role> (ECR + Secrets Manager + logs)
[✓] Task role — <task-role> (<service-specific permissions>)
[✓] Secrets — <secret-names> from secretsmanager / ssm
[✓] Logging — FireLens / awslogs → CloudWatch /ecs/<name>, retention <days>
[OPTIONAL] Auto-scaling — target tracking <metric> <target>, min <x> / max <y>
VERIFICATION_COMMANDS:
aws ecs describe-services --cluster <cluster> --services <name>
aws ecs describe-task-definition --task-definition <family>:<rev>
aws ec2 describe-security-groups --group-ids <sg>
aws elbv2 describe-target-health --target-group-arn <tg-arn>
aws logs describe-log-groups --log-group-name-prefix /ecs/<name>
Status marker semantics:
[✓]— applied and verified.[✗]— NOT applied or misconfigured. Cite the gap.[OPTIONAL]— recommended but not required.[INPUT NEEDED]— prerequisite value missing; operator must provide.
PREREQUISITES_MISSING verdict: if any REQUIRED prerequisite is missing
(cluster, task definition, subnets, execution role, target group ARN for
ALB-fronted service), the verdict is PREREQUISITES_MISSING.
References (load on demand)
- references/deployment-cli-commands.md — full copy-pasteable CLI for all 10 deployment steps, plus the capacity-provider-strategy variant and auto-scaling CLI moved from SKILL.md.
- references/networking-and-scaling-guide.md — awsvpc networking, ALB integration, auto-scaling, Spot strategy, full NEVER list, plus the expert heuristic and edge-case quick list moved from SKILL.md.
- references/diagnostic-commands.md — Step 10 verification commands moved from SKILL.md.
- references/advanced-patterns.md — latest ECS Fargate features (2024-2026) moved from SKILL.md.
Domain
AWS CloudOps / ECS Fargate Container Compute Provisioning.
Edge-case handling
Edge-case quick list moved verbatim to references/networking-and-scaling-guide.md. Load on demand for cross-account ECR, ECS Exec, health-check divergence, slow-start JVM, Spot drain, capacity-provider lock-in, Service Connect/Cloud Map.
AWS documentation
- Amazon ECS Developer Guide — https://docs.aws.amazon.com/AmazonECS/latest/developerguide/Welcome.html
- ECS Fargate — https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html
- ECS Task Definition — https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html
- ECS Service — https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html
- Fargate CPU/Memory — https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size
- ECS Capacity Providers — https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-capacity-providers.html
- ECS Deployment Circuit Breaker — https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-circuit-breaker.html
- ECS Logging with FireLens — https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html
- ECS CLI Reference — https://docs.aws.amazon.com/cli/latest/reference/ecs/
References
-
references/deployment-cli-commands.md— full copy-pasteable CLI command sequence for all 10 deployment steps, including execution role + task role creation, task definition registration, service creation, ALB target group- listener rule, auto-scaling, and Terraform equivalents.
-
references/networking-and-scaling-guide.md— deep reference on awsvpc networking (ENI lifecycle, NAT Gateway vs VPC endpoints), ALB integration, target-tracking auto-scaling, Fargate Spot strategy, full NEVER list, edge-case handling, expert heuristics, and pre-flight safety CLI.
04 同仓库更多 Skills
xray-tracing-deployer
Deploys AWS X-Ray distributed tracing with production-grade configuration: X-Ray daemon deployment (EC2 systemd, ECS sidecar, EKS DaemonSet, Lambda built-in), SDK instrumentation (Java, Python, Node.js, Go, .NET) with annotations and metadata, sampling rules (default reservoir + rate vs custom rules with URL / method / service-name predicates), service map generation, trace query and retrieval, groups and insights, CloudWatch ServiceLens integration, IAM permissions (PutTraceSegments, GetSamplingRules), and latest features (Lambda Powertools tracing, OpenTelemetry / ADOT Collector support, W3C trace context). Emits a READY_TO_DEPLOY checklist with every configuration item verified. Use when enabling X-Ray on a new application, adding tracing to ECS / EKS / Lambda, validating a sampling configuration, or generating daemon deployment CLI and IaC templates. Triggers: X-Ray, distributed tracing, X-Ray daemon, sampling rules, service map, X-Ray SDK, OpenTelemetry, ADOT, Lambda Powertools, CloudWatch ServiceLens.
wellarchitected-workload-auditor
Audits AWS Well-Architected Tool workloads for review staleness, per-pillar high-risk issue counts, milestone tracking gaps, and remediation plan completeness. Emits a deterministic verdict (STALE_REVIEW | HIGH_RISK | CONFIG_GAP | OK) per workload with per-pillar risk breakdown, milestone trend analysis, and specific remediation. Use when reviewing Well-Architected workloads, checking WA review freshness, auditing high-risk issues per pillar, validating milestone coverage, or tracking remediation plans.
wellarchitected-review-operator
Operates AWS Well-Architected Tool reviews end-to-end — creates workloads, runs pillar reviews (operational excellence, security, reliability, performance, cost optimization, sustainability, Prosperity), answers questions with risk-tier rationale, generates reports and improvement plans, creates milestones, and integrates with Trusted Advisor and Well-Architected Labs. Runs deterministic pre-checks (workload existence, lens availability, pillar coverage), emits the exact update-answer / get-consolidated-report CLI behind a CONFIRM gate, and verifies risk-tier transitions. Emits READY | BLOCKED | COMPLETED. Use when creating a workload, answering pillar questions, generating an improvement plan, creating a milestone, or integrating with Trusted Advisor. Triggers: well-architected tool, well architected review, workload review, pillar, operational excellence, security, reliability, performance, cost optimization, sustainability, prosperity, improvement plan, milestone, trusted advisor.
wafv2-web-acl-deployer
Provisions AWS WAFv2 Web ACLs with correct production defaults: scope selection (CLOUDFRONT vs REGIONAL), managed rule groups (AWSManagedRulesCommonRuleSet, SQLiRuleSet, LinuxRuleSet, WindowsRuleSet, IPReputationList, BotControlRuleSet, AmazonIpReputationList, ATP), custom rules (byte match, IP set, regex pattern, geo match, size constraint, rate-based), rule priority ordering, logging destinations (Kinesis Firehose, CloudWatch Logs, S3), resource association (ALB, API Gateway, CloudFront), rate-based rules with aggregate keys (IP, forwarded IP), Challenge and CAPTCHA actions, and account takeover prevention. Emits a READY_TO_DEPLOY checklist. Use when creating a Web ACL, attaching managed rules, configuring rate limiting, enabling WAF logging, associating a Web ACL with an ALB/API Gateway/CloudFront, or configuring CAPTCHA/Challenge actions. Triggers: create WAF Web ACL, WAFv2, managed rule groups, WAF rate limiting, WAF logging, WAF CAPTCHA, WAF Challenge action, bot control, ATP managed rules.
wafv2-web-acl-auditor
Audits AWS WAFv2 Web ACL configurations to determine whether the ACL provides effective protection: default-action posture (Allow vs Block), managed-rule-group coverage gaps, rule effectiveness (BLOCK vs COUNT, shadow/bypass rules, stale exclusions), rate-based rule correctness, logging and visibility configuration, and text-transformation bypass vectors. Emits a deterministic verdict per Web ACL. Use when reviewing a WAFv2 Web ACL for security posture, checking managed-rule coverage, validating rate-limit configuration, auditing WAF logging, or hardening a WAF before production deployment. Triggers: WAF, WAFv2, Web ACL, managed rule group, AWSManagedRules, rate-based rule, CAPTCHA, Challenge, OverrideAction, Count mode, forwarded IP, Bot Control, ATP, text transformation, WAF logging, WAF visibility, OWASP, SQLi, XSS, RFI.
waf-rule-deployer
Provisions AWS WAFv2 rule sets with production defaults: Web ACL creation (CloudFront scope in us-east-1 vs Regional scope), rule groups (managed vs custom) with capacity planning in WCU (Web ACL Capacity Units, 1500 default per ACL), managed rule groups (AWSManagedRulesCommonRuleSet, AWSManagedRulesSQLiRuleSet, AWSManagedRulesAmazonIpReputationList, AWSManagedRulesLinuxRuleSet, AWSManagedRulesWindowsRuleSet, AWSManagedRulesUnixRuleSet), custom rules (byte-match, regex pattern set, geo-match, rate-based), IP set and regex pattern set resources, rule priority ordering (lowest number evaluated first), action types (allow, block, count, CAPTCHA, Challenge), bot control managed rule group, account takeover. Triggers: create WAF rule, WAF managed rule group, WAF custom rule, WAF byte match, WAF geo match, WAF rate based rule, WAF IP set, WAF regex pattern set, WAF WCU budget, WAF CloudFront ACL, WAF logging Kinesis Firehose, WAF bot control, WAF ATP, WAF label matching, WAF Challenge action, WAF CAPTCHA.