ECS: Error when using ECS service_name #27178
Labels
@aws-cdk/aws-ecs
Related to Amazon Elastic Container
closed-for-staleness
This issue was automatically closed because it hadn't received any attention in a while.
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Describe the bug
I'm using AWS CDK Python to create an ECS and i specified the cluster's service name. When i run the code in codepipeline first run works perfectly (as in fresh run, no cluster and no service ever created), it creates the cluster and the service using the correct name as it should. But when i re run the pipeline without any code change for the second time, i would get an error
Resource handler returned message: "Resource of type 'AWS::ECS::Service' with identifier 'dev-my-ecs-service' already exists." (RequestToken: 106a2ca3-6e6e-6715-8f20-0bb93b5ee61e, HandlerErrorCode: AlreadyExists)
Expected Behavior
i expect it would just leave it as is without trying to re-create the ecs cluster because there was no code change on the second run
Current Behavior
im guessing CDK thinks that there is no cluster with that name and that it should create a new one but when its trying to do so, there is already a service created using that name which was created on the previous run, im guessing so because the error message says
'dev-my-ecs-service' already exists.
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.51.0 (build a87259f)
Framework Version
No response
Node.js Version
16.18.0
OS
Windows
Language
Python
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: