AWS Elastic Beanstalk Deployment Strategies
- Elastic Beanstalk supports environments such as
- Single Instance environments, with a single instance and Auto Scaling to maintain the minimum/maximum 1 instance
- Load Balanced environments, with load balancing and Auto Scaling
- Elastic Beanstalk allows multiple deployment options or strategies that can be selected depending upon the requirements for deployment time, downtime, DNS change, and rollback process.
- Elastic Beanstalk supports the following deployment policies: All at once, Rolling, Rolling with additional batch, Immutable, and Traffic splitting.
⚠️ Platform Migration Notice: Amazon Linux 2 EOL – June 30, 2026
All Elastic Beanstalk platform branches based on Amazon Linux 2 (AL2) will be retired by June 30, 2026, when AL2 reaches End of Life. After this date, AWS will not release security updates, patches, or new packages for AL2-based platforms.
Action Required: Migrate your environments to Amazon Linux 2023 (AL2023) platform branches before the retirement date. Use deployment strategies like Blue/Green or Immutable deployments to safely migrate with minimal downtime.
Refer to: Migration from Amazon Linux 2 to Amazon Linux 2023
Elastic Beanstalk Deployment Methods

Deployment Methods Comparison
| Method | Impact of Failed Deployment | Deploy Time | Zero Downtime | No DNS Change | Rollback Process | Code Deployed To |
|---|---|---|---|---|---|---|
| All at once | Downtime | Fastest | No | Yes | Manual redeploy | Existing instances |
| Rolling | Single batch out of service; successful batches run new version | Moderate † | Yes | Yes | Manual redeploy | Existing instances |
| Rolling with additional batch | Minimal if first batch fails; otherwise similar to Rolling | Slower † | Yes | Yes | Manual redeploy | New and existing instances |
| Immutable | Minimal | Slowest | Yes | Yes | Terminate new instances | New instances |
| Traffic splitting | Percentage of traffic temporarily impacted | Slowest †† | Yes | Yes | Reroute traffic and terminate new instances | New instances |
| Blue/Green | Minimal | Slowest | Yes | No | Swap URL | New instances |
† Varies depending on batch size. †† Varies depending on evaluation time setting.
Deployment Policy Support by Environment Type
| Deployment Policy | Load-Balanced Environments | Single-Instance Environments |
|---|---|---|
| All at once | Yes | Yes |
| Rolling | Yes | No |
| Rolling with additional batch | Yes | No |
| Immutable | Yes | Yes |
| Traffic splitting | Yes (ALB only) | No |
All at Once Deployments
- Elastic Beanstalk environment uses all-at-once deployments if it is created with a different client (API, SDK, or AWS CLI).
- All at Once deployments perform an in-place deployment on all instances at the same time.
- All at Once deployments are simple and fast, however, it would lead to downtime and the rollback would take time in case of any issues.
- Suitable if you can accept a short loss of service and if quick deployments are important.
- Rollback requires a manual redeploy of the previous version.
Rolling Deployments
- Elastic Beanstalk environment uses rolling deployments if it is created with console or EB CLI.
- Elastic Beanstalk splits the environment’s EC2 instances into batches and deploys the new version of the application on the existing instance one batch at a time, leaving the rest of the instances in the environment running the old version.
- During a rolling deployment, part of the instances serves requests with the old version of the application, while instances in completed batches serve other requests with the new version.
- Avoids downtime and minimizes reduced availability, at a cost of a longer deployment time.
- Elastic Beanstalk performs the rolling deployments as
- When processing a batch, detaches all instances in the batch from the load balancer, deploys the new application version, and then reattaches the instances.
- To avoid any connection issues when the instances are detached, connection draining can be enabled on the load balancer
- After reattaching the instances in a batch to the load balancer, ELB waits until they pass a minimum number of health checks (the Healthy check count threshold value), and then starts routing traffic to them.
- Elastic Beanstalk waits until all instances in a batch are healthy before moving on to the next batch.
- With enhanced health reporting, all instances must pass 12 consecutive health checks with an OK status within two minutes for web server environments, and 18 health checks within three minutes for worker environments.
- If a batch of instances does not become healthy within the command timeout, the deployment fails.
- If a deployment fails after one or more batches are completed successfully, the completed batches run the new version of the application while any pending batches continue to run the old version.
- If the instances are terminated from the failed deployment, Elastic Beanstalk replaces them with instances running the application version from the most recent successful deployment.
- Batch size can be configured as a Percentage of total instances or a Fixed number.
Rolling with Additional Batch Deployments
- Rolling with Additional Batch deployments is helpful when you need to maintain full capacity during deployments.
- This deployment is similar to Rolling deployments, except they do not do an in-place deployment but a disposable one, launching a new batch of instances prior to taking any instances out of service
- When the deployment completes, Elastic Beanstalk terminates the additional batch of instances.
- Rolling with additional batch deployment does not impact the capacity and ensures full capacity during the deployment process.
- Deploys code to both new and existing instances.
Immutable Deployments
- All at Once and Rolling deployment method updates existing instances.
- If you need to ensure the application source is always deployed to new instances, instead of updating existing instances, the environment can be configured to use immutable updates for deployments.
- Immutable updates are performed by launching a second Auto Scaling group in the environment and the new version serves traffic alongside the old version until the new instances pass health checks.
- Immutable deployments can prevent issues caused by partially completed rolling deployments. If the new instances don’t pass health checks, Elastic Beanstalk terminates them, leaving the original instances untouched.
- Provides a quick and safe rollback — simply terminate the new instances.
- Works with both load-balanced and single-instance environments.
Traffic Splitting Deployments (Canary Testing)
- Traffic-splitting deployments allow you to perform canary testing as part of your application deployment.
- In a traffic-splitting deployment, Elastic Beanstalk launches a full set of new instances just like during an immutable deployment.
- It then forwards a specified percentage of incoming client traffic to the new application version for a specified evaluation period.
- If the new instances stay healthy during the evaluation period, Elastic Beanstalk forwards all traffic to the new instances and terminates the old ones.
- If the new instances don’t pass health checks, or if you choose to abort the deployment, Elastic Beanstalk moves traffic back to the old instances and terminates the new ones. There’s never any service interruption.
- Configuration options:
- Traffic split (NewVersionPercent) – The initial percentage of incoming client traffic to shift to new instances (e.g., 10%, 15%, 20%).
- Traffic splitting evaluation time (EvaluationTime) – The time period (in minutes) to wait after initial healthy deployment before shifting all traffic to new instances.
- Requires an Application Load Balancer (ALB) — does not work with Classic Load Balancer or Network Load Balancer.
- The environment’s capacity doesn’t change during a traffic-splitting deployment. Elastic Beanstalk launches the same number of instances in the temporary Auto Scaling group as the original.
- Rolling back is quick — reroute traffic and terminate new instances.
Blue Green Deployments
- Elastic Beanstalk performs an in-place update when application versions are updated, which may result in the application becoming unavailable to users for a short period of time.
- Blue Green approach is suitable for deployments that depend on incompatible resource configuration changes or a new version that can’t run alongside the old version.
- Elastic Beanstalk enables the Blue Green deployment through the Swap Environment URLs feature.
- Blue Green deployment provides an almost zero downtime solution, where a new version is deployed to a separate environment, and then CNAMEs of the two environments are swapped to redirect traffic to the new version.
- Blue/green deployments require that the environment runs independently of the production database i.e. not maintained by Elastic Beanstalk if your application uses one. Because if the environment has an RDS DB instance attached to it, the data will not transfer over to the second environment and will be lost if the original environment is terminated
- Blue Green deployment entails a DNS change; hence, do not terminate the old environment until the DNS changes have been propagated and the old DNS records expire.
- DNS servers do not necessarily clear old records from their cache based on the time to live (TTL) you set on the DNS records.
- This is the only deployment method that involves a DNS change.
Deployment Configuration
- Deployment policies are configured in the Rolling updates and deployments section of the environment’s Configuration page.
- Key configuration options in the
aws:elasticbeanstalk:commandnamespace:- DeploymentPolicy – AllAtOnce, Rolling, RollingWithAdditionalBatch, Immutable, or TrafficSplitting
- BatchSizeType – Percentage or Fixed (for Rolling and Rolling with additional batch)
- BatchSize – Number or percentage of instances per batch
- HealthCheckSuccessThreshold – Lowers the health threshold (e.g., Warning) for instances to be considered healthy
- IgnoreHealthCheck – Prevents rollback when batch fails health checks
- Timeout – Command timeout in seconds
- Traffic splitting options in the
aws:elasticbeanstalk:trafficsplittingnamespace:- NewVersionPercent – Percentage of traffic to route to new version
- EvaluationTime – Time in minutes to evaluate health before shifting all traffic
New Features (2026)
Deployments Tab with In-Progress Deployment Logs (March 2026)
- Elastic Beanstalk now provides a Deployments tab in the environment dashboard with a consolidated view of deployment history and real-time deployment progress.
- View step-by-step deployment logs while deployments are still in progress, eliminating the need for manual log bundle downloads or SSH connections.
- The Deployments tab shows history of application deployments, configuration updates, and environment launches.
- Each deployment includes detailed events and a consolidated log capturing the entire deployment process — including dependency installation, builds, and configuration steps.
- Enables faster root cause analysis of deployment failures directly in the console.
- Available on AL2023 platform versions released on or after March 11, 2026.
- Refer to: Viewing deployment logs for an Elastic Beanstalk environment
GitHub Actions for Automated Deployment (February 2026)
- Elastic Beanstalk now offers the Elastic Beanstalk Deploy GitHub Action (
aws-actions/aws-elasticbeanstalk-deploy) for automated deployments as part of CI/CD pipelines. - Automatically deploy web applications when you push code or configuration changes to your GitHub repository.
- Supports all deployment policies (All at once, Rolling, Immutable, Traffic splitting, etc.) configured on the environment.
- Refer to: Using GitHub Actions to deploy to Elastic Beanstalk
Important Considerations
- EC2 Burst Balance Loss: Some deployment policies replace all instances, causing all accumulated Amazon EC2 burst balances to be lost. This occurs with:
- Managed platform updates with instance replacement enabled
- Immutable updates
- Deployments with immutable updates or traffic splitting enabled
- Enhanced Health Reporting: When enabled, Elastic Beanstalk considers multiple factors including incoming request results. All instances must pass 12 consecutive health checks with OK status within 2 minutes (web server) or 18 checks within 3 minutes (worker).
- Connection Draining: Enable connection draining on the load balancer to avoid connection issues when instances are detached during rolling deployments.
- Deployment ID: Each deployment is identified by a deployment ID (starts at 1, increments by one). Useful for tracking instance state when rolling updates fail.
AWS Certification Exam Practice Questions
- Questions are collected from Internet and the answers are marked as per my knowledge and understanding (which might differ with yours).
- AWS services are updated everyday and both the answers and questions might be outdated soon, so research accordingly.
- AWS exam questions are not updated to keep up the pace with AWS updates, so even if the underlying feature has changed the question might not be updated
- Open to further feedback, discussion and correction.
- When thinking of AWS Elastic Beanstalk, the ‘Swap Environment URLs’ feature most directly aids in what? [CDOP]
- Immutable Rolling Deployments
- Mutable Rolling Deployments
- Canary Deployments
- Blue-Green Deployments (Simply upload the new version of your application and let your deployment service (AWS Elastic Beanstalk, AWS CloudFormation, or AWS OpsWorks) deploy a new version (green). To cut over to the new version, you simply replace the ELB URLs in your DNS records. Elastic Beanstalk has a Swap Environment URLs feature to facilitate a simpler cutover process.)
- You need to deploy a new version of your application. You’d prefer to use all new instances if possible, but you cannot have any downtime. You also don’t want to swap any environment URLs. You’re running t2.large instances and you normally need 15 instances to meet capacity. Which deployment method should you use? Choose the correct answer:
- Rolling Updates
- Blue/Green
- Immutable (Immutable deployments launch new instances in a separate Auto Scaling group, deploy to new instances with zero downtime, and do not require a DNS/URL swap. Traffic splitting would also work but Immutable is the more direct answer when canary testing isn’t required.)
- All at Once
- Your team is responsible for an AWS Elastic Beanstalk application. The business requires that you move to a continuous deployment model, releasing updates to the application multiple times per day with zero downtime. What should you do to enable this and still be able to roll back almost immediately in an emergency to the previous version? [CDOP]
- Enable rolling updates in the Elastic Beanstalk environment, setting an appropriate pause time for application startup.
- Create a second Elastic Beanstalk environment running the new application version, and swap the environment CNAMEs. (Blue/Green deployment with CNAME swap provides zero downtime and instant rollback by swapping back the URLs.)
- Develop the application to poll for a new application version in your code repository; download and install to each running Elastic Beanstalk instance.
- Create a second Elastic Beanstalk environment with the new application version, and configure the old environment to redirect clients, using the HTTP 301 response code, to the new environment.
- A company wants to perform canary testing on their Elastic Beanstalk application. They want to route 10% of production traffic to the new version for 10 minutes before completing the deployment. The environment uses an Application Load Balancer. Which deployment policy should they use?
- Immutable
- Blue/Green with Route 53 weighted routing
- Traffic splitting (Traffic splitting deployments allow canary testing by routing a configurable percentage of traffic to new instances for a specified evaluation period. It requires an ALB and provides automatic rollback if health checks fail.)
- Rolling with additional batch
- An application deployed on Elastic Beanstalk requires zero downtime deployments with the ability to quickly roll back. The team does not want DNS changes and needs the deployment to use entirely new instances. Which two deployment methods meet these requirements? (Choose 2)
- All at once
- Rolling
- Immutable (Immutable launches a second ASG with new instances, no DNS change, zero downtime, quick rollback by terminating new instances.)
- Traffic splitting (Traffic splitting also launches new instances in a temporary ASG, no DNS change, zero downtime, rollback by rerouting traffic and terminating new instances.)
- Blue/Green
- A deployment on Elastic Beanstalk must maintain full capacity throughout the process but the team is willing to accept that some instances temporarily run the old version while others run the new version. The environment uses a Classic Load Balancer. Which deployment method is most appropriate?
- Immutable
- Traffic splitting
- Rolling with additional batch (Rolling with additional batch maintains full capacity by launching an extra batch first. It works with CLB unlike traffic splitting which requires ALB. It allows mixed versions temporarily across batches.)
- Blue/Green
References
- AWS Elastic Beanstalk – Deploying applications to environments
- AWS Elastic Beanstalk – Deployment policies and settings
- AWS Elastic Beanstalk – Blue/Green deployments
- AWS Elastic Beanstalk – Immutable environment updates
- AWS Elastic Beanstalk – Viewing deployment logs
- AWS Elastic Beanstalk – Using GitHub Actions to deploy
- AWS Whitepaper – Elastic Beanstalk Deployment Strategies




