AWS App Runner - Failed to deploy your application image.

0

Hi, I am trying to create an app runner service using a public image created by me - public.ecr.aws/q2v5z2a5/ecr-tutorial.

Please see below the Dockerfile I used to create the image. This is a very basic nginx. I have some Frontend app code, but that is commented on because I wanted to narrow down the problem.

FROM public.ecr.aws/nginx/nginx:latest

# ARG publish=80:80
# COPY nginx/nginx.conf /etc/nginx/nginx.conf
# COPY nginx/default.conf etc/nginx/conf.d/default.conf

# COPY build /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

As you see, all the code is commented, except pulling the nginx latest image which is exposing port 80 and running the default nginx command. I even tried just pulling the image and doing nothing and even that is not working.

The same image in local is running using the below command - docker run -p 80:80 public.ecr.aws/q2v5z2a5/ecr-tutorial:latest

Also, If I used the Nginx image instead of my image to create the service, then it works - public.ecr.aws/nginx/nginx:latest

Thanks

Sumit
asked 8 months ago790 views
2 Answers
0

Can you check logs in App Runner?

Also check ECR access role if it has access to ECR?

profile picture
answered 8 months ago
  • Thanks for the reply. Logs from App Runner - 08-25-2023 02:42:15 PM [AppRunner] Deployment with ID : 76a31cde432443369545e50d919d76e9 failed. 08-25-2023 02:41:57 PM [AppRunner] Your application stopped or failed to start. See logs for more information. Container exit code: 1 08-25-2023 02:39:06 PM [AppRunner] Performing health check on port '80'. 08-25-2023 02:38:57 PM [AppRunner] Provisioning instances and deploying image for publicly accessible service. 08-25-2023 02:38:45 PM [AppRunner] Successfully copied the image from ECR. 08-25-2023 02:37:20 PM [AppRunner] Deployment Artifact :- Repo Type: ECR-Public; Image URL : public.ecr.aws/q2v5z2a5/ecr-tutorial; Image Tag : latest 08-25-2023 02:37:20 PM [AppRunner] Deployment with ID : 76a31cde432443369545e50d919d76e9 started. Triggering event : SERVICE_CREATE

    As you can see, it is successfully pulling the image from ECR. Also this image in public gallery - https://gallery.ecr.aws/q2v5z2a5/ecr-tutorial. Do we still need ECRAccessRole ?

0

any comments about it ?

Juan
answered 3 months 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.

Guidelines for Answering Questions