Create Production environment in Elastic Beanstalk

  1. Go to AWS Management Console

  2. Search key word Elastic Beanstalk and select. Search BeanStalk

  3. Click Application and click to application name was created. Select Application

  4. Click Create environment to create Production environment. Select Application

  5. Input the name of environment FCJ-My-First-App-env-PROD at Environment name.

    • Choose NodeJS at Platform. Select Application
    • Choose Upload your code at Application code
    • Input V1-GREEN-PROD at Version label
    • Choose Local file and click Choose file button to upload your code.
    • Select the nodejs.zip file that you had downloaded.
    • Choose High availability at Presets.
    • Then click Next to go to next step. Select Application
  6. In Configure service access interface:

    • At Service role, choose Use an existing role.
    • At Existing service roles, select role aws-elasticbeanstalk-service-role.
    • At EC2 key pair, select FCJ-KeyPair.
    • At EC2 instance profile, select role aws-elasticbeanstalk-ec2-role.
    • Then click Skip to review to go to next step. Choose Presets
  7. Scroll down and click Submit to create environment. Choose Presets

  8. Check the result, the environment is creating. Choose Presets

    This process will take you about 5 minutes to finish.

  9. See the result after the environment is created successfully. Choose Presets

  10. Click to Domain of environment to see the result. Choose Presets Choose Presets

    Remember that the background of your application now is Green.

  11. Navigate to EC2 Dashboard.

  12. Click to Instance. You will see the instance name FCJ-My-First-App-env-PROD had been provisioned by Elastic Beanstalk. Choose Presets Choose Presets

  13. Click to Auto Scaling Groups, you will see two ASGs are created.

    • The ASG with Max = 4, belongs to FCJ-My-First-App-env-PROD environment.
    • The ASG with Max = 1, belongs to FCJ-My-First-App-env-DEV environment. Choose Presets
  14. Click to Load Balancers, you will see an ALB is created.

    • Select ALB.
    • Click Listeners and rules tab.
    • Click to the target group below. Choose Presets
  15. In Target Group interface, at Registered targets you can see the instance that belongs to FCJ-My-First-App-env-PROD environment. Choose Presets

    An ASG and ALB was created in Production environment since you selected High availability at Presets when configuring the Elastic Beanstalk.