- Newest
- Most votes
- Most comments
Based on your description, there are several potential reasons why your AWS App Runner deployments might be failing despite successful builds:
-
Health check failures: App Runner performs health checks on your application, and if these fail, the deployment will roll back. This could happen if your application isn't properly responding on the expected port or health check path.
-
Platform compatibility issues: If you're developing on a different architecture (like an M1/M3 Mac) than what App Runner uses (typically x86), you might need to specify the platform in your Docker build. Try using
--platform=linux/amd64when building your Docker image. -
Application startup time: If your application takes longer to start than the health check timeout allows, deployments may fail. Consider adjusting the health check timeout and interval settings.
-
Environment differences: Your local environment might have dependencies or configurations that aren't present in the App Runner environment.
-
Port configuration mismatch: Ensure that the port your application is listening on matches the port specified in your App Runner configuration. App Runner typically expects applications to listen on port 8080 by default.
Since this is a new issue that started recently, it could also be related to:
- Recent changes in your application code or dependencies
- Changes in your App Runner configuration
- Potential service issues with App Runner in your region
To troubleshoot, check your application logs in App Runner for any startup errors, verify your health check settings, and consider deploying a simple application that just returns a basic HTTP response to isolate whether the problem is with your application or the App Runner configuration.
Sources
Why has Aws Runner failed to deploy the image even though it is working fine my local machine and everything configured properly | AWS re:Post
App Runner - Failed to deploy your application image | AWS re:Post
[DL.ADS.2] Implement automatic rollbacks for failed deployments - DevOps Guidance
answered a year ago
Relevant content
asked 3 years ago
asked 3 years ago
asked 3 years ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated a year ago
