aws / aws/aws-toolkit-vscode

ECS: enable execute command with CodeDeploy blue/green deployment

Open
#4,017 2 comments 0 reactions 0 assignees View on GitHub
blocked feature-request guidance remote-execute service:ecs
Dominant language
TypeScript
Stars
2k
Forks
807
Avg merge
10h 12m
Merged PRs (30d)
7

Description

## System details (run the `AWS: About Toolkit` command)

- OS: mac 13
- Visual Studio Code version: 1.84.1
- AWS Toolkit version: v1.97.0

## Question
Hello

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.

```bash
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.

Contributor guide

Open the contributing guide

Research direction

Start at the AWS Toolkit's aws.ecs.enableEcsExec command and reproduce the reported error with an ECS Fargate service using a CodeDeploy blue/green deployment controller. Compare the Toolkit operation with the provided aws ecs update-service command and review the CodeDeploy configuration involved. Done means establishing whether execute command can be enabled without an unsupported forced deployment, and documenting the supported configuration or limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.