giuseppe-trisciuoglio/developer-kit/aws-cloudformation-task-ecs-deploy-gh
Claude Code and agent skill by giuseppe-trisciuoglio/developer-kit
- community
Checking that the SKILL.md file is still in the repository.
Provides patterns to deploy ECS tasks and services with GitHub Actions CI/CD. Use when building Docker images, pushing to ECR, updating ECS task definitions, deploying ECS services, integrating with CloudFormation stacks, configuring AWS OIDC authentication for GitHub Actions, and implementing production-ready container deployment pipelines. Supports ECS deployments with proper security (OIDC or IAM keys), multi-environment support, blue/green deployments, ECR private repositories with image scanning, and CloudFormation infrastructure updates.
Install
npx vskill@latest install giuseppe-trisciuoglio/developer-kit/aws-cloudformation-task-ecs-deploy-ghSKILL.md
The same SKILL.md was published earlier as giuseppe-trisciuoglio/developer-kit/aws-cloudformation-task-ecs-deploy-gh.
AWS CloudFormation Task ECS Deploy with GitHub Actions
Comprehensive skill for deploying ECS containers using GitHub Actions CI/CD pipelines with CloudFormation infrastructure management.
Overview
Deploy containerized applications to Amazon ECS using GitHub Actions workflows. This skill covers the complete deployment pipeline: authentication with AWS (OIDC recommended), building Docker images, pushing to Amazon ECR, updating task definitions, and deploying ECS services. Integrate with CloudFormation for infrastructure-as-code management and implement production-grade deployment strategies.
When to Use
- Deploying Docker containers to Amazon ECS with GitHub Actions
- Setting up CI/CD pipelines for ECS using CloudFormation
- Configuring AWS OIDC authentication for GitHub Actions
- Building Docker images and pushing to Amazon ECR
- Updating ECS task definitions dynamically in CI/CD
- Implementing blue/green or rolling deployments for ECS
- Managing CloudFormation stacks from GitHub Actions
Instructions
Follow these steps to set up ECS deployment with GitHub Actions:
- Configure AWS Authentication: Set up OIDC provider for GitHub Actions
- Create IAM Roles: Define roles for deployment actions
- Set Up ECR Repository: Create repository with image scanning
- Create ECS Cluster: Define cluster infrastructure
- Configure Task Definition: Set up task and container definitions
- Set Up ECS Service: Configure service with deployment strategy
- Create GitHub Workflow: Define CI/CD pipeline steps
- Configure Secrets: Store credentials securely in GitHub Secrets
Quick Start
Basic Deployment Workflow
See references/workflow-examples.md for complete workflow examples including multi-environment and blue/green deployments.
Examples
Multi-Environment Deployment
Blue/Green Deployment with CodeDeploy
See references/workflow-examples.md for additional patterns including ECR lifecycle policies, task definition templates, and CloudFormation stack updates.
Best Practices
Security
- Use OIDC authentication instead of long-lived IAM keys
- Implement least privilege IAM roles with specific permissions
- Enable ECR image scanning on push
- Use AWS Secrets Manager for sensitive data
- Encrypt ECR repositories with KMS
- VPC endpoints for ECR and ECS without internet gateway
- Security groups restrict access to minimum required
Performance
- Docker layer caching with GitHub Actions cache
- Multi-stage builds to minimize image size
- Parallel deployments across multiple environments
- Fargate Spot for cost savings on non-critical workloads
- CloudWatch Logs with appropriate retention policies
Cost Optimization
- ECR lifecycle policies to clean up old images
- Fargate Spot instances for development/testing
- Right-sized task CPU and memory
- Auto-scaling based on metrics
- Scheduled scaling for predictable traffic patterns
See references/best-practices.md for detailed security, performance, and cost optimization guidelines.
Common Troubleshooting
Authentication Failures
- Verify OIDC trust relationship matches GitHub organization/repository
- Check IAM role has proper permissions for ECR and ECS
- Ensure GitHub Actions repository has
id-token: writepermission
Deployment Failures
- Check CloudWatch Logs for application errors
- Verify task definition matches service requirements
- Ensure sufficient CPU/memory in Fargate cluster
- Review health check configuration
ECR Push Failures
- Verify repository exists and permissions are correct
- Check image tag format and registry URL
- Ensure Docker daemon is running in GitHub Actions runner
- Verify image size doesn't exceed ECR limits
CloudFormation Rollback
- Review stack events in AWS Console
- Check parameter values match resource constraints
- Verify IAM role has
cloudformation:UpdateStackpermission - Enable termination protection for production stacks
See references/best-practices.md for complete troubleshooting guide with debug commands.
Related Skills
- aws-cloudformation-ecs - Design and implement ECS cluster architecture
- aws-cloudformation-lambda - Deploy Lambda functions with GitHub Actions
- aws-cloudformation-security - Security best practices for ECS deployments
References
Complete Examples
- [references/workflow-examples.md](references/workflow-examples.md) - Complete GitHub Actions workflows including basic deployment, multi-environment, blue/green, and CI/CD pipelines
Configuration
- [references/authentication.md](references/authentication.md) - OIDC provider setup, IAM roles, cross-account deployment, environment-specific roles
- [references/ecr-and-task-definitions.md](references/ecr-and-task-definitions.md) - ECR repository configuration, task definition management, multi-container setups
- [references/deployment-strategies.md](references/deployment-strategies.md) - Rolling and blue/green deployments, CloudFormation templates, stack updates
Best Practices
- [references/best-practices.md](references/best-practices.md) - Security guidelines, performance optimization, cost optimization, monitoring, and complete troubleshooting guide
Constraints and Warnings
Resource Limits
- GitHub Actions Limits: Usage limits per account (minutes, storage)
- Workflow File Size: Cannot exceed 1 MB
- Job Matrix Limits: Limits on total matrix combinations
- Artifact Retention: Default 90-day retention
Authentication Constraints
- OIDC Tokens: Limited lifetime (typically 5 minutes)
- Role Session Duration: Maximum 12 hours
- Permission Scope: Least-privilege permissions required
- Cross-Account Access: Requires appropriate trust relationships
Operational Constraints
- Deployment Speed: CloudFormation deployments may take time
- Stack Locking: Cannot update while another deployment is in progress
- ECR Rate Limits: API rate limits may affect large deployments
- ECS Service Limits: Limits on tasks per service and services per cluster
Security Constraints
- Secret Management: Never store secrets in repository or workflow files
- OIDC Provider: Must be configured in AWS account before first use
- Repository Access: Workflow secrets are scoped to repository
- Token Security: Minimum required permissions only (contents: read, id-token: write)
Cost Considerations
- GitHub Actions: Minutes beyond free tier incur costs
- ECR Storage: Monthly storage costs for container images
- ECS/Fargate: Costs for vCPU and memory resources
- Data Transfer: Costs for data transfer between GitHub and AWS
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/developer-kit-aws/skills/aws-cloudformation/aws-cloudformation-task-ecs-deploy-gh/SKILL.md
Popularity
- Repository stars
- 298
- Repository forks
- 35
- 7-day trend score
- 29
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/giuseppe-trisciuoglio/developer-kit/aws-cloudformation-task-ecs-deploy-gh)