- Newest
- Most votes
- Most comments
Based on the information provided, it appears that your App Runner service is failing to start properly. The error message "[AppRunner] Your application stopped or failed to start. See logs for more information. Container exit code: 1" indicates that there's an issue with your application's startup process.
Here are a few things to consider:
-
Port Configuration: Ensure that your application is listening on the correct port. App Runner by default expects your application to listen on port 8080. Your Dockerfile exposes port 8080, which is correct, but make sure your Go application is actually listening on this port.
-
Start Command: App Runner uses the ENTRYPOINT specified in your Dockerfile to start the application. Make sure that "./revise-payments-api" is the correct command to start your application and that it's located in the right directory.
-
Environment Variables: If your application requires specific environment variables to run, make sure these are properly set in your App Runner service configuration.
-
Logs: The error message suggests checking the logs for more information. Review the App Runner logs thoroughly as they might provide more specific details about why the application is failing to start.
-
Health Check: Your health check configuration appears to be using the HTTP protocol, which is correct for most web applications. However, ensure that your application has a health check endpoint that responds correctly.
-
Image Build: While your image runs perfectly locally, there could be differences in the environment when running on App Runner. Double-check that all necessary files (especially the "default.properties" file) are included in the image and in the correct locations.
-
Permissions: Ensure that your application has the necessary permissions to run and access any required resources.
To troubleshoot further:
- Try running your container locally with the same configuration as App Runner (e.g., environment variables, start command).
- Implement more detailed logging in your application to capture any startup errors.
- Consider adding a simple health check endpoint to your application if you haven't already.
- Review the App Runner service logs carefully for any specific error messages or stack traces.
If the issue persists, you may need to add more detailed error handling and logging in your Go application to pinpoint the exact cause of the failure.
Sources
App Runner architecture and concepts - AWS App Runner
ImageConfiguration - AWS App Runner
AWS App Runner improves performance for image-based deployments | Containers
answered 2 years ago
Relevant content
asked 3 years ago
asked 2 years ago

I run the container locally, here are the logs running correctly
Also, I tried changing the health check to HTTP and to no avail.