Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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 sca
.claude/skills/giuseppe-trisciuoglio-aws-cloudformation-task-ecs-deploy-gh/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 88% | 0% |
| case-22 | ✗→✓ | ▲ Improved | 75% | 0% |
| case-15 | ✓→✓ | = Same ✓ | 117% | 0% |
| case-16 | ✓→✓ | = Same ✓ | 76% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 127% | 0% |
Comprehensive skill for deploying ECS containers using GitHub Actions CI/CD pipelines with CloudFormation infrastructure management.
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.
Follow these steps to set up ECS deployment with GitHub Actions:
yamlname: Deploy to ECS on: push: branches: [main] jobs: deploy: runs-on: ubuntu-latest permissions: id-token: write contents: read steps: - uses: actions/checkout@v4 - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: arn:aws:iam::123456789012:role/github-actions-ecs-role aws-region: us-east-1 - name: Login to ECR uses: aws-actions/amazon-ecr-login@v2 - name: Build and push image env: ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} ECR_REPOSITORY: my-app IMAGE_TAG: ${{ github.sha }} run: | docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG - name: Verify image push run: | docker pull $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG echo "Image $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG verified" - name: Update task definition uses: aws-actions/amazon-ecs-render-task-definition@v1 id: render-task with: task-definition: task-definition.json container-name: my-app image: ${{ steps.login-ecr.outputs.registry }}/my-app:${{ github.sha }} - name: Validate task definition run: | # Validate JSON syntax cat ${{ steps.render-task.outputs.task-definition }} | jq empty && echo "Task definition JSON is valid" # Verify container image matches expected CONTAINER_IMAGE=$(cat ${{ steps.render-task.outputs.task-definition }} | jq -r '.containerDefinitions[0].image') EXPECTED_IMAGE="${{ steps.login-ecr.outputs.registry }}/my-app:${{ github.sha }}" if [ "$CONTAINER_IMAGE" = "$EXPECTED_IMAGE" ]; then echo "Container image matches expected: $CONTAINER_IMAGE" else echo "ERROR: Container image mismatch. Expected: $EXPECTED_IMAGE, Got: $CONTAINER_IMAGE" exit 1 fi - name: Deploy to ECS uses: aws-actions/amazon-ecs-deploy-task-definition@v1 with: task-definition: ${{ steps.render-task.outputs.task-definition }} service: my-service cluster: my-cluster wait-for-service-stability: true
See references/workflow-examples.md for complete workflow examples including multi-environment and blue/green deployments.
yamljobs: deploy: strategy: matrix: environment: [dev, staging, prod] steps: - uses: actions/checkout@v4 - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: arn:aws:iam::${{ matrix.env_account }}:role/github-actions-ecs-role aws-region: ${{ matrix.region }} - name: Deploy to ${{ matrix.environment }} run: | ECR_REGISTRY=${{ env.ECR_REGISTRY }} docker build -t $ECR_REGISTRY/my-app:${{ github.sha }} . docker push $ECR_REGISTRY/my-app:${{ github.sha }}
yaml- name: Deploy with CodeDeploy run: | aws deploy create-deployment \ --application-name my-app \ --deployment-group-name ${{ matrix.environment }} \ --deployment-config-name CodeDeployDefault ECSAllAtOnce \ --revision "{\"revisionType\":\"AppSpecContent\",\"appSpecContent\":{\"content\":\"$(cat appspec.yml)\",\"filename\":\"appspec.yml\"}}" aws deploy wait deployment-successful --deployment-id $(aws deploy list-deployments --application-name my-app --query 'deployments[0]' --output text)
See references/workflow-examples.md for additional patterns including ECR lifecycle policies, task definition templates, and CloudFormation stack updates.
See references/best-practices.md for detailed security, performance, and cost optimization guidelines.
id-token: write permissioncloudformation:UpdateStack permissionSee references/best-practices.md for complete troubleshooting guide with debug commands.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-15 | pass→pass | 16,819 | 19,537 | +16% | 1 | 1 | 0% | 2,771 | 6,003 | +117% | 0 | 0 | — |
case-01 | fail→pass | 15,084 | 17,561 | +16% | 1 | 1 | 0% | 3,132 | 5,894 | +88% | 0 | 0 | — |
case-16 | pass→pass | 13,639 | 9,378 | -31% | 1 | 1 | 0% | 2,385 | 4,186 | +76% | 0 | 0 | — |
case-02 | pass→pass | 9,074 | 7,135 | -21% | 1 | 1 | 0% | 1,709 | 3,884 | +127% | 0 | 0 | — |
case-03 | pass→pass | 11,993 | 13,510 | +13% | 1 | 1 | 0% | 2,251 | 4,904 | +118% | 0 | 0 | — |
case-04 | pass→pass | 23,867 | 11,942 | -50% | 1 | 1 | 0% | 2,938 | 4,841 | +65% | 0 | 0 | — |
case-05 | pass→pass | 4,500 | 4,567 | +1% | 1 | 1 | 0% | 789 | 3,212 | +307% | 0 | 0 | — |
case-17 | fail→fail | 13,989 | 12,205 | -13% | 1 | 1 | 0% | 2,659 | 4,629 | +74% | 0 | 0 | — |
case-06 | pass→pass | 8,323 | 7,119 | -14% | 1 | 1 | 0% | 1,509 | 3,874 | +157% | 0 | 0 | — |
case-07 | pass→pass | 9,214 | 6,841 | -26% | 1 | 1 | 0% | 1,676 | 3,878 | +131% | 0 | 0 | — |
case-08 | pass→pass | 12,797 | 19,132 | +50% | 1 | 1 | 0% | 2,450 | 5,113 | +109% | 0 | 0 | — |
case-09 | pass→pass | 12,778 | 8,588 | -33% | 1 | 1 | 0% | 2,357 | 4,050 | +72% | 0 | 0 | — |
case-10 | fail→fail | 7,369 | 6,979 | -5% | 1 | 1 | 0% | 1,372 | 3,541 | +158% | 0 | 0 | — |
case-11 | pass→pass | 13,368 | 10,305 | -23% | 1 | 1 | 0% | 2,555 | 4,382 | +72% | 0 | 0 | — |
case-12 | pass→pass | 12,894 | 6,989 | -46% | 1 | 1 | 0% | 2,432 | 3,811 | +57% | 0 | 0 | — |
case-13 | pass→pass | 17,354 | 16,298 | -6% | 1 | 1 | 0% | 2,975 | 5,223 | +76% | 0 | 0 | — |
case-14 | pass→pass | 18,449 | 14,065 | -24% | 1 | 1 | 0% | 2,937 | 4,585 | +56% | 0 | 0 | — |
case-18 | fail→fail | 19,891 | 20,203 | +2% | 1 | 1 | 0% | 3,214 | 5,926 | +84% | 0 | 0 | — |
case-19 | pass→pass | 7,529 | 5,467 | -27% | 1 | 1 | 0% | 1,190 | 3,361 | +182% | 0 | 0 | — |
case-20 | pass→pass | 14,162 | 9,946 | -30% | 1 | 1 | 0% | 2,374 | 4,089 | +72% | 0 | 0 | — |
case-21 | pass→pass | 6,439 | 2,046 | -68% | 1 | 1 | 0% | 974 | 2,682 | +175% | 0 | 0 | — |
case-22 | fail→pass | 12,289 | 5,982 | -51% | 1 | 1 | 0% | 2,004 | 3,516 | +75% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +9 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.