6

I'm trying to create a new ElasticBeanstalk application with an Application Load Balancer. I'm calling the following commands:

$ mkdir HelloWorld
$ cd HelloWorld
$ eb init
$ echo "Hello World" > index.html
$ eb create dev-env --elb-type application

Output of the last command results in this error:

Creating application version archive "app-170821_175709".

Uploading HelloWorld/app-170821_175709.zip to S3. This may take a while.

Upload Complete.

ERROR: Configuration validation exception: Invalid option value: 'null' (Namespace: 'aws:ec2:vpc', OptionName: 'ELBSubnets'): Specify the subnets for the VPC for load balancer type application.

Any ideas what is wrong with my VPC? I am using the default VPC for this region.

UPDATE: I've made further progress, but am still not able to get the ALB set up correctly. I've added a few parameters to my eb create command:

eb create staging-env --elb-type application --vpc.id vpc-1234604b --vpc.publicip --vpc.ec2subnets subnet-12340aa2 --vpc.elbsubnets subnet-12340aa3,subnet-12341966 --vpc.securitygroup sg-1234ac01 --vpc.elbpublic

But I'm still getting the following error:

ERROR: Stack named 'awseb-e-ifnuqgmbah-stack' aborted operation. Current state: 'CREATE_FAILED' Reason: The following resource(s) failed to create: [AWSEBV2LoadBalancer].

ERROR: Creating load balancer named: arn:aws:elasticloadbalancing:us-west-2:123456785170:loadbalancer/app/awseb-AWSEB-Y1OVPGRIAZMD/cc5ce6193af39c0b failed Reason: S3Bucket: staging-bucket is not located in the same region with ELB: app/awseb-AWSEB-Y1OVPGRIAZMD/cc5ce6193af39c0b ```

Brian Anderson
  • 621
  • 7
  • 22

2 Answers2

4

I was able to get this working by running the eb create command above with the correct vpc & subnet settings.

Brian Anderson
  • 621
  • 7
  • 22
  • 1
    Worked for me. ELB + ALB is an undocumented mess at the moment, so thanks for this. I think it's not a console option yet because not all of the ELB parameters are wired through to their counterparts. For instance, the health check URL needs to be set on the Target Group explicitly. – Rupert Rawnsley Sep 01 '17 at 14:47
0

I was able to get working with eb create dev-env --elb-type classic.

A Classic Load Balancer is the Elastic Load Balancing previous-generation load balancer. It supports routing HTTP, HTTPS, or TCP request traffic to different ports on environment instances.

mchavezi
  • 482
  • 1
  • 4
  • 14