- November 23, 2020
- saptrxuy_learnit
- 0 Comments
- 2002 Views
- 1 Likes
- Java
Deploy Simple Spring Boot Web Application in AWS Elastic Beanstalk
1. Introduction
This document describes how to deploy simple spring boot web application in AWS Elastic Beanstalk. We need one spring boot project and account in AWS.
2. Create one spring boot web application
Create one simple spring boot web application, which will return ‘Hello World’ on RequestMapping(“/”)
3. Login to AWS account
https://signin.aws.amazon.com/signin?redirect_uri=https%3A%2F%2Fconsole.aws.amazon.com%2Fconsole%2Fhome%3Fstate%3DhashArgs%2523%26isauthcode%3Dtrue&client_id=arn%3Aaws%3Aiam%3A%3A015428540659%3Auser%2Fhomepage&forceMobileApp=0
After login, it will redirect to AWS Management Console
If you don’t have account in AWS, then create account and follow next step.
4. Create New Application in Elastic Beanstalk
4.1.What is AWS Elastic Beanstalk?
AWS Elastic Beanstalk is an easy-to-use service for deploying and scaling web applications and services developed with Java, .NET, PHP, Node.js, Python, Ruby, Go and Docker on familiar servers such as Apache, Nginx, Passenger, and IIS.
we can simply upload code and Elastic Beanstalk automatically handles the deployment, from capacity provisioning, load balancing, auto-scaling to application health monitoring. At the same time, you retain full control over the AWS resources powering your application and can access the underlying resources at any time.
4.2.Click on Services
Next screen will show like below.
4.3. Create new application
Enter Application Name and description then click on Create.
Next screen will display like below:
4.4.Create Environment▲
Click on Create one now
Environment tier will have two options, we will use web server environment -> click on Select
4.5.Add Environment Information▲
Copy springboot-hello-world application name and paste in Domain section.
4.6.Configure platform in Base Configuration▲
Select Java platform in Base configuration.
4.7.Upload Jar in Application code▲
Select upload your code option and then click on upload
Next screen will show like below. Click on Browse
Select jar from your target project folder -> click on Open
Click on Upload
Click on Create environment
Next screen will come like below.
It will take few minutes.
After that next screen will display.