Creator · itsmostafa
Last updated · Sep 4, 2026
AWS ECS container orchestration for running Docker containers. Use when deploying containerized applications, configuring task definitions, setting up services, managing clusters, or troubleshooting container issues.
Creator · itsmostafa
Last updated · Sep 4, 2026
AWS ECS container orchestration for running Docker containers. Use when deploying containerized applications, configuring task definitions, setting up services, managing clusters, or troubleshooting container issues.
Creator · itsmostafa
Last updated · Sep 4, 2026
AWS ECS container orchestration for running Docker containers. Use when deploying containerized applications, configuring task definitions, setting up services, managing clusters, or troubleshooting container issues.
Creator · itsmostafa
Last updated · Sep 4, 2026
AWS ECS container orchestration for running Docker containers. Use when deploying containerized applications, configuring task definitions, setting up services, managing clusters, or troubleshooting container issues.
Sandbox only
Install targets
Codex install prompt
Install the "ecs" agent skill from https://github.com/itsmostafa/aws-agent-skills/tree/main/skills/ecs. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: AWS ECS container orchestration for running Docker containers. Use when deploying containerized applications, configuring task definitions, setting up services, managing clusters, or troubleshooting container issues. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"itsmostafa-ecs","task":"Install ecs","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add itsmostafa/aws-agent-skills --skill ecs
Maintenance
fresh
5d since push
Risk
Needs review
Dependency or permission surface needs review
GitHub quality
1.1K
78/100 Quality · 68/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
1.1K GitHub stars
Repo activity
1.1K stars, 444 forks
Maintenance
5d since push
License
MIT
Install
npx skills add itsmostafa/aws-agent-skills --skill ecs
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add itsmostafa/aws-agent-skills --skill ecsDo not use when
Agent safety v2
This skill should not be selected by an agent without explicit human security review.
Do not auto-install. Inspect the source, dependencies, and permission surface first.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20ecs%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20ecs%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/itsmostafa-ecs/install
Agent should check
Copy prompt
Task: Use ecs in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20ecs%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/itsmostafa-ecs/install
Install command: npx skills add itsmostafa/aws-agent-skills --skill ecs
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/itsmostafa-ecs/install
LLM text format
/api/skills/itsmostafa-ecs/install?format=text
Find alternatives
/api/skills/search?q=ecs&limit=3
Agent prompt
Use ecs for this task. Review https://www.openagentskill.com/api/skills/itsmostafa-ecs/install, then install with: npx skills add itsmostafa/aws-agent-skills --skill ecsRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/itsmostafa-ecs
LLM text
/api/registry/manifest/itsmostafa-ecs?format=text
Install alias
/api/registry/install/itsmostafa-ecs
Recommend
/api/registry/recommend?task=Use%20ecs%20in%20an%20agent%20workflow&limit=3
Agent fit
Local desktop
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Local desktop
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
PASS1.1K GitHub stars
Stars/forks activity
PASS1.1K stars, 444 forks; issue activity unavailable in current metadata
Recent maintenance
PASS5d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Operate local tools
I need my agent to operate local files and desktop apps in a repeatable workflow.
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Reduce risk
I need my agent to scan a project for security risks and summarize what needs attention.
Workflow fit
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Turn skills into distribution
A workflow for turning newly indexed skills into SEO briefs, social drafts, comparison pages, and reusable publishing workflows.
Alternative shortlist
Similar skills that may fit this task.
Run multimodal agents that operate desktop interfaces
Connect agents to hundreds of workflow automations
利用AI大模型,一键生成高清短视频 Generate short videos with one click using AI LLM.
Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
--- name: ecs description: AWS ECS container orchestration for running Docker containers. Use when deploying containerized applications, configuring task definitions, setting up services, managing clusters, or troubleshooting container issues. last_updated: "2026-01-07" doc_source: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ ---
# AWS ECS
Amazon Elastic Container Service (ECS) is a fully managed container orchestration service. Run containers on AWS Fargate (serverless) or EC2 instances.
## Table of Contents
- [Core Concepts](#core-concepts) - [Common Patterns](#common-patterns) - [CLI Reference](#cli-reference) - [Best Practices](#best-practices) - [Troubleshooting](#troubleshooting) - [References](#references)
## Core Concepts
### Cluster
Logical grouping of tasks or services. Can contain Fargate tasks, EC2 instances, or both.
### Task Definition
Blueprint for your application. Defines containers, resources, networking, and IAM roles.
### Task
Running instance of a task definition. Can run standalone or as part of a service.
### Service
Maintains desired count of tasks. Handles deployments, load balancing, and auto scaling.
### Launch Types
| Type | Description | Use Case | |------|-------------|----------| | **Fargate** | Serverless, pay per task | Most workloads | | **EC2** | Self-managed instances | GPU, Windows, specific requirements |
## Common Patterns
### Create a Fargate Cluster
**AWS CLI:**
```bash # Create cluster aws ecs create-cluster --cluster-name my-cluster
# With capacity providers aws ecs create-cluster \ --cluster-name my-cluster \ --capacity-providers FARGATE FARGATE_SPOT \ --default-capacity-provider-strategy \ capacityProvider=FARGATE,weight=1 \ capacityProvider=FARGATE_SPOT,weight=1 ```
### Register Task Definition
```bash cat > task-definition.json << 'EOF' { "family": "web-app", "networkMode": "awsvpc", "requiresCompatibilities": ["FARGATE"], "cpu": "256", "memory": "512", "executionRoleArn": "arn:aws:iam::123456789012:role/ecsTaskExecutionRole", "taskRoleArn": "arn:aws:iam::123456789012:role/ecsTaskRole", "containerDefinitions": [ { "name": "web", "image": "123456789012.dkr.ecr.us-east-1.amazonaws.com/my-app:latest", "portMappings": [ { "containerPort": 8080, "protocol": "tcp" } ], "environment": [ {"name": "NODE_ENV", "value": "production"} ], "secrets": [ { "name": "DB_PASSWORD", "valueFrom": "arn:aws:secretsmanager:us-east-1:123456789012:secret:db-password" } ], "logConfiguration": { "logDriver": "awslogs", "options": { "awslogs-group": "/ecs/web-app", "awslogs-region": "us-east-1", "awslogs-stream-prefix": "ecs", "mode": "non-blocking", "max-buffer-size": "25m" } }, "healthCheck": { "command": ["CMD-SHELL", "curl -f http://localhost:8080/health || exit 1"], "interval": 30, "timeout": 5, "retries": 3, "startPeriod": 60 } } ] } EOF
aws ecs register-task-definition --cli-input-json file://task-definition.json ```
### Create Service with Load Balancer
```bash aws ecs create-service \ --cluster my-cluster \ --service-name web-service \ --task-definition web-app:1 \ --desired-count 2 \ --launch-type FARGATE \ --network-configuration "awsvpcConfiguration={ subnets=[subnet-12345678,subnet-87654321], securityGroups=[sg-12345678], assignPublicIp=DISABLED }" \ --load-balancers "targetGroupArn=arn:aws:elasticloadbalancing:us-east-1:123456789012:targetgroup/web-tg/1234567890123456,containerName=web,containerPort=8080" \ --health-check-grace-period-seconds 60 \ --deployment-configuration "deploymentCircuitBreaker={enable=true,rollback=true}" ```
### Run Standalone Task
```bash aws ecs run-task \ --cluster my-cluster \ --task-definition my-batch-job:1 \ --launch-type FARGATE \ --network-configuration "awsvpcConfiguration={ subnets=[subnet-12345678], securityGroups=[sg-12345678], assignPublicIp=ENABLED }" ```
### Update Service (Deploy New Image)
```bash # Register new task definition with updated image aws ecs register-task-definition --cli-input-json file://task-definition.json
# Update service to use new version aws ecs update-service \ --cluster my-cluster \ --service web-service \ --task-definition web-app:2 \ --force-new-deployment ```
### Fargate Spot with SQS-Based Scaling
Use `FARGATE_SPOT` for batch/queue workloads to cut costs ~70%. Always include a fallback to regular `FARGATE`.
```bash # Create service with Spot + fallback aws ecs create-service \ --cluster batch-cluster \ --service-name queue-processor \ --task-definition my-processor:1 \ --desired-count 0 \ --capacity-provider-strategy \ capacityProvider=FARGATE_SPOT,weight=4,base=0 \ capacityProvider=FARGATE,weight=1,base=1 \ --network-configuration "awsvpcConfiguration={ subnets=[subnet-12345678], securityGroups=[sg-12345678], assignPublicIp=DISABLED }"
# Register scalable target (scale to zero when queue empty) aws application-autoscaling register-scalable-target \ --service-namespace ecs \ --resource-id service/batch-cluster/queue-processor \ --scalable-dimension ecs:service:DesiredCount \ --min-capacity 0 \ --max-capacity 20
# Scale-out alarm: messages > 100 aws cloudwatch put-metric-alarm \ --alarm-name queue-scale-out \ --metric-name ApproximateNumberOfMessagesVisible \ --namespace AWS/SQS \ --dimensions Name=QueueName,Value=my-queue \ --statistic Average \ --period 60 \ --evaluation-periods 1 \ --threshold 100 \ --comparison-operator GreaterThanThreshold \ --alarm-actions <scale-out-policy-arn>
# Scale-in alarm: queue empty for 3 periods (conservative to avoid flapping) aws cloudwatch put-metric-alarm \ --alarm-name queue-scale-in \ --metric-name ApproximateNumberOfMessagesVisible \ --namespace AWS/SQS \ --dimensions Name=QueueName,Value=my-queue \ --statistic Average \ --period 60 \ --evaluation-periods 3 \ --threshold 0 \ --comparison-operator LessThanOrEqualToThreshold \ --alarm-actions <scale-in-policy-arn> ```
**Fargate Spot interruption handling:** Spot tasks receive a SIGTERM 2 minutes before termination. Catch it in your application for graceful shutdown. For SQS consumers, call `ChangeMessageVisibility` on in-flight messages so they return to the queue rather than timing out.
### Auto Scaling
```bash # Register scalable target aws application-autoscaling register-scalable-target \ --service-namespace ecs \ --resource-id service/my-cluster/web-service \ --scalable-dimension ecs:service:DesiredCount \ --min-capacity 2 \ --max-capacity 10
# Target tracking policy aws application-autoscaling put-scaling-policy \ --service-namespace ecs \ --resource-id service/my-cluster/web-service \ --scalable-dimension ecs:service:DesiredCount \ --policy-name cpu-target-tracking \ --policy-type TargetTrackingScaling \ --target-tracking-scaling-policy-configuration '{ "TargetValue": 70.0, "PredefinedMetricSpecification": { "PredefinedMetricType": "ECSServiceAverageCPUUtilization" }, "ScaleOutCooldown": 60, "ScaleInCooldown": 120 }' ```
## CLI Reference
### Cluster Management
| Command | Description | |---------|-------------| | `aws ecs create-cluster` | Create cluster | | `aws ecs describe-clusters` | Get cluster details | | `aws ecs list-clusters` | List clusters | | `aws ecs delete-cluster` | Delete cluster |
### Task Definitions
| Command | Description | |---------|-------------| | `aws ecs register-task-definition` | Create task definition | | `aws ecs describe-task-definition` | Get task definition | | `aws ecs list-task-definitions` | List task definitions | | `aws ecs deregister-task-definition` | Deregister version |
### Services
| Command | Description | |---------|-------------| | `aws ecs create-service` | Create service | | `aws ecs update-service` | Update service | | `aws ecs describe-services` | Get service details | | `aws ecs delete-service` | Delete service |
### Tasks
| Command | Description | |---------|-------------| | `aws ecs run-task` | Run standalone task | | `aws ecs stop-task` | Stop running task | | `aws ecs describe-tasks` | Get task details | | `aws ecs list-tasks` | List tasks |
## Best Practices
### Security
- **Use task roles** for AWS API access (not access keys) - **Use execution roles** for ECR/Secrets access - **Store secrets in Secrets Manager** or Parameter Store - **Use private subnets** with NAT gateway - **Enable CloudTrail** for API auditing
### Performance
- **Right-size CPU/memory** — monitor and adjust - **Use Fargate Spot** for fault-tolerant workloads (70% savings) - **Enable container insights** for monitoring - **Use service discovery** for internal communication
### Reliability
- **Deploy across multiple AZs** - **Configure health checks** properly - **Set appropriate deregistration delay** - **Use circuit breaker** for deployments
```bash aws ecs update-service \ --cluster my-cluster \ --service web-service \ --deployment-configuration '{ "deploymentCircuitBreaker": { "enable": true, "rollback": true } }' ```
### Cost Optimization
- **Use Fargate Spot** for batch workloads - **Right-size task resources** - **Scale to zero** when not needed - **Use capacity providers** for mixed Fargate/Spot
## Troubleshooting
### Task Fails to Start
**Check:**
```bash # View stopped tasks aws ecs describe-tasks \ --cluster my-cluster \ --tasks $(aws ecs list-tasks --cluster my-cluster --desired-status STOPPED --query 'taskArns[0]' --output text) ```
**Common causes:** - Image not found (ECR permissions) - Secrets access denied - Network configuration (subnets, security groups) - Resource limits exceeded
### Container Keeps Restarting
**Debug:**
```bash # Check CloudWatch logs aws logs get-log-events \ --log-group-name /ecs/web-app \ --log-stream-name "ecs/web/abc123"
# Check task details aws ecs describe-tasks \ --cluster my-cluster \ --tasks task-arn \ --query 'tasks[0].containers[0].{reason:reason,exitCode:exitCode}' ```
**Causes:** - Health check failing - Application crashing - Out of memory
### Live Debugging with ECS Exec
Connect directly to a running container without SSH. Requires `enableExecuteCommand: true` on the service and the SSM agent in your container image (included in most base images).
```bash # Enable on existing service aws ecs update-service \ --cluster my-cluster \ --service web-service \ --enable-execute-command
# Get a shell in a running task TASK_ARN=$(aws ecs list-tasks --cluster my-cluster --service-name web-service \ --query 'taskArns[0]' --output text)
aws ecs execute-command \ --cluster my-cluster \ --task $TASK_ARN \ --container web \ --interactive \ --command "/bin/sh" ```
**Requirements:** Task role must have `ssmmessages:CreateControlChannel`, `ssmmessages:CreateDataChannel`, `ssmmessages:OpenControlChannel`, `ssmmessages:OpenDataChannel` permissions.
### Service Stuck Deploying
```bash # Check deployment status aws ecs describe-services \ --cluster my-cluster \ --services web-service \ --query 'services[0].deployments'
# Check events aws ecs describe-services \ --cluster my-cluster \ --services web-service \ --query 'services[0].events[:5]' ```
**Causes:** - Health check failing on new tasks - Not enough capacity - Target group health checks failing
### Cannot Pull Image from ECR
**Check execution role has:**
```json { "Effect": "Allow", "Action": [ "ecr:GetAuthorizationToken", "ecr:BatchCheckLayerAvailability", "ecr:GetDownloadUrlForLayer", "ecr:BatchGetImage" ], "Resource": "*" } ```
**Also check:** - VPC endpoint for ECR (if private su
Source provenance
Decision snapshot
1,150 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for ecs, ready for a manual X post.
ecs: AWS ECS container orchestration for running Docker containers. Use when deploying containeriz... 1.1K stars https://www.openagentskill.com/skills/itsmostafa-ecs?ref=x
Listing + install path for ecs: https://www.openagentskill.com/skills/itsmostafa-ecs?ref=x Install: npx skills add itsmostafa/aws-agent-skills --skill ecs
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to itsmostafa but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/itsmostafa-ecs?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/itsmostafa-ecs?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/itsmostafa-ecs/audit)
[](https://www.openagentskill.com/skills/itsmostafa-ecs?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)itsmostafa
@itsmostafa
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
UI-TARS Desktop
Run multimodal agents that operate desktop interfaces
37.0K Starsn8n
Connect agents to hundreds of workflow automations
194.1K StarsMoneyPrinterTurbo
利用AI大模型,一键生成高清短视频 Generate short videos with one click using AI LLM.
88.5K StarsTasmota
Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
24.7K StarsSandbox only
Install targets
Codex install prompt
Install the "ecs" agent skill from https://github.com/itsmostafa/aws-agent-skills/tree/main/skills/ecs. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: AWS ECS container orchestration for running Docker containers. Use when deploying containerized applications, configuring task definitions, setting up services, managing clusters, or troubleshooting container issues. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"itsmostafa-ecs","task":"Install ecs","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add itsmostafa/aws-agent-skills --skill ecs
Maintenance
fresh
5d since push
Risk
Needs review
Dependency or permission surface needs review
GitHub quality
1.1K
78/100 Quality · 68/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
1.1K GitHub stars
Repo activity
1.1K stars, 444 forks
Maintenance
5d since push
License
MIT
Install
npx skills add itsmostafa/aws-agent-skills --skill ecs
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add itsmostafa/aws-agent-skills --skill ecsDo not use when
Agent safety v2
This skill should not be selected by an agent without explicit human security review.
Do not auto-install. Inspect the source, dependencies, and permission surface first.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20ecs%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20ecs%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/itsmostafa-ecs/install
Agent should check
Copy prompt
Task: Use ecs in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20ecs%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/itsmostafa-ecs/install
Install command: npx skills add itsmostafa/aws-agent-skills --skill ecs
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/itsmostafa-ecs/install
LLM text format
/api/skills/itsmostafa-ecs/install?format=text
Find alternatives
/api/skills/search?q=ecs&limit=3
Agent prompt
Use ecs for this task. Review https://www.openagentskill.com/api/skills/itsmostafa-ecs/install, then install with: npx skills add itsmostafa/aws-agent-skills --skill ecsRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/itsmostafa-ecs
LLM text
/api/registry/manifest/itsmostafa-ecs?format=text
Install alias
/api/registry/install/itsmostafa-ecs
Recommend
/api/registry/recommend?task=Use%20ecs%20in%20an%20agent%20workflow&limit=3
Agent fit
Local desktop
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Local desktop
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
PASS1.1K GitHub stars
Stars/forks activity
PASS1.1K stars, 444 forks; issue activity unavailable in current metadata
Recent maintenance
PASS5d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Operate local tools
I need my agent to operate local files and desktop apps in a repeatable workflow.
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Reduce risk
I need my agent to scan a project for security risks and summarize what needs attention.
Workflow fit
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Turn skills into distribution
A workflow for turning newly indexed skills into SEO briefs, social drafts, comparison pages, and reusable publishing workflows.
Alternative shortlist
Similar skills that may fit this task.
Run multimodal agents that operate desktop interfaces
Connect agents to hundreds of workflow automations
利用AI大模型,一键生成高清短视频 Generate short videos with one click using AI LLM.
Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
--- name: ecs description: AWS ECS container orchestration for running Docker containers. Use when deploying containerized applications, configuring task definitions, setting up services, managing clusters, or troubleshooting container issues. last_updated: "2026-01-07" doc_source: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ ---
# AWS ECS
Amazon Elastic Container Service (ECS) is a fully managed container orchestration service. Run containers on AWS Fargate (serverless) or EC2 instances.
## Table of Contents
- [Core Concepts](#core-concepts) - [Common Patterns](#common-patterns) - [CLI Reference](#cli-reference) - [Best Practices](#best-practices) - [Troubleshooting](#troubleshooting) - [References](#references)
## Core Concepts
### Cluster
Logical grouping of tasks or services. Can contain Fargate tasks, EC2 instances, or both.
### Task Definition
Blueprint for your application. Defines containers, resources, networking, and IAM roles.
### Task
Running instance of a task definition. Can run standalone or as part of a service.
### Service
Maintains desired count of tasks. Handles deployments, load balancing, and auto scaling.
### Launch Types
| Type | Description | Use Case | |------|-------------|----------| | **Fargate** | Serverless, pay per task | Most workloads | | **EC2** | Self-managed instances | GPU, Windows, specific requirements |
## Common Patterns
### Create a Fargate Cluster
**AWS CLI:**
```bash # Create cluster aws ecs create-cluster --cluster-name my-cluster
# With capacity providers aws ecs create-cluster \ --cluster-name my-cluster \ --capacity-providers FARGATE FARGATE_SPOT \ --default-capacity-provider-strategy \ capacityProvider=FARGATE,weight=1 \ capacityProvider=FARGATE_SPOT,weight=1 ```
### Register Task Definition
```bash cat > task-definition.json << 'EOF' { "family": "web-app", "networkMode": "awsvpc", "requiresCompatibilities": ["FARGATE"], "cpu": "256", "memory": "512", "executionRoleArn": "arn:aws:iam::123456789012:role/ecsTaskExecutionRole", "taskRoleArn": "arn:aws:iam::123456789012:role/ecsTaskRole", "containerDefinitions": [ { "name": "web", "image": "123456789012.dkr.ecr.us-east-1.amazonaws.com/my-app:latest", "portMappings": [ { "containerPort": 8080, "protocol": "tcp" } ], "environment": [ {"name": "NODE_ENV", "value": "production"} ], "secrets": [ { "name": "DB_PASSWORD", "valueFrom": "arn:aws:secretsmanager:us-east-1:123456789012:secret:db-password" } ], "logConfiguration": { "logDriver": "awslogs", "options": { "awslogs-group": "/ecs/web-app", "awslogs-region": "us-east-1", "awslogs-stream-prefix": "ecs", "mode": "non-blocking", "max-buffer-size": "25m" } }, "healthCheck": { "command": ["CMD-SHELL", "curl -f http://localhost:8080/health || exit 1"], "interval": 30, "timeout": 5, "retries": 3, "startPeriod": 60 } } ] } EOF
aws ecs register-task-definition --cli-input-json file://task-definition.json ```
### Create Service with Load Balancer
```bash aws ecs create-service \ --cluster my-cluster \ --service-name web-service \ --task-definition web-app:1 \ --desired-count 2 \ --launch-type FARGATE \ --network-configuration "awsvpcConfiguration={ subnets=[subnet-12345678,subnet-87654321], securityGroups=[sg-12345678], assignPublicIp=DISABLED }" \ --load-balancers "targetGroupArn=arn:aws:elasticloadbalancing:us-east-1:123456789012:targetgroup/web-tg/1234567890123456,containerName=web,containerPort=8080" \ --health-check-grace-period-seconds 60 \ --deployment-configuration "deploymentCircuitBreaker={enable=true,rollback=true}" ```
### Run Standalone Task
```bash aws ecs run-task \ --cluster my-cluster \ --task-definition my-batch-job:1 \ --launch-type FARGATE \ --network-configuration "awsvpcConfiguration={ subnets=[subnet-12345678], securityGroups=[sg-12345678], assignPublicIp=ENABLED }" ```
### Update Service (Deploy New Image)
```bash # Register new task definition with updated image aws ecs register-task-definition --cli-input-json file://task-definition.json
# Update service to use new version aws ecs update-service \ --cluster my-cluster \ --service web-service \ --task-definition web-app:2 \ --force-new-deployment ```
### Fargate Spot with SQS-Based Scaling
Use `FARGATE_SPOT` for batch/queue workloads to cut costs ~70%. Always include a fallback to regular `FARGATE`.
```bash # Create service with Spot + fallback aws ecs create-service \ --cluster batch-cluster \ --service-name queue-processor \ --task-definition my-processor:1 \ --desired-count 0 \ --capacity-provider-strategy \ capacityProvider=FARGATE_SPOT,weight=4,base=0 \ capacityProvider=FARGATE,weight=1,base=1 \ --network-configuration "awsvpcConfiguration={ subnets=[subnet-12345678], securityGroups=[sg-12345678], assignPublicIp=DISABLED }"
# Register scalable target (scale to zero when queue empty) aws application-autoscaling register-scalable-target \ --service-namespace ecs \ --resource-id service/batch-cluster/queue-processor \ --scalable-dimension ecs:service:DesiredCount \ --min-capacity 0 \ --max-capacity 20
# Scale-out alarm: messages > 100 aws cloudwatch put-metric-alarm \ --alarm-name queue-scale-out \ --metric-name ApproximateNumberOfMessagesVisible \ --namespace AWS/SQS \ --dimensions Name=QueueName,Value=my-queue \ --statistic Average \ --period 60 \ --evaluation-periods 1 \ --threshold 100 \ --comparison-operator GreaterThanThreshold \ --alarm-actions <scale-out-policy-arn>
# Scale-in alarm: queue empty for 3 periods (conservative to avoid flapping) aws cloudwatch put-metric-alarm \ --alarm-name queue-scale-in \ --metric-name ApproximateNumberOfMessagesVisible \ --namespace AWS/SQS \ --dimensions Name=QueueName,Value=my-queue \ --statistic Average \ --period 60 \ --evaluation-periods 3 \ --threshold 0 \ --comparison-operator LessThanOrEqualToThreshold \ --alarm-actions <scale-in-policy-arn> ```
**Fargate Spot interruption handling:** Spot tasks receive a SIGTERM 2 minutes before termination. Catch it in your application for graceful shutdown. For SQS consumers, call `ChangeMessageVisibility` on in-flight messages so they return to the queue rather than timing out.
### Auto Scaling
```bash # Register scalable target aws application-autoscaling register-scalable-target \ --service-namespace ecs \ --resource-id service/my-cluster/web-service \ --scalable-dimension ecs:service:DesiredCount \ --min-capacity 2 \ --max-capacity 10
# Target tracking policy aws application-autoscaling put-scaling-policy \ --service-namespace ecs \ --resource-id service/my-cluster/web-service \ --scalable-dimension ecs:service:DesiredCount \ --policy-name cpu-target-tracking \ --policy-type TargetTrackingScaling \ --target-tracking-scaling-policy-configuration '{ "TargetValue": 70.0, "PredefinedMetricSpecification": { "PredefinedMetricType": "ECSServiceAverageCPUUtilization" }, "ScaleOutCooldown": 60, "ScaleInCooldown": 120 }' ```
## CLI Reference
### Cluster Management
| Command | Description | |---------|-------------| | `aws ecs create-cluster` | Create cluster | | `aws ecs describe-clusters` | Get cluster details | | `aws ecs list-clusters` | List clusters | | `aws ecs delete-cluster` | Delete cluster |
### Task Definitions
| Command | Description | |---------|-------------| | `aws ecs register-task-definition` | Create task definition | | `aws ecs describe-task-definition` | Get task definition | | `aws ecs list-task-definitions` | List task definitions | | `aws ecs deregister-task-definition` | Deregister version |
### Services
| Command | Description | |---------|-------------| | `aws ecs create-service` | Create service | | `aws ecs update-service` | Update service | | `aws ecs describe-services` | Get service details | | `aws ecs delete-service` | Delete service |
### Tasks
| Command | Description | |---------|-------------| | `aws ecs run-task` | Run standalone task | | `aws ecs stop-task` | Stop running task | | `aws ecs describe-tasks` | Get task details | | `aws ecs list-tasks` | List tasks |
## Best Practices
### Security
- **Use task roles** for AWS API access (not access keys) - **Use execution roles** for ECR/Secrets access - **Store secrets in Secrets Manager** or Parameter Store - **Use private subnets** with NAT gateway - **Enable CloudTrail** for API auditing
### Performance
- **Right-size CPU/memory** — monitor and adjust - **Use Fargate Spot** for fault-tolerant workloads (70% savings) - **Enable container insights** for monitoring - **Use service discovery** for internal communication
### Reliability
- **Deploy across multiple AZs** - **Configure health checks** properly - **Set appropriate deregistration delay** - **Use circuit breaker** for deployments
```bash aws ecs update-service \ --cluster my-cluster \ --service web-service \ --deployment-configuration '{ "deploymentCircuitBreaker": { "enable": true, "rollback": true } }' ```
### Cost Optimization
- **Use Fargate Spot** for batch workloads - **Right-size task resources** - **Scale to zero** when not needed - **Use capacity providers** for mixed Fargate/Spot
## Troubleshooting
### Task Fails to Start
**Check:**
```bash # View stopped tasks aws ecs describe-tasks \ --cluster my-cluster \ --tasks $(aws ecs list-tasks --cluster my-cluster --desired-status STOPPED --query 'taskArns[0]' --output text) ```
**Common causes:** - Image not found (ECR permissions) - Secrets access denied - Network configuration (subnets, security groups) - Resource limits exceeded
### Container Keeps Restarting
**Debug:**
```bash # Check CloudWatch logs aws logs get-log-events \ --log-group-name /ecs/web-app \ --log-stream-name "ecs/web/abc123"
# Check task details aws ecs describe-tasks \ --cluster my-cluster \ --tasks task-arn \ --query 'tasks[0].containers[0].{reason:reason,exitCode:exitCode}' ```
**Causes:** - Health check failing - Application crashing - Out of memory
### Live Debugging with ECS Exec
Connect directly to a running container without SSH. Requires `enableExecuteCommand: true` on the service and the SSM agent in your container image (included in most base images).
```bash # Enable on existing service aws ecs update-service \ --cluster my-cluster \ --service web-service \ --enable-execute-command
# Get a shell in a running task TASK_ARN=$(aws ecs list-tasks --cluster my-cluster --service-name web-service \ --query 'taskArns[0]' --output text)
aws ecs execute-command \ --cluster my-cluster \ --task $TASK_ARN \ --container web \ --interactive \ --command "/bin/sh" ```
**Requirements:** Task role must have `ssmmessages:CreateControlChannel`, `ssmmessages:CreateDataChannel`, `ssmmessages:OpenControlChannel`, `ssmmessages:OpenDataChannel` permissions.
### Service Stuck Deploying
```bash # Check deployment status aws ecs describe-services \ --cluster my-cluster \ --services web-service \ --query 'services[0].deployments'
# Check events aws ecs describe-services \ --cluster my-cluster \ --services web-service \ --query 'services[0].events[:5]' ```
**Causes:** - Health check failing on new tasks - Not enough capacity - Target group health checks failing
### Cannot Pull Image from ECR
**Check execution role has:**
```json { "Effect": "Allow", "Action": [ "ecr:GetAuthorizationToken", "ecr:BatchCheckLayerAvailability", "ecr:GetDownloadUrlForLayer", "ecr:BatchGetImage" ], "Resource": "*" } ```
**Also check:** - VPC endpoint for ECR (if private su
Source provenance
Decision snapshot
1,150 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for ecs, ready for a manual X post.
ecs: AWS ECS container orchestration for running Docker containers. Use when deploying containeriz... 1.1K stars https://www.openagentskill.com/skills/itsmostafa-ecs?ref=x
Listing + install path for ecs: https://www.openagentskill.com/skills/itsmostafa-ecs?ref=x Install: npx skills add itsmostafa/aws-agent-skills --skill ecs
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to itsmostafa but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/itsmostafa-ecs?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/itsmostafa-ecs?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/itsmostafa-ecs/audit)
[](https://www.openagentskill.com/skills/itsmostafa-ecs?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)itsmostafa
@itsmostafa
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
UI-TARS Desktop
Run multimodal agents that operate desktop interfaces
37.0K Starsn8n
Connect agents to hundreds of workflow automations
194.1K StarsMoneyPrinterTurbo
利用AI大模型,一键生成高清短视频 Generate short videos with one click using AI LLM.
88.5K StarsTasmota
Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
24.7K StarsSandbox only
Install targets
Codex install prompt
Install the "ecs" agent skill from https://github.com/itsmostafa/aws-agent-skills/tree/main/skills/ecs. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: AWS ECS container orchestration for running Docker containers. Use when deploying containerized applications, configuring task definitions, setting up services, managing clusters, or troubleshooting container issues. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"itsmostafa-ecs","task":"Install ecs","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add itsmostafa/aws-agent-skills --skill ecs
Maintenance
fresh
5d since push
Risk
Needs review
Dependency or permission surface needs review
GitHub quality
1.1K
78/100 Quality · 68/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
1.1K GitHub stars
Repo activity
1.1K stars, 444 forks
Maintenance
5d since push
License
MIT
Install
npx skills add itsmostafa/aws-agent-skills --skill ecs
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add itsmostafa/aws-agent-skills --skill ecsDo not use when
Agent safety v2
This skill should not be selected by an agent without explicit human security review.
Do not auto-install. Inspect the source, dependencies, and permission surface first.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20ecs%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20ecs%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/itsmostafa-ecs/install
Agent should check
Copy prompt
Task: Use ecs in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20ecs%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/itsmostafa-ecs/install
Install command: npx skills add itsmostafa/aws-agent-skills --skill ecs
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/itsmostafa-ecs/install
LLM text format
/api/skills/itsmostafa-ecs/install?format=text
Find alternatives
/api/skills/search?q=ecs&limit=3
Agent prompt
Use ecs for this task. Review https://www.openagentskill.com/api/skills/itsmostafa-ecs/install, then install with: npx skills add itsmostafa/aws-agent-skills --skill ecsRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/itsmostafa-ecs
LLM text
/api/registry/manifest/itsmostafa-ecs?format=text
Install alias
/api/registry/install/itsmostafa-ecs
Recommend
/api/registry/recommend?task=Use%20ecs%20in%20an%20agent%20workflow&limit=3
Agent fit
Local desktop
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Local desktop
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
PASS1.1K GitHub stars
Stars/forks activity
PASS1.1K stars, 444 forks; issue activity unavailable in current metadata
Recent maintenance
PASS5d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Operate local tools
I need my agent to operate local files and desktop apps in a repeatable workflow.
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Reduce risk
I need my agent to scan a project for security risks and summarize what needs attention.
Workflow fit
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Turn skills into distribution
A workflow for turning newly indexed skills into SEO briefs, social drafts, comparison pages, and reusable publishing workflows.
Alternative shortlist
Similar skills that may fit this task.
Run multimodal agents that operate desktop interfaces
Connect agents to hundreds of workflow automations
利用AI大模型,一键生成高清短视频 Generate short videos with one click using AI LLM.
Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
--- name: ecs description: AWS ECS container orchestration for running Docker containers. Use when deploying containerized applications, configuring task definitions, setting up services, managing clusters, or troubleshooting container issues. last_updated: "2026-01-07" doc_source: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ ---
# AWS ECS
Amazon Elastic Container Service (ECS) is a fully managed container orchestration service. Run containers on AWS Fargate (serverless) or EC2 instances.
## Table of Contents
- [Core Concepts](#core-concepts) - [Common Patterns](#common-patterns) - [CLI Reference](#cli-reference) - [Best Practices](#best-practices) - [Troubleshooting](#troubleshooting) - [References](#references)
## Core Concepts
### Cluster
Logical grouping of tasks or services. Can contain Fargate tasks, EC2 instances, or both.
### Task Definition
Blueprint for your application. Defines containers, resources, networking, and IAM roles.
### Task
Running instance of a task definition. Can run standalone or as part of a service.
### Service
Maintains desired count of tasks. Handles deployments, load balancing, and auto scaling.
### Launch Types
| Type | Description | Use Case | |------|-------------|----------| | **Fargate** | Serverless, pay per task | Most workloads | | **EC2** | Self-managed instances | GPU, Windows, specific requirements |
## Common Patterns
### Create a Fargate Cluster
**AWS CLI:**
```bash # Create cluster aws ecs create-cluster --cluster-name my-cluster
# With capacity providers aws ecs create-cluster \ --cluster-name my-cluster \ --capacity-providers FARGATE FARGATE_SPOT \ --default-capacity-provider-strategy \ capacityProvider=FARGATE,weight=1 \ capacityProvider=FARGATE_SPOT,weight=1 ```
### Register Task Definition
```bash cat > task-definition.json << 'EOF' { "family": "web-app", "networkMode": "awsvpc", "requiresCompatibilities": ["FARGATE"], "cpu": "256", "memory": "512", "executionRoleArn": "arn:aws:iam::123456789012:role/ecsTaskExecutionRole", "taskRoleArn": "arn:aws:iam::123456789012:role/ecsTaskRole", "containerDefinitions": [ { "name": "web", "image": "123456789012.dkr.ecr.us-east-1.amazonaws.com/my-app:latest", "portMappings": [ { "containerPort": 8080, "protocol": "tcp" } ], "environment": [ {"name": "NODE_ENV", "value": "production"} ], "secrets": [ { "name": "DB_PASSWORD", "valueFrom": "arn:aws:secretsmanager:us-east-1:123456789012:secret:db-password" } ], "logConfiguration": { "logDriver": "awslogs", "options": { "awslogs-group": "/ecs/web-app", "awslogs-region": "us-east-1", "awslogs-stream-prefix": "ecs", "mode": "non-blocking", "max-buffer-size": "25m" } }, "healthCheck": { "command": ["CMD-SHELL", "curl -f http://localhost:8080/health || exit 1"], "interval": 30, "timeout": 5, "retries": 3, "startPeriod": 60 } } ] } EOF
aws ecs register-task-definition --cli-input-json file://task-definition.json ```
### Create Service with Load Balancer
```bash aws ecs create-service \ --cluster my-cluster \ --service-name web-service \ --task-definition web-app:1 \ --desired-count 2 \ --launch-type FARGATE \ --network-configuration "awsvpcConfiguration={ subnets=[subnet-12345678,subnet-87654321], securityGroups=[sg-12345678], assignPublicIp=DISABLED }" \ --load-balancers "targetGroupArn=arn:aws:elasticloadbalancing:us-east-1:123456789012:targetgroup/web-tg/1234567890123456,containerName=web,containerPort=8080" \ --health-check-grace-period-seconds 60 \ --deployment-configuration "deploymentCircuitBreaker={enable=true,rollback=true}" ```
### Run Standalone Task
```bash aws ecs run-task \ --cluster my-cluster \ --task-definition my-batch-job:1 \ --launch-type FARGATE \ --network-configuration "awsvpcConfiguration={ subnets=[subnet-12345678], securityGroups=[sg-12345678], assignPublicIp=ENABLED }" ```
### Update Service (Deploy New Image)
```bash # Register new task definition with updated image aws ecs register-task-definition --cli-input-json file://task-definition.json
# Update service to use new version aws ecs update-service \ --cluster my-cluster \ --service web-service \ --task-definition web-app:2 \ --force-new-deployment ```
### Fargate Spot with SQS-Based Scaling
Use `FARGATE_SPOT` for batch/queue workloads to cut costs ~70%. Always include a fallback to regular `FARGATE`.
```bash # Create service with Spot + fallback aws ecs create-service \ --cluster batch-cluster \ --service-name queue-processor \ --task-definition my-processor:1 \ --desired-count 0 \ --capacity-provider-strategy \ capacityProvider=FARGATE_SPOT,weight=4,base=0 \ capacityProvider=FARGATE,weight=1,base=1 \ --network-configuration "awsvpcConfiguration={ subnets=[subnet-12345678], securityGroups=[sg-12345678], assignPublicIp=DISABLED }"
# Register scalable target (scale to zero when queue empty) aws application-autoscaling register-scalable-target \ --service-namespace ecs \ --resource-id service/batch-cluster/queue-processor \ --scalable-dimension ecs:service:DesiredCount \ --min-capacity 0 \ --max-capacity 20
# Scale-out alarm: messages > 100 aws cloudwatch put-metric-alarm \ --alarm-name queue-scale-out \ --metric-name ApproximateNumberOfMessagesVisible \ --namespace AWS/SQS \ --dimensions Name=QueueName,Value=my-queue \ --statistic Average \ --period 60 \ --evaluation-periods 1 \ --threshold 100 \ --comparison-operator GreaterThanThreshold \ --alarm-actions <scale-out-policy-arn>
# Scale-in alarm: queue empty for 3 periods (conservative to avoid flapping) aws cloudwatch put-metric-alarm \ --alarm-name queue-scale-in \ --metric-name ApproximateNumberOfMessagesVisible \ --namespace AWS/SQS \ --dimensions Name=QueueName,Value=my-queue \ --statistic Average \ --period 60 \ --evaluation-periods 3 \ --threshold 0 \ --comparison-operator LessThanOrEqualToThreshold \ --alarm-actions <scale-in-policy-arn> ```
**Fargate Spot interruption handling:** Spot tasks receive a SIGTERM 2 minutes before termination. Catch it in your application for graceful shutdown. For SQS consumers, call `ChangeMessageVisibility` on in-flight messages so they return to the queue rather than timing out.
### Auto Scaling
```bash # Register scalable target aws application-autoscaling register-scalable-target \ --service-namespace ecs \ --resource-id service/my-cluster/web-service \ --scalable-dimension ecs:service:DesiredCount \ --min-capacity 2 \ --max-capacity 10
# Target tracking policy aws application-autoscaling put-scaling-policy \ --service-namespace ecs \ --resource-id service/my-cluster/web-service \ --scalable-dimension ecs:service:DesiredCount \ --policy-name cpu-target-tracking \ --policy-type TargetTrackingScaling \ --target-tracking-scaling-policy-configuration '{ "TargetValue": 70.0, "PredefinedMetricSpecification": { "PredefinedMetricType": "ECSServiceAverageCPUUtilization" }, "ScaleOutCooldown": 60, "ScaleInCooldown": 120 }' ```
## CLI Reference
### Cluster Management
| Command | Description | |---------|-------------| | `aws ecs create-cluster` | Create cluster | | `aws ecs describe-clusters` | Get cluster details | | `aws ecs list-clusters` | List clusters | | `aws ecs delete-cluster` | Delete cluster |
### Task Definitions
| Command | Description | |---------|-------------| | `aws ecs register-task-definition` | Create task definition | | `aws ecs describe-task-definition` | Get task definition | | `aws ecs list-task-definitions` | List task definitions | | `aws ecs deregister-task-definition` | Deregister version |
### Services
| Command | Description | |---------|-------------| | `aws ecs create-service` | Create service | | `aws ecs update-service` | Update service | | `aws ecs describe-services` | Get service details | | `aws ecs delete-service` | Delete service |
### Tasks
| Command | Description | |---------|-------------| | `aws ecs run-task` | Run standalone task | | `aws ecs stop-task` | Stop running task | | `aws ecs describe-tasks` | Get task details | | `aws ecs list-tasks` | List tasks |
## Best Practices
### Security
- **Use task roles** for AWS API access (not access keys) - **Use execution roles** for ECR/Secrets access - **Store secrets in Secrets Manager** or Parameter Store - **Use private subnets** with NAT gateway - **Enable CloudTrail** for API auditing
### Performance
- **Right-size CPU/memory** — monitor and adjust - **Use Fargate Spot** for fault-tolerant workloads (70% savings) - **Enable container insights** for monitoring - **Use service discovery** for internal communication
### Reliability
- **Deploy across multiple AZs** - **Configure health checks** properly - **Set appropriate deregistration delay** - **Use circuit breaker** for deployments
```bash aws ecs update-service \ --cluster my-cluster \ --service web-service \ --deployment-configuration '{ "deploymentCircuitBreaker": { "enable": true, "rollback": true } }' ```
### Cost Optimization
- **Use Fargate Spot** for batch workloads - **Right-size task resources** - **Scale to zero** when not needed - **Use capacity providers** for mixed Fargate/Spot
## Troubleshooting
### Task Fails to Start
**Check:**
```bash # View stopped tasks aws ecs describe-tasks \ --cluster my-cluster \ --tasks $(aws ecs list-tasks --cluster my-cluster --desired-status STOPPED --query 'taskArns[0]' --output text) ```
**Common causes:** - Image not found (ECR permissions) - Secrets access denied - Network configuration (subnets, security groups) - Resource limits exceeded
### Container Keeps Restarting
**Debug:**
```bash # Check CloudWatch logs aws logs get-log-events \ --log-group-name /ecs/web-app \ --log-stream-name "ecs/web/abc123"
# Check task details aws ecs describe-tasks \ --cluster my-cluster \ --tasks task-arn \ --query 'tasks[0].containers[0].{reason:reason,exitCode:exitCode}' ```
**Causes:** - Health check failing - Application crashing - Out of memory
### Live Debugging with ECS Exec
Connect directly to a running container without SSH. Requires `enableExecuteCommand: true` on the service and the SSM agent in your container image (included in most base images).
```bash # Enable on existing service aws ecs update-service \ --cluster my-cluster \ --service web-service \ --enable-execute-command
# Get a shell in a running task TASK_ARN=$(aws ecs list-tasks --cluster my-cluster --service-name web-service \ --query 'taskArns[0]' --output text)
aws ecs execute-command \ --cluster my-cluster \ --task $TASK_ARN \ --container web \ --interactive \ --command "/bin/sh" ```
**Requirements:** Task role must have `ssmmessages:CreateControlChannel`, `ssmmessages:CreateDataChannel`, `ssmmessages:OpenControlChannel`, `ssmmessages:OpenDataChannel` permissions.
### Service Stuck Deploying
```bash # Check deployment status aws ecs describe-services \ --cluster my-cluster \ --services web-service \ --query 'services[0].deployments'
# Check events aws ecs describe-services \ --cluster my-cluster \ --services web-service \ --query 'services[0].events[:5]' ```
**Causes:** - Health check failing on new tasks - Not enough capacity - Target group health checks failing
### Cannot Pull Image from ECR
**Check execution role has:**
```json { "Effect": "Allow", "Action": [ "ecr:GetAuthorizationToken", "ecr:BatchCheckLayerAvailability", "ecr:GetDownloadUrlForLayer", "ecr:BatchGetImage" ], "Resource": "*" } ```
**Also check:** - VPC endpoint for ECR (if private su
Source provenance
Decision snapshot
1,150 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for ecs, ready for a manual X post.
ecs: AWS ECS container orchestration for running Docker containers. Use when deploying containeriz... 1.1K stars https://www.openagentskill.com/skills/itsmostafa-ecs?ref=x
Listing + install path for ecs: https://www.openagentskill.com/skills/itsmostafa-ecs?ref=x Install: npx skills add itsmostafa/aws-agent-skills --skill ecs
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to itsmostafa but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/itsmostafa-ecs?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/itsmostafa-ecs?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/itsmostafa-ecs/audit)
[](https://www.openagentskill.com/skills/itsmostafa-ecs?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)itsmostafa
@itsmostafa
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
UI-TARS Desktop
Run multimodal agents that operate desktop interfaces
37.0K Starsn8n
Connect agents to hundreds of workflow automations
194.1K StarsMoneyPrinterTurbo
利用AI大模型,一键生成高清短视频 Generate short videos with one click using AI LLM.
88.5K StarsTasmota
Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
24.7K StarsSandbox only
Install targets
Codex install prompt
Install the "ecs" agent skill from https://github.com/itsmostafa/aws-agent-skills/tree/main/skills/ecs. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: AWS ECS container orchestration for running Docker containers. Use when deploying containerized applications, configuring task definitions, setting up services, managing clusters, or troubleshooting container issues. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"itsmostafa-ecs","task":"Install ecs","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add itsmostafa/aws-agent-skills --skill ecs
Maintenance
fresh
5d since push
Risk
Needs review
Dependency or permission surface needs review
GitHub quality
1.1K
78/100 Quality · 68/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
1.1K GitHub stars
Repo activity
1.1K stars, 444 forks
Maintenance
5d since push
License
MIT
Install
npx skills add itsmostafa/aws-agent-skills --skill ecs
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add itsmostafa/aws-agent-skills --skill ecsDo not use when
Agent safety v2
This skill should not be selected by an agent without explicit human security review.
Do not auto-install. Inspect the source, dependencies, and permission surface first.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20ecs%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20ecs%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/itsmostafa-ecs/install
Agent should check
Copy prompt
Task: Use ecs in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20ecs%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/itsmostafa-ecs/install
Install command: npx skills add itsmostafa/aws-agent-skills --skill ecs
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/itsmostafa-ecs/install
LLM text format
/api/skills/itsmostafa-ecs/install?format=text
Find alternatives
/api/skills/search?q=ecs&limit=3
Agent prompt
Use ecs for this task. Review https://www.openagentskill.com/api/skills/itsmostafa-ecs/install, then install with: npx skills add itsmostafa/aws-agent-skills --skill ecsRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/itsmostafa-ecs
LLM text
/api/registry/manifest/itsmostafa-ecs?format=text
Install alias
/api/registry/install/itsmostafa-ecs
Recommend
/api/registry/recommend?task=Use%20ecs%20in%20an%20agent%20workflow&limit=3
Agent fit
Local desktop
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Local desktop
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
PASS1.1K GitHub stars
Stars/forks activity
PASS1.1K stars, 444 forks; issue activity unavailable in current metadata
Recent maintenance
PASS5d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Operate local tools
I need my agent to operate local files and desktop apps in a repeatable workflow.
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Reduce risk
I need my agent to scan a project for security risks and summarize what needs attention.
Workflow fit
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Turn skills into distribution
A workflow for turning newly indexed skills into SEO briefs, social drafts, comparison pages, and reusable publishing workflows.
Alternative shortlist
Similar skills that may fit this task.
Run multimodal agents that operate desktop interfaces
Connect agents to hundreds of workflow automations
利用AI大模型,一键生成高清短视频 Generate short videos with one click using AI LLM.
Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
--- name: ecs description: AWS ECS container orchestration for running Docker containers. Use when deploying containerized applications, configuring task definitions, setting up services, managing clusters, or troubleshooting container issues. last_updated: "2026-01-07" doc_source: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ ---
# AWS ECS
Amazon Elastic Container Service (ECS) is a fully managed container orchestration service. Run containers on AWS Fargate (serverless) or EC2 instances.
## Table of Contents
- [Core Concepts](#core-concepts) - [Common Patterns](#common-patterns) - [CLI Reference](#cli-reference) - [Best Practices](#best-practices) - [Troubleshooting](#troubleshooting) - [References](#references)
## Core Concepts
### Cluster
Logical grouping of tasks or services. Can contain Fargate tasks, EC2 instances, or both.
### Task Definition
Blueprint for your application. Defines containers, resources, networking, and IAM roles.
### Task
Running instance of a task definition. Can run standalone or as part of a service.
### Service
Maintains desired count of tasks. Handles deployments, load balancing, and auto scaling.
### Launch Types
| Type | Description | Use Case | |------|-------------|----------| | **Fargate** | Serverless, pay per task | Most workloads | | **EC2** | Self-managed instances | GPU, Windows, specific requirements |
## Common Patterns
### Create a Fargate Cluster
**AWS CLI:**
```bash # Create cluster aws ecs create-cluster --cluster-name my-cluster
# With capacity providers aws ecs create-cluster \ --cluster-name my-cluster \ --capacity-providers FARGATE FARGATE_SPOT \ --default-capacity-provider-strategy \ capacityProvider=FARGATE,weight=1 \ capacityProvider=FARGATE_SPOT,weight=1 ```
### Register Task Definition
```bash cat > task-definition.json << 'EOF' { "family": "web-app", "networkMode": "awsvpc", "requiresCompatibilities": ["FARGATE"], "cpu": "256", "memory": "512", "executionRoleArn": "arn:aws:iam::123456789012:role/ecsTaskExecutionRole", "taskRoleArn": "arn:aws:iam::123456789012:role/ecsTaskRole", "containerDefinitions": [ { "name": "web", "image": "123456789012.dkr.ecr.us-east-1.amazonaws.com/my-app:latest", "portMappings": [ { "containerPort": 8080, "protocol": "tcp" } ], "environment": [ {"name": "NODE_ENV", "value": "production"} ], "secrets": [ { "name": "DB_PASSWORD", "valueFrom": "arn:aws:secretsmanager:us-east-1:123456789012:secret:db-password" } ], "logConfiguration": { "logDriver": "awslogs", "options": { "awslogs-group": "/ecs/web-app", "awslogs-region": "us-east-1", "awslogs-stream-prefix": "ecs", "mode": "non-blocking", "max-buffer-size": "25m" } }, "healthCheck": { "command": ["CMD-SHELL", "curl -f http://localhost:8080/health || exit 1"], "interval": 30, "timeout": 5, "retries": 3, "startPeriod": 60 } } ] } EOF
aws ecs register-task-definition --cli-input-json file://task-definition.json ```
### Create Service with Load Balancer
```bash aws ecs create-service \ --cluster my-cluster \ --service-name web-service \ --task-definition web-app:1 \ --desired-count 2 \ --launch-type FARGATE \ --network-configuration "awsvpcConfiguration={ subnets=[subnet-12345678,subnet-87654321], securityGroups=[sg-12345678], assignPublicIp=DISABLED }" \ --load-balancers "targetGroupArn=arn:aws:elasticloadbalancing:us-east-1:123456789012:targetgroup/web-tg/1234567890123456,containerName=web,containerPort=8080" \ --health-check-grace-period-seconds 60 \ --deployment-configuration "deploymentCircuitBreaker={enable=true,rollback=true}" ```
### Run Standalone Task
```bash aws ecs run-task \ --cluster my-cluster \ --task-definition my-batch-job:1 \ --launch-type FARGATE \ --network-configuration "awsvpcConfiguration={ subnets=[subnet-12345678], securityGroups=[sg-12345678], assignPublicIp=ENABLED }" ```
### Update Service (Deploy New Image)
```bash # Register new task definition with updated image aws ecs register-task-definition --cli-input-json file://task-definition.json
# Update service to use new version aws ecs update-service \ --cluster my-cluster \ --service web-service \ --task-definition web-app:2 \ --force-new-deployment ```
### Fargate Spot with SQS-Based Scaling
Use `FARGATE_SPOT` for batch/queue workloads to cut costs ~70%. Always include a fallback to regular `FARGATE`.
```bash # Create service with Spot + fallback aws ecs create-service \ --cluster batch-cluster \ --service-name queue-processor \ --task-definition my-processor:1 \ --desired-count 0 \ --capacity-provider-strategy \ capacityProvider=FARGATE_SPOT,weight=4,base=0 \ capacityProvider=FARGATE,weight=1,base=1 \ --network-configuration "awsvpcConfiguration={ subnets=[subnet-12345678], securityGroups=[sg-12345678], assignPublicIp=DISABLED }"
# Register scalable target (scale to zero when queue empty) aws application-autoscaling register-scalable-target \ --service-namespace ecs \ --resource-id service/batch-cluster/queue-processor \ --scalable-dimension ecs:service:DesiredCount \ --min-capacity 0 \ --max-capacity 20
# Scale-out alarm: messages > 100 aws cloudwatch put-metric-alarm \ --alarm-name queue-scale-out \ --metric-name ApproximateNumberOfMessagesVisible \ --namespace AWS/SQS \ --dimensions Name=QueueName,Value=my-queue \ --statistic Average \ --period 60 \ --evaluation-periods 1 \ --threshold 100 \ --comparison-operator GreaterThanThreshold \ --alarm-actions <scale-out-policy-arn>
# Scale-in alarm: queue empty for 3 periods (conservative to avoid flapping) aws cloudwatch put-metric-alarm \ --alarm-name queue-scale-in \ --metric-name ApproximateNumberOfMessagesVisible \ --namespace AWS/SQS \ --dimensions Name=QueueName,Value=my-queue \ --statistic Average \ --period 60 \ --evaluation-periods 3 \ --threshold 0 \ --comparison-operator LessThanOrEqualToThreshold \ --alarm-actions <scale-in-policy-arn> ```
**Fargate Spot interruption handling:** Spot tasks receive a SIGTERM 2 minutes before termination. Catch it in your application for graceful shutdown. For SQS consumers, call `ChangeMessageVisibility` on in-flight messages so they return to the queue rather than timing out.
### Auto Scaling
```bash # Register scalable target aws application-autoscaling register-scalable-target \ --service-namespace ecs \ --resource-id service/my-cluster/web-service \ --scalable-dimension ecs:service:DesiredCount \ --min-capacity 2 \ --max-capacity 10
# Target tracking policy aws application-autoscaling put-scaling-policy \ --service-namespace ecs \ --resource-id service/my-cluster/web-service \ --scalable-dimension ecs:service:DesiredCount \ --policy-name cpu-target-tracking \ --policy-type TargetTrackingScaling \ --target-tracking-scaling-policy-configuration '{ "TargetValue": 70.0, "PredefinedMetricSpecification": { "PredefinedMetricType": "ECSServiceAverageCPUUtilization" }, "ScaleOutCooldown": 60, "ScaleInCooldown": 120 }' ```
## CLI Reference
### Cluster Management
| Command | Description | |---------|-------------| | `aws ecs create-cluster` | Create cluster | | `aws ecs describe-clusters` | Get cluster details | | `aws ecs list-clusters` | List clusters | | `aws ecs delete-cluster` | Delete cluster |
### Task Definitions
| Command | Description | |---------|-------------| | `aws ecs register-task-definition` | Create task definition | | `aws ecs describe-task-definition` | Get task definition | | `aws ecs list-task-definitions` | List task definitions | | `aws ecs deregister-task-definition` | Deregister version |
### Services
| Command | Description | |---------|-------------| | `aws ecs create-service` | Create service | | `aws ecs update-service` | Update service | | `aws ecs describe-services` | Get service details | | `aws ecs delete-service` | Delete service |
### Tasks
| Command | Description | |---------|-------------| | `aws ecs run-task` | Run standalone task | | `aws ecs stop-task` | Stop running task | | `aws ecs describe-tasks` | Get task details | | `aws ecs list-tasks` | List tasks |
## Best Practices
### Security
- **Use task roles** for AWS API access (not access keys) - **Use execution roles** for ECR/Secrets access - **Store secrets in Secrets Manager** or Parameter Store - **Use private subnets** with NAT gateway - **Enable CloudTrail** for API auditing
### Performance
- **Right-size CPU/memory** — monitor and adjust - **Use Fargate Spot** for fault-tolerant workloads (70% savings) - **Enable container insights** for monitoring - **Use service discovery** for internal communication
### Reliability
- **Deploy across multiple AZs** - **Configure health checks** properly - **Set appropriate deregistration delay** - **Use circuit breaker** for deployments
```bash aws ecs update-service \ --cluster my-cluster \ --service web-service \ --deployment-configuration '{ "deploymentCircuitBreaker": { "enable": true, "rollback": true } }' ```
### Cost Optimization
- **Use Fargate Spot** for batch workloads - **Right-size task resources** - **Scale to zero** when not needed - **Use capacity providers** for mixed Fargate/Spot
## Troubleshooting
### Task Fails to Start
**Check:**
```bash # View stopped tasks aws ecs describe-tasks \ --cluster my-cluster \ --tasks $(aws ecs list-tasks --cluster my-cluster --desired-status STOPPED --query 'taskArns[0]' --output text) ```
**Common causes:** - Image not found (ECR permissions) - Secrets access denied - Network configuration (subnets, security groups) - Resource limits exceeded
### Container Keeps Restarting
**Debug:**
```bash # Check CloudWatch logs aws logs get-log-events \ --log-group-name /ecs/web-app \ --log-stream-name "ecs/web/abc123"
# Check task details aws ecs describe-tasks \ --cluster my-cluster \ --tasks task-arn \ --query 'tasks[0].containers[0].{reason:reason,exitCode:exitCode}' ```
**Causes:** - Health check failing - Application crashing - Out of memory
### Live Debugging with ECS Exec
Connect directly to a running container without SSH. Requires `enableExecuteCommand: true` on the service and the SSM agent in your container image (included in most base images).
```bash # Enable on existing service aws ecs update-service \ --cluster my-cluster \ --service web-service \ --enable-execute-command
# Get a shell in a running task TASK_ARN=$(aws ecs list-tasks --cluster my-cluster --service-name web-service \ --query 'taskArns[0]' --output text)
aws ecs execute-command \ --cluster my-cluster \ --task $TASK_ARN \ --container web \ --interactive \ --command "/bin/sh" ```
**Requirements:** Task role must have `ssmmessages:CreateControlChannel`, `ssmmessages:CreateDataChannel`, `ssmmessages:OpenControlChannel`, `ssmmessages:OpenDataChannel` permissions.
### Service Stuck Deploying
```bash # Check deployment status aws ecs describe-services \ --cluster my-cluster \ --services web-service \ --query 'services[0].deployments'
# Check events aws ecs describe-services \ --cluster my-cluster \ --services web-service \ --query 'services[0].events[:5]' ```
**Causes:** - Health check failing on new tasks - Not enough capacity - Target group health checks failing
### Cannot Pull Image from ECR
**Check execution role has:**
```json { "Effect": "Allow", "Action": [ "ecr:GetAuthorizationToken", "ecr:BatchCheckLayerAvailability", "ecr:GetDownloadUrlForLayer", "ecr:BatchGetImage" ], "Resource": "*" } ```
**Also check:** - VPC endpoint for ECR (if private su
Source provenance
Decision snapshot
1,150 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for ecs, ready for a manual X post.
ecs: AWS ECS container orchestration for running Docker containers. Use when deploying containeriz... 1.1K stars https://www.openagentskill.com/skills/itsmostafa-ecs?ref=x
Listing + install path for ecs: https://www.openagentskill.com/skills/itsmostafa-ecs?ref=x Install: npx skills add itsmostafa/aws-agent-skills --skill ecs
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to itsmostafa but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/itsmostafa-ecs?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/itsmostafa-ecs?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/itsmostafa-ecs/audit)
[](https://www.openagentskill.com/skills/itsmostafa-ecs?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)itsmostafa
@itsmostafa
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
UI-TARS Desktop
Run multimodal agents that operate desktop interfaces
37.0K Starsn8n
Connect agents to hundreds of workflow automations
194.1K StarsMoneyPrinterTurbo
利用AI大模型,一键生成高清短视频 Generate short videos with one click using AI LLM.
88.5K StarsTasmota
Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
24.7K StarsPermission surface
secrets or environment access, shell or command execution
Agent outcomes
No agent outcome data yet
Docs
Usable metadata, review docs
Risk summary
Install readiness
Permission surface
secrets or environment access, shell or command execution
Agent outcomes
No agent outcome data yet
Docs
Usable metadata, review docs
Risk summary
Install readiness
Permission surface
secrets or environment access, shell or command execution
Agent outcomes
No agent outcome data yet
Docs
Usable metadata, review docs
Risk summary
Install readiness
Permission surface
secrets or environment access, shell or command execution
Agent outcomes
No agent outcome data yet
Docs
Usable metadata, review docs
Risk summary
Install readiness