Home AWSAWS Elastic Beanstalk

AWS Elastic Beanstalk

by SupportPRO Admin

By using Elastic Beanstalk we can easily manage applications in the AWS Cloud without affecting the infrastructure on the applications. With this, we can manage all of the resources that run on the application as environments. It will reduce the risks in managing applications without restricting choices and the control, as we can simply upload the applications and Beanstalk will automatically handle the load balancing, scaling, application health monitoring and capacity provisioning.

Elastic Beanstalk supports applications developed in Go, Java, .NET, Node.js, PHP, Python, and Ruby. Once the application brings into effective action, Beanstalk provides one or more AWS resources, such as Amazon EC2 instances. Beanstalk supports software stack on the Amazon EC2 instances as per the configuration on it.

Let’s take a look at an example.

If there is a Java SE platform, Elastic Beanstalk supports two configurations such as one running Java 7, and the other running Java 8.  Each of them runs a software stack fitted to hosting a Java application. we can simply interact with Elastic Beanstalk by using the AWS Management Console, the AWS Command Line Interface (AWS CLI), or be, a high-level CLI designed specifically for Elastic Beanstalk.

We can change the size of our Amazon EC2 instances or monitor the application by using the Elastic Beanstalk web interface.

Application

An Elastic Beanstalk application is a logical collection of Elastic Beanstalk components.

Environment

An environment is a version that is deployed onto AWS resources.

Environment Tier

The environment tier determines whether Elastic Beanstalk provisions resources to support an application that handles HTTP requests or an application that pulls tasks from a queue.

Environment Configuration

An environment configuration identifies a collection of parameters and settings that explains how an environment and its resources behave.

Configuration Template

A configuration template is a starting point for creating unique environment configurations.

Steps to Use Elastic Beanstalk

  1. Create an application
  2. Upload an application version in the form of  a Java .war file to Elastic Beanstalk
  3. Provide information about the application
  4. Beanstalk automatically launches an environment and creates and configures the AWS resources needed to run the code.
  5.  Once the environment is launched, manage the environment and deploy new application versions.
Elastic BeanStalk-Deployment Diagram


After performing the above steps, it is available via the AWS Management Console, API’s, or Command Line Interfaces, including the unified AWS CLI.

If we need an AWS resource, we can define a template for creating AWS resources with AWS Cloud Formation, and we can use this template to launch new AWS resources without re-customizing them. Once the AWS resources are deployed, we can modify and update them in our predictable way.

After creating the Elastic Beanstalk application, we can view information about the application deployed and its provisioned resources via environment dashboard in the AWS Management Console.

To View the Dashboard

  1. Open the Elastic Beanstalk console.
  2. Choose “GettingStartedApp-env”
  3. On clicking next, it shows all the information about the environment. For example “URL”, “health status”, “name of the deployed application version”, “five most recent events”, and “platform configuration”.

Details of the Pages to View the State of the Environment

Configuration

The Configuration page shows the resources provisioned for this environment.

Health

The Health page shows the status and detailed health information about the EC2 instances which is running on our application.

Monitoring

We can check the following statistics for the environment:

  • Average Latency
  • CPU utilization.
  • Can create alarms to monitor the metrics.

Events

This page shows any error and information messages.

Tags

Manage your environment’s tags

Deploy a New Application Version

The running application is labelled as “Sample Application”

  1. Download one of the following sample applications
  • Single-Container Docker – docker-single-container-v1.zip
  • Multi-Container Docker – docker-multi-container-v2.zip

Preconfigured Docker Environments

  • GlassFish – docker-glassfish-v1.zip
  • Python 3 – docker-python-v1.zip
  • Go (Golang) – docker-golang-v1.zip

Language / Framework Stacks

  • Go – go-v1.zip
  • Java SE (Jetty + Gradle) – java-se-jetty-gradle-v3.zip
  • Tomcat – java-tomcat-v3.zip
  • .NET (ASP) – dotnet-asp-v1.zip
  • Node.js – nodejs-v1.zip
  • PHP – php-v1.zip
  • Python – python-v1.zip
  • Ruby (Passenger Standalone) – ruby-passenger-v3.zip
  • Ruby (Puma) – ruby-puma-v3.zip
  1. Open the Elastic Beanstalk console.
  2. On Beanstalk application page choose getting-started-app and then choose GettingStartedApp-env.
  3.  Select Upload and Deploy.
  4. Click on Choose File and upload the source bundle which we have downloaded.
  5. The console automatically fills in the Version label.
  6. Select Deploy. Elastic Beanstalk now deploys the file to the Amazon EC2 instances.

To Change Your Environment Configuration

  1. Open the Elastic Beanstalk console.
  2. Direct to the management page for your environment.
  3. Select Configuration.
  4. On the Capacity configuration box, select  Modify.
  5. Change Environment type to Load balanced, this can be done in the Scaling Group section.
  6. Change Max to 4, and then change Min to 2.
  7. Modify the capacity page, choose Save.
  8. Choose Apply.
  9. Choose Confirm.

Steps to Delete Any Unwanted Applications and Environments from Elastic Beanstalk and AWS Services

Delete all application versions

  1. Open the Elastic Beanstalk console.
  2. Choose the getting-started-app application.
  3. Choose Application versions.
  4. Select all application versions that you want to delete, and then choose Delete.
  5. Confirm the versions that for deleting, and then choose Delete.
  6. Choose Done.

Terminate the Environment.

  1. Direct to environment dashboard, click getting-started-app and then click GettingStartedApp-env.
  2. Choose Actions, and then choose Terminate Environment.
  3. Confirm on terminating GettingStartedApp-env, and then choose Terminate.

Delete the Getting-Started-App Elastic Beanstalk Application.

  1. Direct to the main dashboard.
  2. Choose Actions for the getting-started-app application, and then choose Delete application.
  3. Confirm delete this Elastic Beanstalk application by choosing Delete.

FAQ

1. What is AWS Elastic Beanstalk?
AWS Elastic Beanstalk is a Platform as a Service (PaaS) that allows developers to deploy and manage applications without handling the underlying infrastructure.

2. What programming languages does Elastic Beanstalk support?
It supports Go, Java, .NET, Node.js, PHP, Python, and Ruby.

3. How does Elastic Beanstalk simplify deployment?
You upload your code, and Beanstalk automatically handles provisioning, load balancing, scaling, and health monitoring.

4. What is an environment in Elastic Beanstalk?
An environment is a version of your application deployed on AWS resources like EC2 instances.

5. Can I scale applications using Elastic Beanstalk?
Yes, it automatically scales applications based on demand and allows manual configuration for capacity and load balancing.

If you require help, contact SupportPRO Server Admin

 Partner with SupportPRO for 24/7 proactive cloud support that keeps your business secure, scalable, and ahead of the curve.

Contact Us today!
guy server checkup

You may also like

Leave a Comment