- Newest
- Most votes
- Most comments
I somehow stumbled upon this stack overflow question which actually addresses this: https://stackoverflow.com/questions/48491702/is-it-possible-to-configure-an-application-load-balancer-with-elastic-beanstalk
Using this inside the elb config file makes sure that the lb is of the network type.
Resources:
AWSEBV2LoadBalancer:
Type: AWS::ElasticLoadBalancingV2::LoadBalancer
Properties:
Scheme: internal
Subnets:
- subnet-0b9cd43a6494e4fd5
- subnet-0c387b32e825aa0d4
- subnet-0c2fd1584b2d52e05
Type: network
Hello.
".ebextensions" are loaded alphabetically.
So, in your case, "01_env.config" will be loaded first.
If I put the NLB settings in "01_env.config", will it be loaded?
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options.html#configuration-options-precedence
Configuration Files (.ebextensions) – Settings for any options that are not applied directly to the environment, and also not specified in a saved configuration, are loaded from configuration files in the .ebextensions folder at the root of the application source bundle.
Configuration files are executed in alphabetical order. For example, .ebextensions/01run.config is executed before .ebextensions/02do.config.
Also, since the settings to be read have priority, you will need to check whether ALB is specified in the higher settings.
Settings applied directly to the environment
Saved Configurations
Configuration Files (.ebextensions)
Default Values
By default, Elastic Beanstalk creates an Application Load Balancer when you enabled load balancing. You can choose the type of load balancer during environment creation by setting the load balancer type to "Network" in the configuration file which is documented under Network Load Balancer namespaces section.
The configuration already specifies this as you can see in the original post. My question was why this was failing to creating a network load balancer as expected.
Relevant content
- Accepted Answerasked a year ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 2 years ago
If I move the elb config to the top of the list of configs by renaming it 01_elb.config, the problem persists. When I'm creating the environment via the eb cli, I don't pass any other arguments and I have no saved environment configs, so I don't know where a load balancer setting would be overriding the setting I have in the config file which specifies a network load balancer.