When using ECR as the source in AWS App Runner, the following Health check on port “XXXX” error occurred.

03-20-2022 07:18:52 AM [AppRunner] Health check on port '3000' failed. Service is rolling back. Check your configured port number. For more information, read the application logs.

Regarding the above, I checked the “Application logs” as follows.

The following was output.

exec user process caused: exec format error

Regarding the above, I found the following Stack Overflow post.

https://stackoverflow.com/questions/67361936/exec-user-process-caused-exec-format-error-in-aws-fargate-service

Among the answers, the following was suggested.

docker buildx build --platform=linux/amd64 -t <image-name> .

After trying this, I was able to deploy successfully.

I hope this serves as a useful reference for those experiencing similar issues.