Skip to content

A concise, step-by-step guide to deploying a pre-configured Spring Boot MySQL REST API on AWS Elastic Beanstalk using the AWS Console. Perfect for developers seeking a straightforward path to cloud deployment and scaling.

License

Notifications You must be signed in to change notification settings

amideb/deploy-spring-boot-rest-api-mysql-aws-elastic-beanstalk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Deploying Spring Boot MySQL REST API on AWS Elastic Beanstalk: A Comprehensive Guide

Step 1: Configure Environment

  1. Navigate to the AWS Elastic Beanstalk console at https://console.aws.amazon.com/elasticbeanstalk/.
  2. Click on Create application.
  3. Select Web server environment and click Select.
  4. In the Application information section, type 02-rest-api-mysql as the application name.
  5. In the Platform section, select Managed platform and from the dropdown menus, select Java.
  6. In the Application code section, choose Upload your code. Click Choose file to select the Spring Boot JAR file from your local computer. Set the Version label as 02-rest-api-mysql-source.
  7. Choose the Presets as Single instance (free tier).
  8. Click on Next

Screenshot 2023-05-24 at 11 35 15 AM


Screenshot 2023-05-24 at 11 35 50 PM


Screenshot 2023-05-24 at 11 36 13 PM


Screenshot 2023-05-24 at 11 36 36 PM


Screenshot 2023-05-24 at 11 37 08 PM


Screenshot 2023-05-24 at 11 37 38 PM


Screenshot 2023-05-24 at 11 38 11 PM


Step 2: Configure Service Access

  1. In the Service Role section, choose the Use an existing service role option and select your preferred role from the dropdown menu.
  2. In the Instances section, choose Use an existing EC2 instance profile and select your preferred profile from the dropdown menu.
  3. If you are facing any issue in this page like no service role is showing, you can refer to this doc: https://github.com/amideb/Beanstalk-Instance-Profile-Troubleshooting
  4. Otherwise, Click on Next

Screenshot 2023-05-24 at 11 38 52 PM


Step 3: Set up Networking, Database, and Tags

  1. Scroll down
  2. In the Database section, click on Enable Database. Select mysql for Engine. Provide the username and password.
  3. Make Database deletion Policy to Delete.
  4. Click Skip to review.

Screenshot 2023-05-24 at 11 39 33 PM


Screenshot 2023-05-24 at 11 41 37 PM


Screenshot 2023-05-24 at 11 43 05 PM


Step 4: Review

  1. Review all your configurations and if everything is according to your requirements, click on Submit.

Screenshot 2023-05-24 at 11 44 05 PM


Screenshot 2023-05-24 at 11 44 22 PM


Screenshot 2023-05-24 at 11 44 38 PM


Step 5: Wait for 10-15 Mins

  • AWS Elastic Beanstalk will then automatically handle the deployment, from capacity provisioning, load balancing, and automatic scaling to application health monitoring. After a few minutes, your environment should be up and running.

  • Note: The environment URL will be displayed in the AWS Elastic Beanstalk console once the environment is successfully launched. You can use this URL to access your deployed Spring Boot REST API.


Screenshot 2023-05-24 at 11 51 34 PM


Step 6: Wait is Over

Congratulations, your Spring Boot MySQL REST API is now successfully deployed on AWS Elastic Beanstalk! πŸŽ‰πŸš€

Your application is now running in the cloud and is accessible from anywhere. This is a significant accomplishment that will help drive your project forward. I encourage you to continue exploring and pushing the boundaries of what you can achieve.

Remember, every step forward is a step towards success. Well done! πŸ™ŒπŸ₯³


Screenshot 2023-05-24 at 11 58 30 PM


Step 7: Open the Application

Congratulations! πŸŽ‰

Congratulations on successfully deploying your Spring Boot MySQL REST API on AWS Elastic Beanstalk! πŸŽ‰πŸš€

This is a major achievement and I hope it brings you one step closer to your goals. Keep up the great work and continue to push the boundaries of what you can accomplish! πŸ˜ƒπŸ‘

Don't forget to celebrate this moment, you've earned it! πŸ₯³πŸŽŠ


Screenshot 2023-05-24 at 11 59 20 PM


Screenshot 2023-05-24 at 11 59 40 PM


Screenshot 2023-05-24 at 11 59 55 PM


Screenshot 2023-05-25 at 12 00 52 AM


Remember: AWS resources can incur charges. Make sure to stop or delete resources when you've finished with them to avoid unnecessary costs.

About

A concise, step-by-step guide to deploying a pre-configured Spring Boot MySQL REST API on AWS Elastic Beanstalk using the AWS Console. Perfect for developers seeking a straightforward path to cloud deployment and scaling.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published