Search code examples
dockerdevopsamazon-ecsamazon-ecr

How to update an ECS service with latest docker image in ECR without changing public DNS address?


I have to update my ECS service with latest docker image deployed on ECR and without changing the public address. I tried to modify the service via the user interface by selecting force new deployment option which generates a new task with a new IP public address and it's not very practical. Is there another approach or solution ?

Thank you


Solution

  • ECS- Updating the service will change the IP address (right now this cannot be handled). what you can do is - place an application load balancer and have path based routing ( basically you can set the target groups).

    So now once you have the target group configured you can directly access the service via load balancer DNS name else updating the service will change the IP address and every time you have to check the IP.