Skip to main content
Launch this lab in the IP Lab Portal, then follow the steps below in the AWS console. Open IP Lab Portal

Overview

Lab details

  1. This lab walks you to demonstrate how to quickly deploy and manage a Java application in the AWS Cloud without worrying about the underlying infrastructure that runs the application.
  2. Duration: 45 Minutes
  3. AWS Region: US East (N. Virginia) us-east-1

Introduction

AWS Elastic Beanstalk

  1. AWS Elastic Beanstalk provides an environment for deploying and scaling web applications.
  2. An environment is a collection of AWS resources, such as EC2 instances, a load balancer, and an Auto Scaling group, that are used to run an application.
  3. Elastic Beanstalk supports multiple environments for an application, such as development, staging, and production.
  4. Each environment can have different configurations, such as instance types, load balancer settings, and security groups.
  5. Elastic Beanstalk provides various pre-configured platforms to deploy applications, such as Java, .NET, Node.js, Python, Ruby, and Docker.
  6. Elastic Beanstalk can automatically provision and configure the necessary AWS resources, such as EC2 instances, security groups, and load balancers, based on the selected platform and environment configuration.

Architecture diagram

Task details

  1. Sign in to AWS Management Console
  2. Create your first Elastic Beanstalk Application and test it.
  3. Validation of the lab.

Launching the lab environment

  1. To launch the lab environment, click on the Launch lab button.
  2. Please wait until the cloud environment is provisioned. It will take less than a minute to provision.
  3. Once the Lab is started, you will be provided with IAM username, Password, Access Key, and Secret Access Key.
You can only start one lab at any given time

Lab guide

Lab steps

Task 1: Sign in to AWS Management Console

  1. Click on the Open console button, and you will get redirected to AWS Console in a new browser tab.
  2. On the AWS sign-in page,
    • Leave the Account ID as default. Never edit/remove the 12-digit Account ID present in the AWS Console. Otherwise, you cannot proceed with the lab.
    • Now copy your Username and Password in the Lab Console to the IAM Username and Password in AWS Console and click on the Sign-in button.
  3. Once Signed In to the AWS Management Console, make the default AWS Region as US East (N. Virginia) us-east-1.

Task 2: Create your first Elastic Beanstalk Application

In this task, you will learn how to navigate to Elastic Beanstalk and create a new environment with specific configurations.
  1. Navigate to Elastic Beanstalk by clicking on the Services menu in the top, then click on Elastic Beanstalk in the Compute section.
  2. Once Elastic Beanstalk is opened, you’ll be presented with a getting started screen. Click on the Create application
  3. In Configure environment page :
    • Environment tier : Select Web server environment
    • Application Name: Enter Sample_Application
    • Note: This is usually the name of the product/project that you are building.
    • Under Platform: Choose Java and leave other options as default
  4. Scroll down and click on the Next button.
  5. In Configure service access :
    • Select the role Named whiz_elasticbeanstalk_role- from the drop-down.
  6. EC2 Instance profile : Select EC2MonitoringAndS3Role
  7. Keep rest things as default and click on Next button.
  8. To Set up networking, database, and tags :
    • VPC : Select Default VPC
    • Public IP address**:** Choose Enabled
    • Check the us-east-1a and us-east-1b subnets checkbox under Instance subnets.
  9. Keep rest things as default and Click on Next button.
  10. To Configure instance traffic and scaling :
    • Scroll Down to capacity section and Under Instance Types, remove the existing instance types and select t2.micro from the drop-down.
  1. Click on Next button
  2. In Configuring updates, monitoring, and logging :
    • Scroll down to Managed platform updates section.
    • Uncheck the Managed updated checkbox
  3. Keep rest things as default and click on Next button.
  4. Review the details and click on Create button
  5. Once the above is completed, you will be able to see SampleApplication in the dashboard. This is the main Elastic Beanstalk screen for your application. A sample screenshot is given below:
  6. On the dashboard, you can see your application URL.
    • Sampleapplication-env.mfp5vhxpmt.us-east-1.elasticbeanstalk.com
  7. To test your application, copy the app URL and paste it into your browser. You will see your application is running successfully. A sample screenshot is given below: You can click on the options given on the page (Learn More), where they would be redirected to the elastic Beanstalk documentation of AWS.
Do you know?Elastic Beanstalk provides a simple way to deploy and manage applications on AWS, by abstracting away the complexities of infrastructure management. It allows developers to focus on writing code and building features rather than worrying about infrastructure provisioning, scaling, and monitoring.

Task 3: Validation Test

  1. Once the lab steps are completed, please click on the Check my work button on the left side panel.
  2. This will validate the resources in the AWS account and displays whether you have completed this lab successfully or not.
  3. Sample output :

Completion and conclusion

  1. You have successfully deployed a sample Java Application in AWS Elastic Beanstalk.
  2. You have tested the deployed application with the URL generated after the deployment.

End lab

  1. Sign out of AWS Account.
  2. You have successfully completed the lab.
  3. Once you have completed the steps, click on End lab in the IP Lab Portal and wait till the process gets completed.

What gets checked

When you press Check my work, the platform verifies each of these:
  • Invoke an Elastic Beanstalk Environment URL — Check whether an Elastic Beanstalk application and Environment with healthy status is created or not.
  • Create an Elastic Beanstalk Application — Check whether an Elastic Beanstalk application is created or not.