Skip to content

Apprunner deployments failing and rolling back

0

For the last 4-7 days apprunner deployments have not been reliable. Builds succeed quickly. However, deployments sometimes work and sometimes fail and rollback. It seems very random and is very annoying. It completely disrupts workflow. What is going on? As I said, the builds succeed every time. This problem is new and has never occured for my account until last week. deployments fail

This is the common result in log files when the deployment fails and rollsback.

log file bits

Thanks, for any insight.

asked a year ago320 views

1 Answer
0

Based on your description, there are several potential reasons why your AWS App Runner deployments might be failing despite successful builds:

  1. 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.

  2. 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/amd64 when building your Docker image.

  3. 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.

  4. Environment differences: Your local environment might have dependencies or configurations that aren't present in the App Runner environment.

  5. 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

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.