- Newest
- Most votes
- Most comments
I apologize for the difficulties you're experiencing with AWS App Runner. Based on the information you've provided, it seems that the main issue is related to the health check failing, which is preventing your application from deploying successfully. Let's address some potential causes and solutions:
-
Port Configuration: Ensure that your application is actually listening on port 8080. In your server.py file, make sure you're binding to the correct port. For example:
app.run(host='0.0.0.0', port=int(os.environ.get('PORT', 8080))) -
Start Command: Verify that your start command is correct. In the App Runner configuration, ensure it's set to
python server.py. -
Environment Variables: Make sure the PORT environment variable is set correctly in your App Runner service configuration.
-
Dependencies: Double-check your requirements.txt file to ensure all necessary dependencies are listed.
-
Application Errors: Your application might be crashing on startup. Try adding some print statements or logging in your server.py file to help diagnose any potential issues.
-
Runtime Version: While you've tried both Python 3 and Python 3.11, ensure you're using a compatible version for all your dependencies.
-
Permissions: As an IAM user in the Administrators group, you should have sufficient permissions. However, verify that App Runner has the necessary permissions to access your GitHub repository and deploy the application.
-
Timeout: The health check might be failing if your application takes too long to start. You could try increasing the health check timeout in your App Runner configuration if this is the case.
Regarding the warning about Web ACLs, this is likely due to the failed deployment and shouldn't be the root cause of your issue.
For the lack of [Run] entries in the logs, this is expected if the deployment fails before reaching the run stage.
To troubleshoot further:
- Add more logging to your application to see if it's starting up correctly.
- Try deploying a simpler application (e.g., a basic "Hello World" Flask app) to isolate whether the issue is with your specific application or the App Runner configuration.
- Check if there are any resource constraints (e.g., memory limits) that might be causing the application to fail silently.
If these steps don't resolve the issue, it may be worth reaching out to AWS support for further assistance, as they can look into account-specific details that might be causing the problem.
Sources
Getting started with App Runner - AWS App Runner
App Runner configuration file reference - AWS App Runner
App Runner configuration file examples - AWS App Runner
answered 2 years ago
Relevant content
asked a year ago
asked 4 years ago
- AWS OFFICIALUpdated 4 years ago
- AWS OFFICIALUpdated 2 years ago
