Reputation: 78
I have an app currently running in ECS, and am attempting to upgrade it to use the Fargate launch type.
After updating my cloudformation template, and attempting to update the stack, I am getting an error that the service already exists.
Resource handler returned message: "Resource of type 'AWS::ECS::Service' with identifier 'redacted-app-name' already exists." (RequestToken: 50118296-f55c-11eb-a6e3-b31cdb2b43da, HandlerErrorCode: AlreadyExists)
I assume that by adding either the LaunchType
or NetworkConfiguration
keys to my service ECS thinks this is a different service.
Any ideas on how to best move forward without having to delete the ECS service or Cloudformation Stack? I am looking for a solution with minimal downtime.
Thanks!
Upvotes: 3
Views: 1481
Reputation: 238051
Sadly chancing LaunchType requires replacement of the services. So you will have downtime.
The only way around this is to do blue/green type of deployment, where you deploy new service in Fargate, and perform redirection of traffic through R53 from old service to new one.
Similarly, changes to ServiceName
require replacement.
Upvotes: 2