AWS DevOps & Developer Productivity Blog

Three Easy Steps to Enable Cross-Zone Load Balancing in Elastic Beanstalk

You can enable Cross-Zone Load Balancing for your Elastic Beanstalk Environment in 3 quick steps:

  1. Create a directory named .ebextensions at the top level of your application source bundle
  2. Add a file named elb_cross_zone.config with the following content:

    Resources:
      AWSEBLoadBalancer:
        Type: AWS::ElasticLoadBalancing::LoadBalancer
        Properties:
          CrossZone: True
    
  3. Bundle and deploy your application. You can refer to the Documentation for instructions on creating an application archive.

Elastic Beanstalk will process the elb_cross_zone.config file in your .ebextensions folder when you deploy and enable Cross-Zone Load Balancing for your Environment.