linkedin insight
Managing, deploying, and monitoring AWS Elastic Beanstalk applications using EB CLI

Deploy and monitor beanstalk applications ebcli

Cloud/Devops
Feb 22, 2022
4-6 min

Share blog

Introduction

Elastic Beanstalk (EB) is a managed AWS service used to deploy, manage, and scale web applications and services. We can either use Elastic Beanstalk from the AWS Management console or from the command line using the Elastic Beanstalk Command Line Interface (EB CLI).

In this blog, we will use the Elastic Beanstalk Command Line Interface to deploy and monitor web applications. We will need EB CLI for this, Set up the Elastic Beanstalk CLI

In this blog, we will create a sample application and deploy it to the AWS cloud using the EB CLI.

Step 1 : Setup sample application

We need to setup a directory for the Elastic Beanstalk application, for this we will create a new folder called sample-app to use as a working directory and navigate into it.

python
$ mkdir sample-app
$ cd sample-app

Using command line, setup a new EB application using the following command:

python
1$ eb init

Above command will prompt us to select a Region where the application should be deployed. Select the nearest region or Enter for the default one.

It will prompt for the application name, press Enter for the default one.

javascript
Enter Application Name
(default is "sample-app"):

Next we will be prompted for user credentials. Provide the Access key ID and Secret access key values, setup for the IAM user.

javascript
You have not yet set up your credentials or your credentials are incorrect
You must provide your credentials.
(aws-access-id): Access-key-id-here
(aws-secret-key): Secret-key-id-here

Now select a platform to use. We can choose any no corresponds to the following given platforms, here we will go with 6) Node.js and press Enter.

javascript
Select a platform.
1) .NET Core on Linux
2) .NET on Windows Server
3) Docker
4) Go
5) Java
6) Node.js
7) PHP
8) Packer
9) Python
10) Ruby
11) Tomcat
(make a selection): 6

Now, it will prompt you for the platform branch or version, choose the one of your choice.

python
Select a platform branch.
1) Node.js 18 running on 64bit Amazon Linux 2023
2) Node.js 18 running on 64bit Amazon Linux 2
3) Node.js 16 running on 64bit Amazon Linux 2
4) Node.js 14 running on 64bit Amazon Linux 2
(default is 1):

Now it will prompt you for the SSH, depending on your need, here we will go with yes .i.e. Y

javascript
1Cannot setup CodeCommit because there is no Source Control setup, continuing with initialization
2
3Do you want to set up SSH for your instances?
4
5(Y/n): Y

Choose SSH key pair

javascript
Type a keypair name.
(Default is aws-eb):

Here the application setup concludes.

Step 2 : Deploy application

Now, let’s start deployment of the application, for the run the following command,

javascript
$ eb create

When prompted to “Enter Environment Name”, provide your name or press Enter for the default name.

javascript
Enter Environment Name
(default is sample-app-dev):

When prompted to “Enter DNS CNAME prefix” type in a unique DNS name for the application and press Enter.

javascript
Enter DNS CNAME prefix
(default is sample-app-dev22):

Next, it will prompt to select a Load Balancer type. Choose Enter to accept the default or chose the one of your choice

javascript
Select a load balancer type
1) classic
2) application
3) network
(default is 2): 2

For Fleet requests type N, or you can go with y if you need it.

javascript
Would you like to enable Spot Fleet requests for this environment? (y/N): N

When prompted to specify or create an Elastic Beanstalk service role, press Enter to have Elastic Beanstalk create one for you.

Note : This prompt only shows up the first time you use Elastic Beanstalk.

javascript
2.0+ Platforms require a service role. We will attempt to create one for you. You can specify your own role using the --service-role option.
Type "view" to see the policy, or just press ENTER to continue:

Press Y to download the sample application code into your current directory

javascript
NOTE: The current directory does not contain any source code. Elastic Beanstalk is launching the sample application instead.
Do you want to download the sample application into the current directory? (Y/n): Y

As this process proceeds, the EB CLI will output progress events to the command line. The EB CLI will warn you that it is creating a sample application for you. Then it will create the AWS resources to run the application, and then deploy the application to those resources.

Step 3 : Monitor application

Following command will open your live application in a browser,

javascript
$ eb open

To view the status of the application the EB CLI has created for you, enter the following command,

javascript
$ eb status

Output

javascript
Environment details for: sample-app-dev
Application name: sample-app
Region: us-west-2
Deployed Version: app-230808_191013988856
Environment ID: e-fqpcayzeyi
Platform: arn:aws:elasticbeanstalk:us-west-2::platform/Node.js 18 running on 64bit Amazon Linux 2023/6.0.0
Tier: WebServer-Standard-1.0
CNAME: sample-app-dev22.us-west-2.elasticbeanstalk.com
Updated: 2023-08-08 14:12:52.097000+00:00
Status: Ready
Health: Green
Alert: An update to the EB CLI is available. Run "pip install --upgrade awsebcli" to get the latest version.

To view the health of the computing resources the EB CLI has created for you, enter the following command,

javascript
$ eb health]
Terminal-style monitoring dashboard showing a healthy Node.js 18 web server on an Amazon Linux EC2 instance with OK status, low CPU load, and successful deployment.

At the end to terminate all the created resources, run the following command,

javascript
$ eb terminate -all

Blogs

Discover the latest insights and trends in technology with the Omax Tech Blog.

View All Blogs
DynamoDB multi-tenant architecture for secure data isolation.
6-10 min
August 13, 2026

Multi-Tenancy Patterns in DynamoDB: Silo, Pool, and Bridge Models

If you've already made the jump from a relational database to DynamoDB see our guide on moving relational data from SQL to DynamoDB...

Read More
Cursor IDE generating a Figma design draft from a Jira ticket - visualizing AI‑assisted design workflow.
8-10 min
August 10, 2026

We stopped leaving the IDE to design. Here’s our Cursor → Figma flow

Cursor drafts fast, catches gaps early, and still clips fields and breaks layouts. Here's the real pros-and-cons breakdown of our workflow...

Read More
AWS DevOps Agent automating AI-powered on-call incident response
6-8 min
August 07, 2026

AWS DevOps Agent: How AI is Automating On-Call Incident Response

If you've ever been on call during a production outage, you know how stressful it can be. Alerts start firing, dashboards light up, and suddenly you're jumping between monitoring tools...

Read More
Next.js pre-build script for detecting missing images before deployment
6-10 min
August 06, 2026

Catch Missing Images Before Deploy: A Simple Pre-Build Script for Next.js

How Omax Tech added a lightweight image validation gate to Next.js 15 builds on Vercel...

Read More
Storybook MCP + Amazon Bedrock + Strands: Teaching your LLM to build UI from your real design system catalog
10-15 min
August 04, 2026

Teach your LLM your design system: Storybook MCP + Amazon Bedrock + Strands

How to stop models inventing buttons and make them build UI from your real component catalog. Most "AI UI" demos look great until you paste the markup into a real product. The fix is not a smarter prompt...

Read More
Configure Self Hosted GitLab Repository Mirroring
6-8 min
July 30, 2026

Configure Self Hosted GitLab Repository Mirroring

Self hosted GitLab Repository Mirroring is a powerful feature that automatically synchronizes repositories between GitLab and external Git providers...

Read More
Illustration of Event Sourcing concepts for scalable software architecture and distributed systems.
4-8 min
July 20, 2026

Event Sourcing: A Foundation Guide

Event Sourcing is an architectural pattern where every state change is recorded as an immutable event rather than updating a database row in place...

Read More
AWS cloud security best practices with developer coding environment and cloud technology infrastructure
6-10 min
July 15, 2026

AWS Security Best Practices Every Business Should Follow

As more organizations migrate their applications and critical workloads to AWS, securing cloud environments has become a business priority rather than just an IT responsibility...

Read More
Futuristic cloud computing illustration with glowing data and AI-powered server floating in a digital neon environment.
6-10 min
June 22, 2026

AWS Migration Checklist: A Practical Roadmap for Modern Businesses

Migrating businesses to AWS offers many benefits, including cost optimization, improved security, and greater scalability. However, a successful migration requires careful planning and execution. Otherwise, organizations may experience...

Read More

Ready to Work With Us?

Most engagements start with a 20-minute conversation. No pitch, no pressure - just an honest discussion about what you're building and whether we're the right fit.