Setting Up a new Elastic Beanstalk Environment for NodeJS

Bahadir Balban

Started Tech Buzz


Creating a VPC

If you skip any one of the steps below your network will not function correctly.

1. Create a new VPC:

2. Create 2 subnets us-west-1a and us-west-1b with and respectively.

3. Enable auto-assign public IP address to subnets.

4. Associate the subnets with the VPC routing table.

5. Select both subnets in Network configuration part of EBS setup. Select both availability zones for Load balancer, instances, and RDS.

6. Postgres RDS requires two availability zones.

7. Edit VPC and enable DNS hostnames.

At this point I still had NO success connecting the EB instances with the load balancer, and made the following change:

8. Edit the routing table to create a route between the subnets and the gateway: connects to the gateway for your VPC.

Redis Configuration:

Start a new redis instance that is part of the VPC. In the redis creation wizard, create a new subnet group for redis, including the two subnets above.

Creating the Elastic Beanstalk Configuration

  • Use NodeJS with latest version

  • Use 1-4 instances with autoscaling

  • Create an application load balancer preferably with a port 443 HTTPS listener

  • Create an RDS using Postgres with 2 availability zones assigned.

  • Network configuration: Assign 2 AZs to both load balancer, instances, and RDS.

Modify Network Security Groups

You need to add e.g. incoming https traffic for the 443 port on the load balancer security group

EC2 Instance security group must be double checked to see if it has inbound http port for load balancer.

Join The Discussion