Issue: AWS CodeBuild Fails to Push Docker Image to ECR Due to Immutable Repository

Sam 0 Reputation points
2025-02-22T12:17:47.4933333+00:00

Hi,

Our AWS CodeBuild pipeline fails during the docker push step when trying to push an image to Amazon Elastic Container Registry (ECR). The error indicates that the ECR repository is immutable, preventing the latest tag from being updated.

nvironment Details

  • AWS Service: CodeBuild, ECR, ECS
  • ECR Repository: Immutable Image Tags enabled
  • Docker Push Command:

Expected Solution

How should we handle deployments when ECR is immutable but ECS expects latest?

What is the best practice for ECS service updates without using latest?

Can AWS CodeBuild/ECS automatically pick up the newest image without tagging it as latest?

.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,196 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.