Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't change defaultCloudMapNamespace on the cluster #121

Open
Ismael opened this issue Apr 14, 2023 · 8 comments
Open

Can't change defaultCloudMapNamespace on the cluster #121

Ismael opened this issue Apr 14, 2023 · 8 comments

Comments

@Ismael
Copy link

Ismael commented Apr 14, 2023

While changing the ECS defaultCloudMapNamespace, a deployment causes this error:

Resource handler returned message: "Invalid request provided: UpdateService error: Unable to update task definition on services with a CODE_DEPLOY deployment controller. Use AWS CodeDeploy to trigger a new deployment. (Service: AmazonECS; Status Code: 400; Error Code: InvalidParameterException

Is there any way to force the deployment using this construct? Or any other way around?

@cplee
Copy link
Contributor

cplee commented Apr 14, 2023

Can you share a snippet of code where you used the construct?

@Ismael
Copy link
Author

Ismael commented Apr 17, 2023

I built an app to show the issue. It seems I was mistaken on the source of the issue, it triggers the error when adding cloudMapOptions to an Ec2Service, line 140 at ecstest-stack.ts .

Clone the code from: https://github.com/Ismael/cdkecstest , edit bin/ecstest.ts with your vpc and ecs codedeploy role. Deploy once, then uncomment after line 140 and deploy. This should trigger the error.

@cplee
Copy link
Contributor

cplee commented Apr 18, 2023

Does it only fail if you deploy first without cloudmap and then update stack to add cloudmap?

@Ismael
Copy link
Author

Ismael commented Apr 18, 2023

Yes.

@cplee
Copy link
Contributor

cplee commented Apr 19, 2023

Thanks for the sample code. Unfortunately, this is a limitation with configuring ECS Services to use CODE_DEPLOY for the deployment controller. See: aws/aws-cdk#23564

@Ismael
Copy link
Author

Ismael commented Apr 19, 2023

Is there any workaround? I don't know enough about the internals, but maybe using cdk to create only the task definition and using EcsDeployment to actually trigger it?

@cplee
Copy link
Contributor

cplee commented Apr 25, 2023

No, not that I'm aware of.

@tmokmss
Copy link

tmokmss commented Apr 2, 2024

I found the upstream issue was recently closed as shipped: aws-cloudformation/cloudformation-coverage-roadmap#1529
Is this issue still relevant?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants