Deploy the Environment

Create a new Application

  1. Find Elastic Beanstalk and select Elastic Beanstalk.

0001

  1. Select Applications and then click Create application.

0002

  1. Enter fcj-aws-application for Application name. Click Create.

0003

Create a new Environment

  1. Go to the console of our fcj-aws-application application and click Create new application.

0004

  1. In Environment tier, Select Web server environment.

0005

  1. Type fcj-aws-application-prod-env for both Environment name and Domain.

0006

  1. Click Check availability to check if your name is valid.

0007

  1. In Platform, select Managed platform for Platform type and then choose .NET Core on Linux.

0008

  1. Select Sample application for Application code to utilize AWS providing source code.
  • In Presets section, select High availability for building high availability environment.
  • Click Next.

0009

  1. Select Create and use new service role to generate new service role automatically.
  • Select aws-keypair and fcj-aws-ec2-instance-profile created in the previous steps.
  • Click Next.

0010

  1. Select fcj-aws-vpc.

0011

  1. Select 2 Private Subnet for Instance Subnets.

0012

  1. Scroll down then select Next.

0013

  1. Select 1 minute for Monitoring interval, that means EC2 instance will send metrics for each minute.
  • When initialization, Elastic Beanstalk creates a new Security Group for EC2 Instance, so we can skip EC2 security groups section.

0014

  1. Select Load balanced for Environment type then type the number of minimum instances and maximum instances.

0015

  1. Instance types, select t2.micro.

0016

  1. In the Load balancer subnets section, select 2 Public Subnet.

AWS by default selects 2 Private Subnet, so if we leave it as its default values, the load balancer can’t receive traffic.

0017

  1. Select Application load balancer and Dedicated for Load balancer type.

0018

  1. Select Next.

0019

  1. Select Enhanced for Health reporting system.

0020

  1. Select Activated for Log streaming so we can view logs using CloudWatch.

0021

  1. Enter your email to receive significant messages from Elastic Beanstalk Environment.

0022

  1. Deployment policy select Rolling and leave others as their default values.
  • Deployment policy types:

    • All at once: Deploy the new version to all instances simultaneously. All instances in your environment are out of service for a short time while the deployment occurs.
    • Rolling: Deploy the new version in batches. Each batch is taken out of service during the deployment phase, reducing your environment’s capacity by the number of instances in a batch.
    • Rolling with additional batch: Deploy the new version in batches, but first launch a new batch of instances to ensure full capacity during the deployment process.
    • Immutable: Deploy the new version to a fresh group of instances by performing an immutable update.
    • Traffic splitting: Deploy the new version to a fresh group of instances and temporarily split incoming client traffic between the existing application version and the new one.

0023

  1. Select Activated for Instance log streaming.
  • Select Next.

0024

  1. Review your choices and select Submit.

0025

  1. Wait for about 10 minutes for the environment to be created.

0026