Why is Elastic Beanstalk suddenly deploying servers with no public IP address?

0

So I have some existing NodeJS EB projects in our account that work brilliantly. Then yesterday, I decided to create a new sample project via CLI like I've done countless times before...

eb create sample-project --vpc.id vpc-xxxxxxxx --vpc.publicip --vpc.elbpublic --vpc.elbsubnets subnet-xxxxxxxx,subnet-xxxxxxxx,subnet-xxxxxxxx,subnet-xxxxxxxx --vpc.ec2subnets subnet-xxxxxxxx,subnet-xxxxxxxx,subnet-xxxxxxxx,subnet-xxxxxxxx --vpc.securitygroup sg-xxxxxxxx --instance-type t2.small --min-instances 2 --max-instances 4 --elb-type network --sample

This deploys the sample NodeJS project and it works fine... mostly. But here's where it goes south on me... if I go into the configuration after its launched and bump the min-instances value from 2 to 3, it will always deploy the third server with no public ip address. The server never reports back that its healthy so the deployment waits awhile then decides the server is not healthy so it removes it and adds another one which has the same problem. Rinse and repeat until it finally gives up and rolls back to the previous working configuration.

Any ideas what's happening? I've used EB since it came out forever ago and I've never had this problem. And its not the subnets or any other VPC configuration because like I said, I have other older EB projects running in the same subnets fine. And yes, "auto assign ipv4" is turned on in all subnets.

I also tried the exact same thing in a brand new AWS account and had the same issue, so I'm guessing anyone here can replicate this as well and I encourage you to try because right now I'm feeling a little crazy!

Any thoughts? I'm stumped.

2 Answers
0

Greetings NobodySpecial

I have seen this post and query, I am from AWS Support.

Firstly I would like to confirm that you are not crazy!

The Elastic Beanstalk Team identified an issue where the AssociatePublicIpAddress value was not being resolved properly in some situations. This resulted in the AssociatePublicIpAddress being set to false as you identified.

There has since been a fix released that resolved this behavior. You should not experience this issue any more.

Please test the behavior on your end again.

*Should the issue not be resolved on your end I would recommend creating a case with AWS Support as there may be other issues you are experiencing.

AWS
answered a year ago
  • Thanks for reporting back!

  • Still having an issue here. If you go through the "Create environment" on the AWS site and select "network" for the load balancer type, it wont let you get past that screen. Shows an error at the bottom that says "Cannot read properties of undefined (reading 'DefaultValue')". If you change it to "application" then it lets you proceed.

    Going to try this via CLI now and will report back.

0

To troubleshoot this issue, you can check the VPC configuration for your new project and compare it with the VPC configuration for your other projects. Specifically, you should check the subnet settings to ensure that they are properly configured to assign public IP addresses to all instances launched in the subnet. You could try creating a new sample project using the Elastic Beanstalk console instead of the CLI tool to see if you have the same issue.

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions