Deploying applications to Elastic Beanstalk environments - AWS Elastic Beanstalk

Deploying applications to Elastic Beanstalk environments

You can use the AWS Elastic Beanstalk console to upload an updated source bundle and deploy it to your Elastic Beanstalk environment, or redeploy a previously uploaded version.

Deploying a new version of your application to an environment is typically a fairly quick process. The new source bundle is deployed to an instance and extracted. Then the web container or application server picks up the new version and, if necessary, restarts. During deployment, your application might still become unavailable to users for a few seconds. You can prevent this by configuring your environment to use rolling deployments to deploy the new version to instances in batches.

Each deployment is identified by a deployment ID. Deployment IDs start at 1 and increment by one with each deployment and instance configuration change. If you enable enhanced health reporting, Elastic Beanstalk displays the deployment ID in both the health console and the EB CLI when it reports instance health status. The deployment ID helps you determine the state of your environment when a rolling update fails.

To ensure that your application source is always deployed to new instances, instead of updating existing instances, you can configure your environment to use immutable updates for deployments. In an immutable update, a second Auto Scaling group is launched in your environment and the new version serves traffic alongside the old version until the new instances pass health checks.


During managed platform updates with instance replacement enabled, immutable updates, and deployments with immutable updates enabled all instances are replaced. This causes all accumulated Amazon EC2 Burst Balances to be lost.

Supported Deployment Policies
Deployment policy Load balanced environments Single-instance environments Legacy Windows server environments†

All at Once


Rolling with an Additional Batch


† For the purpose of this table, a Legacy Windows Server Environment is an environment based on a Windows Server platform configuration that use an IIS version earlier than IIS 8.5.

To configure deployments

  1. Open the Elastic Beanstalk console.

  2. Navigate to the management page for your environment.

  3. Choose Configuration.

  4. In the Rolling updates and deployments configuration category, choose Modify.

  5. In the Application Deployments section, choose a Deployment policy and batch settings.

  6. Choose Apply.

For deployments that depend on resource configuration changes or a new version that can't run alongside the old version, you can launch a new environment with the new version and perform a CNAME swap for a blue/green deployment.

The following table compares deployment methods.

Deployment Methods
Method Impact of failed deployment Deploy time Zero downtime No DNS change Rollback process Code deployed to
All at once Downtime Manual Redeploy Existing instances
Rolling Single batch out of service; any successful batches before failure running new application version Manual Redeploy Existing instances
Rolling with additional batch Minimal if first batch fails; otherwise, similar to Rolling Manual Redeploy New and existing instances
Immutable Minimal Terminate New Instances New instances
Blue/green Minimal Swap URL New instances

Varies depending on batch size.

If you deploy often, consider using the Elastic Beanstalk Command Line Interface (EB CLI) to manage your environments. The EB CLI creates a repository alongside your source code and can create a source bundle, upload it to Elastic Beanstalk, and deploy it with a single command.

Deploying a new application version

You can perform deployments from your environment's dashboard.

To deploy a new application version to an Elastic Beanstalk environment

  1. Open the Elastic Beanstalk console.

  2. Navigate to the management page for your environment.

  3. Choose Upload and Deploy.

  4. Use the on-screen form to upload the application source bundle.

  5. Choose Deploy.

Redeploying a previous version

You can also deploy a previously uploaded version of your application to any of its environments from the application versions page.

To deploy an existing application version to an existing environment

  1. Open the Elastic Beanstalk console.

  2. Choose Actions next to the application name, and then choose View application versions.

  3. Use the on-screen form to select the application version to deploy.

  4. Choose an environment, and then choose Deploy.