Deploying a new application version to App Runner - AWS App Runner

Deploying a new application version to App Runner

When you create a service in AWS App Runner, you configure an application source—a container image or a source repository. App Runner provisions resources to run your service and deploys your application to them.

This topic describes ways to redeploy your application source to your App Runner service when a new version becomes available. This can be a new image version in the image repository or a new commit in the code repository. App Runner provides two methods to deploy to a service: automatic and manual.

Deployment methods

App Runner provides the following methods for you to control how application deployments are initiated.

Automatic deployment

Use automatic deployment when you want continuous integration and deployment (CICD) behavior for your service. App Runner monitors your image or code repository. Whenever you push a new image version to your image repository, or a new commit to your code repository, App Runner automatically deploys it to your service without further action on your side.

Manual deployment

Use manual deployment when you want to explicitly initiate each deployment to your service. You initiate a deployment if the repository that you configured for your service has a new version that you want to deploy. For more information, see Manual deployment.

You can configure the deployment method for your service in the following ways:

  • Console – For a new service you're creating or for an existing service, in the Deployment settings section of the Source and deployment configuration page, choose Manual or Automatic.

    
            App Runner deployment method configuration

Manual deployment

With manual deployment, you need to explicitly initiate each deployment to your service. When you have a new version of your application image or code ready to deploy, you can refer to the following sections to learn how to perform a deployment using the console and the API.

Deploy an application version using the App Runner console

To deploy using the App Runner console

  1. Open the App Runner console, and in the Regions list, select your AWS Region.

  2. In the navigation pane, choose Services, and then choose your App Runner service.

    The console displays the service dashboard with a Service overview.

  3. Choose Deploy.

    Result: Deployment of the new version starts. On the service dashboard page, the service Status changes to Operation in progress.

  4. Wait for the deployment to end. On the service dashboard page, the service Status should change back to Running.

  5. To verify that the deployment is successful, on the service dashboard page, choose the Default domain value—it's the URL to your service's website. Inspect or interact with your web application and verify your version change.

Deploy an application version using the App Runner API or AWS CLI

To deploy using the App Runner API or AWS CLI, call the StartDeployment API action. The only parameter to pass is your service ARN. You already configured your application source location when you created the service, and App Runner can find the new version. Your deployment starts if the call returns a successful response.