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.
'exec user process caused: exec format error' in AWS Fargate Service
I am totally new to AWS but I've been running my dockerized application locally for months now with no issues. Now that I am trying to deploy this app via AWS ECS/Fargate, my containers are stopped
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.



Comments
โฆ