I’m creating my first app on AWS App Runner. I have a simple nginx Docker image that works locally by serving html on localhost:8080.
When I try to deploy it, the result is "Create Failed". Upon digging into the CloudWatch logs, I see that the health check failed. The health check is configured to ping the root of the service "/" at port 8080.
2
Answers
I was able to resolve this by deleting my App Runner app (this is currently the only way to change the configuration-- see this issue), then creating a new one and specifying the health check to ping port 80.
Are you getting this error:
If you are building on an M1 mac by chance? If so that’s probably the reason. The image that’s being built is of the ARM architecture, and App Runner or Fargate is an x86 runtime.
Aws is working on fixing this issue here: #1949
In the meantime, there’s a workaround, you can prefix copilot commands with the DOCKER_DEFAULT_PLATFORM=linux/amd64
For example:
So basically when you build your docker image just use:
You can use buildx (mobi) which suipport cli for platform.
Hope that helps, and sorry for the trouble 🙏