ecs_skill
- Python
976
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill itsmostafa/aws-agent-skills --skill ecs- SKILL.md9.2 KB
- task-definitions.md8.6 KB
Overview
This skill provides practical AWS ECS operations for deploying and managing Docker containers on Fargate or EC2. It guides you through creating clusters, registering task definitions, running tasks, and configuring services with load balancers and autoscaling. The content focuses on commands, patterns, and troubleshooting steps you can apply immediately.
How this skill works
The skill inspects and automates common ECS workflows: cluster creation, task definition registration, service creation and updates, standalone task runs, and autoscaling configuration. It includes concrete AWS CLI examples and diagnostic commands to inspect stopped tasks, logs, deployments, and service events. Use the patterns to deploy applications, update images, and resolve common failures quickly.
When to use it
- Deploy containerized applications to AWS using ECS (Fargate or EC2).
- Define and register task definitions with containers, environment variables, secrets, and logging.
- Create or update services with load balancers and health checks.
- Run batch or one-off jobs as standalone tasks.
- Troubleshoot tasks that fail to start, containers that keep restarting, or services stuck deploying.
Best practices
- Use IAM task roles for application permissions and execution roles for ECR and secrets access.
- Store sensitive values in Secrets Manager or Parameter Store; avoid embedding secrets in images.
- Right-size CPU and memory per task and enable container insights for monitoring.
- Deploy across multiple Availability Zones and configure health checks and deregistration delays.
- Use capacity providers and Fargate Spot for cost optimization and scalable capacity.
Example use cases
- Create a Fargate cluster and register a web-app task definition with awslogs logging and health checks.
- Deploy a two-task web service behind an ALB target group and enable a deployment circuit breaker for safer rollbacks.
- Run a batch job as a standalone Fargate task with a private subnet and assignPublicIp as needed.
- Update a service by registering a new task definition with an updated image and force a new deployment.
- Configure target-tracking autoscaling for an ECS service based on average CPU utilization.
FAQ
Common causes include missing image permissions, execution role not allowing ECR access, secrets access denied, wrong network configuration, or resource limits exceeded. Check stopped task details and CloudWatch logs for exact failure reasons.
How do I update a service to use a new container image?
Register a new task definition revision with the updated image, then call update-service with the new taskDefinition and --force-new-deployment to trigger a rolling deployment.