Skip to content

App runner auto deployment problem with ECR image tag

0

I upload image to private ECR with tag "latest", I setup app runner with auto deploy. App run smoothly, then I modified code and create new image with tag "v2". But when I pushed image to ECR, App Runner do not automatic deploy the app. I tried to tag the v2 image with "latest" and again push to ECR. Now the image has the tag "v2, latest". But then App Runner start to deploy the new version. This mean App Runner only run auto deploy base on tag has string "latest" ?

asked a year ago485 views
1 Answer
1
Accepted Answer

Your observation about AWS App Runner's auto-deployment behavior with ECR images is correct, but there are some important details to clarify.

App Runner does support automatic deployment, but it has specific limitations when it comes to ECR images. The auto-deployment feature works differently depending on the source of your application.

For ECR images, App Runner's automatic deployment is indeed tied to the "latest" tag. When you push a new image with the "latest" tag to your ECR repository, App Runner detects this change and initiates an automatic deployment. This is why you saw the deployment start only after you tagged your new image as "latest".

However, it's important to note that App Runner doesn't support automatic deployment for all types of ECR repositories. Specifically, automatic deployment is not supported for Amazon ECR Public images, or for images in an Amazon ECR repository that belongs to a different AWS account than the one your App Runner service is in.

For best practices and more reliable deployments, it's recommended to use explicit version tags for your images rather than relying solely on the "latest" tag. You can then manually trigger deployments when you want to update your application, which gives you more control over when changes are applied.

If you need more flexible automatic deployment options, you might consider using source code deployment instead of container images, as App Runner offers more comprehensive CI/CD capabilities for source code repositories.
Sources
Deploying a new application version to App Runner - AWS App Runner
SourceConfiguration - AWS App Runner
App Runner architecture and concepts - AWS App Runner

answered a year ago
EXPERT
reviewed a year ago
EXPERT
reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.