Application Deployment with AWS Elastic Beanstalk
Tags: aws, awscommunitybuilder, elasticbeanstalk, javascript
Published: 2024-01-29 11:40:51

## What is AWS Elastic BeanStalk ?

AWS Elastic Beanstalk is a fully managed service by Amazon Web Services, offering a simplified approach to deploying, managing, and scaling web applications. Developers can effortlessly upload their code, and Elastic Beanstalk takes care of tasks like infrastructure provisioning, load balancing, and application health monitoring. It supports various programming languages and platforms, automatically scales based on demand, and integrates seamlessly with other AWS services like CloudWatch, RDS, and S3. 

  

Elastic Beanstalk environments can be easily managed, supporting multiple stages like development, testing, and production. Its integration with various AWS services offers a comprehensive ecosystem for application deployment. Developers can achieve a balance between ease of use and customization, ensuring their applications run efficiently at scale. 


Let's create an elastic beanstalk using these basic steps;


**Step 1:**

Navigate the Console, locate the search bar and type AWS elastic beanstalk.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l261q0rai2p2j5qgpwno.png)


**Step 2:**

Click on **Create application**, on the left panel, click on Applications

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bb9uazd5s2ri1hzjrzsz.png)



**Step 3:**

Enter the name of your application on the Application Information Page.

Then Click **Create** to initiate the application creation process.





![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wa8nleljalyow9jeufcg.png)





![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0niufb0148euo73284hc.png)



**Step 4:** 

Now proceed to set up an environment by Navigating to the left hand , click on **Environment**




![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g8j0kg123rc62cl97lfn.png)



**Step 5:**

Now we configure the environment 

**Environment tier** -Choose the Web Server Environment

**Application Name** - Then name your environment .

**Platform** - Managed Platform

 _Choose PHP as your platform and leave others with the default recommended_. Then Click  **next** to proceed






![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6fki3u770shu6xbxdcuh.png)





![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6nai8lu7l9j0po3w7zro.png)



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zg9j2kcghlm1yzc1t3lk.png)





**Step 6:**

Configure service access

Click on Use an existing Service role.

If you click on EC2 Instance at this point it is not updated, so we need to work on this.




![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rlqxlxde9p590zstp1pg.png)





**Step 7:**


Open Console on a new tab and choose the IAM to assign  roles



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/43ubb9u4vyznfxld6jwy.png)




![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gth0ylsk4k1l8y7d6oqs.png)




**Step 8:**



- Use Case - Ec2
- Add permissions to AWS Elasticbeanstalkwebtier
_ Give a Role name


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q3norfxjzng8u6yxcegj.png)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q31n5qh0jkj4k31uswe8.png)






![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sekj5gkhqorelzun0ijs.png)





**Step 9:**

Proceed to click  **Create role** . Role Created


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gzbsncn9rkr78p8iv24y.png)




![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/66jag43eiigik4lxjo56.png)




**Step 10:** 

Configure Network Settings

- Under the VPC section, Choose the default recommended .
- Choose an availability zone.
- Click **Next** to proceed

_Choose the default recommended for everything then proceed to **submit**_



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4uqbzi3bkbzdj0epsmjg.png)




![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/swp3jmty9jdjf4r36vur.png)



**Step 11:**

Click “Submit” to launch the environment.
Verify the success message on the page.



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kgw7ect0tz2e61kq4y1z.png)



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f0uzg2vwims6mpgijmst.png)


**Step 12:**

Copy the domain link provided and paste it in your web browser.



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cxecq2806rhx2ubsz14m.png)



Yayyyy...You have successfully created a PHP app using AWS Elastic Beanstalk.


**Step 13:** 

Now we verify if our instance is running and resources.



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ir7p74a1yibxx7o9d9a0.png)




![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y5n9iizorxlthjn5qlwr.png)




## Well done Mate !