I made ecs fargate and blue/green deployment on "old aws UI".
And tried to Enable Command Execution on vscode with aws toolkit.
But "[ERROR]: aws.ecs.enableEcsExec: InvalidParameterException: Cannot force a new deployment on services with a CODE_DEPLOY deployment controller. Use AWS CodeDeploy to trigger a new deployment. (statusCode: 400..)" error raised.
So I run this command on terminal.
aws ecs update-service \
--region ap-northeast-2 \
--cluster {} \
--task-definition {} \
--enable-execute-command \
--service {} \
--desired-count 1 \
--force-new-deployment
But An error occurred (InvalidParameterException) when calling the UpdateService operation: Unable to update task definition on services with a CODE_DEPLOY deployment controller. Use AWS CodeDeploy to trigger a new deployment. error raised.
I think Enable Command Execution on vscode works well with out blue/green deployment.
How to keep blue/green deployment and make to use open fargate terminal?
If I need to set some configurations on codedeploy, how to set?
Asked to chat GPT
In a Blue/Green deployment in AWS CodeDeploy, the deployment process revolves around creating a new set of resources (the green environment) and gradually shifting traffic to the new environment. This approach doesn't natively support executing commands directly on instances because CodeDeploy is focused on the deployment and traffic shift process.
The error is because of
--force-new-deployment
.--force-new-deployment
will do aROLLING
deployment which is not allowed in your setup since you set the deployment type toCODE_DEPLOY
.To
enable-execute-command
:Verify:
Then do a
CODE_DEPLOY
deployment since: