Skip to content

Support ECS deploy with CodeDeploy #168

Closed
@antonbabenko

Description

@antonbabenko

Great project!

Unfortunately, it does not work for my use case where I want to use it for blue-green deployments via CodeDeploy with ECS services (as described here).

The error is like this:

/usr/local/bin/aws --output json ecs --region eu-central-1 update-service --cluster staging --service backend --task-definition arn:aws:ecs:eu-central-1:633306250246:task-definition/backend:4

An error occurred (InvalidParameterException) when calling the UpdateService operation: Unable to update task definition on services with a CODE_DEPLOY deployment controller. Please use Code Deploy to trigger a new deployment.

The question is, whether it is possible and easily to extend this script to work for me or should I make my own script just for this?

Instead of aws ecs update-service the script should call aws ecs deploy like this:

aws ecs deploy \
          --cluster "$cluster" \
          --service "$service" \
          --task-definition "$TASK_DEF_FILENAME" \
          --codedeploy-appspec "$APPSPEC_FILENAME" \
          --codedeploy-application "$service" \
          --codedeploy-deployment-group "$service"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions