1. Go to Elastic Bean Stalk

2. Create a new environment

3. Select environment tier

4. Enter Application name and Environment name

5. Select platform as Java if you have Jar file or Tomcat if you have War file (for Java Applications)

6. Select Sample application and click on Create environment

7. After sometime Environment and Application Get created

8. Access the application you just created successfully

Types of Deployment

  • All at Once
  • Rolling
  • Rolling with additional batches
  • Immutable

Legend for below diagrams

All at Once

In the above diagram 4 instances running V1 version of code. When we try to deploy a new version of code using All at once model we do the following steps:

  • All instances are stopped and V2 version of code is deployed.
  • All instances are started back to serve a new code.

When/Why do you choose this deployment model?

  1. Fastest Deployment
  2. Application can have downtime
  3. No Additional cost

Rolling

In the above diagram, we have 4 instances running V1 version of the code. When we try to deploy using Rolling model of deployment we do the following steps:

  • Stop some servers (Bucket Size).
  • Deploy code new version of code to stopped Instances
  • Start those Instances back
  • Repeat the same steps for rest of the Instances

Bucket size = No of server on which, you do not want your application to run when you are rolling out new versions

When/Why do you choose this deployment model?

  1. Application can run below capacity
  2. Application does not go down at any time
  3. Both versions of code run simultaneously
  4. No Additional cost

Rolling with Additional Batches

In the above diagram we have 4 instances running V1 version of the code. When we try to deploy using Rolling with Additional Batches model of deployment we do the following steps:

  • Stage 1: Create new server
  • Stage 2: Deploy code to new batch of Instances
  • Stage 3: Stop few Instances which are running older version of the code
  • Stage 4: Deploy new version of the code and start
  • Stage 5 and 6: Repeat step 3 and 4 with other set of Instances
  • Stage 7: Terminate additional batch of Instances

When/Why do you choose this deployment model?

  1. Good for production as Application is running at Capacity
  2. Ok to have small Additional cost
  3. Ok to have Longer Deployment times

Immutable

In the above diagram, we have 2 instances running V1 version of the code. When we try to deploy using Immutable model of deployment we do the following steps:

  • Stage 1: BeanStalk will launch one instance in the ASG and check for the health of the server
  • Stage 2: If the instance works well then it will turn up multiple Instances
  • Stage 3: If these Instances looks good then BeanStalk will move all instances from Temp to Current ASG
  • Stage 4: Current ASG will remove old instances.

When/Why do you choose this deployment model?

  1. High cost, double capacity
  2. Quick rollback
  3. Longest Deployment time
  4. Great for production.

Blue/Green Deployment

  • Blue-Green Deployment is a direct feature of Elastic BeanStalk
  • Route 53 can be setup using weighted policies to redirect
  • Create a new environment and deploy V2 version
  • “Swap URLs” when a new environment is ready

https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.deploy-existing-version.html

 1 : AWS account and go to the S3 console

2: Click on the Create Bucket button

3: follow the steps to give your new bucket a name

4: Click on Create Bucket

5: Go to bucket details

6 : Upload Your angular deployment files here

7 :  Go to Properties and Click on Static Website Hosting

8 : Choose Use this bucket to host a website and enter index.html landing page file name

End Point website URL Link here available

9 :  GO  to permission to access website URL  for unblock  public access

10: unblock public access

11:  Go to permissions and Bucket Policy.  click Policy Generator on bottom

Copy Text Bucket Policy Editor ARN

12 :  Choose Type of Policy “S3 Bucket Policy”, Principal enter  *  , Actions “ALL Actions”  and Paste ARN click on add statement

Copy JSON Content

Paste In Bucket Policy Editor and save its shows this bucket has public access

You can access your website from the endpoint provided in Static Website Hosting (Step 8).

Please add “buildspec.yml” file in your angular application under root folder and push to GitHub

https://github.com/pvenkateshnaidu/dating-frontend/blob/master/buildspec.yml

1: Go to AWS console and Code Pipeline

2 : Enter Pipeline Name and choose New Service Role

3 : Source Provider  “GitHub” and Connect to GitHub

4 :  Choose your deploy code GitHub repository and branch

5: Choose AWS code build  and create Project

6: Enter Project Name and Operating System image and environment

7: Choose Deploy Provider Amazon S3 Bucket and Choose Extract file before deploy

8: Click on Create  Pipe Line

Click on your account on the right corner and choose My Billing Dashboard

Once you click on your Dashboard, you should see the Dash Board.

You can also Click on Bills on the left to understand further Bill details

Once you click on the Bills will open the page and you can drill down as shown below

Now that you know where AWS charged you. You can do the following to ask them to wave the fee if you can not pay the amount

Click on Create Case:

Choose Account and billing Support

Choose Type and Category

Enter Case Description as shown below: (see appendix below to copy content)

Choose Phone and Enter a Phone number and Submit and you will get a call and you can explain to them over the phone and get the bill waved off.

You will get a call from AWS and they will ask you for Account Number which you can find as shown

Then they will ask you to mention which month do you want to be waved off. They will consider the charges and wave if off case by case. So be careful.


Apendix:

Template for wave off

Subject: Request to Waive off the bills

Description:

Hi Team,

I am new to AWS and I Just started learning/exploring resources of different services available on AWS. Since I am not aware of the charges for the uses of resources and I am still learning the offerings, I would request to waive off the bill.

I will make sure that I am utilizing the services and its resources judiciously in the future.

Thanks

Sai