What is Elastic Beanstalk?
Elastic Beanstalk is a service by AWS that makes it easy to deploy and manage web apps. You upload your code, and it takes care of the:
- Server setup & configuration
- Scaling (auto-adjusts resources)
- Load balancing
- Monitoring & health checks
Elastic Beanstalk supports popular frameworks like Node.js, Python, Ruby, etc. You focus on coding, it takes care of the infrastructure.
Now, let us learn how to create, deploy and manage Web apps with Elastic Beanstalk.
1.Open your AWS console and type Elastic Beanstalk to the search bar and select Elastic Beanstalk
2.Click create application
3.Select webserver environment and go to Application information to give the App a name, in this article, we are going to name it MoonApp
4.Scroll down to platform, click the dropdown and select Node.js (Note: you can select any option of your choice)
5.Scroll down and click Next
6.Click create role to create service role
Service role: It is an IAM (Identity and Access Management) that allows a service to perform actions on your behalf.
EC2 instance profile This works with EC2 instances. It is a container for an IAM role that can be attached to an EC2 instance when it is launched.
7.Leave everything as default, scroll down and click Next
8.Click Next
9.SCroll down and click create role
We have successfully created Service role
10.Go back to the previous page and refresh. When you refresh, the Service role pops up by itself and if it does not pop up, you can click the dropdown arrow and select the service role that was created.
11.Now we are creating EC2 instance profile. click create role
12.Scroll down and click Next
13.Click Next
14.Give the instance role a name, then Scroll down and click Create role
We have successfully created the EC2 instance role.
15.Go back to the previous page and refresh for the instance profile we created to come up
16.Let us create key pair. To create key pair, open your AWS console in another tab, type key pairs to the search bar and select key pairs NOTE: You can select from the list of your Key pair if you have any.
17.Click create key pair
18.Give the Key pair a name. In this article, we are naming it moonkey
19.Scroll down and click create key pair
20.Go back and refresh and select the key pair we created. After refreshing, click the dropdown arrow to select the Key pair
21.Click Next
22.Click the dropdown arrow and select the default VPC. Also, enable the public IP address.
23.For the instance subnet, select a region
24.Scroll down and click Next
25.Scroll down to the EC2 security groups, click the dropdown arrow and select the default security group
26.Scroll down and click Next
27.Leave the Health reporting as Enhanced
28.Scroll down and click Next
29.Scroll down and click Create
30.The App environment has been successfully launched. Click on the domain link
31.This is an evidence that we have built an application
Let us check other things that Elastic Beanstalk has created for us
32.Type EC2 to the search bar pf your AWS console and select EC2
33.Click view dashboard
34.Click instances (running)
35.Click the name of the App
36.Click connect
37.Come down to the right corner of your screen and click connect
38.This is the EC2 instance that was created by Elastic Beanstalk
39.This is the S3 bucket that was created by Elastic Beanstalk. You may click on the upload sign to upload anything.
40.This is the Auto-Scaling group that was created by Elastic Beanstalk
When you create Elastic Beanstalk, it creates some other resources by itself.
Thanks for reading, see you in my next article.








































Top comments (0)