1

I am having issues launching an Elastic Beanstalk application inside my VPC that I created.

My VPC looks like the following:

id:  vpc-a1b
name: vpc-green
cidr:  10.0.0.0/16
route table: rtb-1ab
acl: acl-123

I then have 6 subnets:

vpc-green-public-us-east-2a (rt: vpc-green-rt-public)
vpc-green-public-us-east-2b (rt: vpc-green-rt-public)
vpc-green-public-us-east-2c (rt: vpc-green-rt-public)

vpc-green-private-us-east-2a (each has its own rt)
vpc-green-private-us-east-2b
vpc-green-private-us-east-2c

Route tables:

vpc-green-rt-public
    10.0.0.0/16     local
    0.0.0.0/0           igw-123

vpc-green-rt-private-us-east-2a
    10.0.0.0/16     local
    0.0.0.0/0           nat-001

Internet Gateway:

vpc-green-igw

ACL:

vpc-green-acl
    inbound:
        100     ALL/All/All 0.0.0.0/0  ALLOW
        *           All/All/All 0.0.0.0/0  DENY

    outbound:
        100     ALL/All/All 0.0.0.0/0  ALLOW
        *           All/All/All 0.0.0.0/0  DENY 

    associated subnets: all 6 (public and private)

Security Groups:

vpc-green-default
    inbound:
        All/All/All  sg-a123 (self)
    outbound:
        All/All/All  0.0.0.0/0

vpc-green-web
    inbound:
        tcp, 80, 0.0.0.0/0
        tcp, 443, 0.0.0.0/0     
        icmp, All, 0.0.0.0/0
        all, all, all, 0.0.0.0/0
    outbound:
        UDP, 123, 0.0.0.0/0
        all/all/all, 0.0.0.0/0


EB-Load-balancer
    inbound:
        tcp, 80, 0.0.0.0/0
    outbound:
        tcp, 80, 0.0.0.0/0

EB-VPC-Security
    inbound:
        tcp, 80, source=EB-load-balander
    outbound:
        all, all, 0.0.0.0/0

The actual ec2 instance that ElasticBeanstalk creates looks like:

t2.small
security groups:
    vpc-green-web
    EB-VPC-Security
subnet:
    one of my public subnets (vpc-green-public-us-east-2a)

The load balancer that EB created looks like:

security groups:
    EB-load-balancer
subnet:
    one of my public subnets (vpc-green-public-us-east-2a)  

I am getting an error:

The EC2 instances failed to communicate with AWS Elastic Beanstalk, either because of configuration problems with the VPC or a failed EC2 instance. Check your VPC configuration and try launching the environment again.

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

There is a help page here: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/events.common.connectivity.html

It says that "... this means the Amazon EC2 instances did not communicate to Elastic Beanstalk that they were launched successfully."

Given the above information, what exactly is the problem?

I am not sure how I can fix this as it looks fine to me.

If I visit the url that EB generates it does not work:

xxxxx.us-east-2.elasticbeanstalk.com is currently unable to handle this request.
  • 1
    Are you able to access any external services from that EC2 instance? Can you SSH into the instance? – EEAA Feb 13 '17 at 21:22
  • Try launching it again. You might try opening up the firewall as well, perhaps after a bit of research about the ports required by EB. – Tim Feb 13 '17 at 21:26
  • @Tim I have launched in many many times, Im really suck. – Blankman Feb 13 '17 at 21:53
  • 1
    My general idea is that there may be a controller somewhere that the EC2 instance needs to communicate with, but I haven't used EB myself. I think EEAA is right, pay the $50 or whatever for support for a month. – Tim Feb 14 '17 at 0:45
  • 1
    "Unknown host" indicates a DNS problem. Does your VPC have the enableDnsSupport option set to true? See docs.aws.amazon.com/AmazonVPC/latest/UserGuide/… – Peter Dolberg Feb 14 '17 at 19:32
0

So the problem ended up being that my DNS hostname and support in my VPC settings was not set to True.

Aws supported paid for itself today folks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.