Create Develop environment in Elastic Beanstalk

  1. Download source code here nodejs.zip

  2. Go to AWS Management Console

  3. Search key word Elastic Beanstalk and select. SearchBeanStalk

  4. Click Create Application. CreateApplication

  5. In Configure environment stage.

  • Select Web server environment

  • In Application name field, input the name of your application. Ex: FCJ-My-First-App.

  • In Environment name field, input FCJ-My-First-App-env-DEV for Develop environment. InputApplicationName

  • In Platform field, choose NodeJS

  • In Application code, choose Upload your code.

  • In Version lable , input V1-Green_DEV

  • Then choose Local file and click Choose file to upload source code from your local machine. Choose Platform

  • In Presets field, choose Single instance (free tier eligible). Then click Next. Choose Presets

  1. 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
  2. Scroll down and click Submit to create application and its environment. Choose Presets

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

    This process will take you about 5 minutes to finish.

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

  5. Click to Domain of environment to see the result of your application. Domain Domain

Remember that the background of your application now is Green.

  1. Navigate to EC2 Dashboard.
  2. Click to Instance. You will see the instance name FCJ-My-First-App-env-DEV had been provisioned by Elastic Beanstalk. EC2 Dashboard
  3. Select the instances and copy the Public IP address. Copy Public IP address
  4. SSH to instance with Public IP address and FCJ-KeyPair was created at 2.1-Create Key Pair SSH to instance