DEV Community

Cover image for Deploy Spring Boot application to AWS Elastic Beanstalk and RDS
Devanand Ukalkar
Devanand Ukalkar

Posted on

Deploy Spring Boot application to AWS Elastic Beanstalk and RDS

Are you looking to deploy your application to AWS without hassle of managing infrastructure?

With AWS Elastic Beanstalk, you can quickly deploy and manage applications in the AWS Cloud without worrying about the infrastructure that runs those applications.

In this article, we will be looking at steps to deploy spring boot application with MySQL Database to AWS Elastic Beanstalk and RDS.
Lets get started!


  • First of all, We need to setup MySQL database using AWS RDS. I wrote an article on how to use RDS to provision a MySQL database. Please follow below link for the same.

https://dev.to/devanandukalkar/how-to-create-database-using-aws-rds-meh

  • Once your database is ready, add mysql-connector dependency to pom.xml file.

Image description

  • Update the properties file with details from provisioned database.
    Image description

  • Go to AWS console and search for "Elastic Beanstalk".

Image description

  • Click on "Create Application" to start the deployment wizard.

Image description

  • Type in your application name & platform needed to run it (There are many other options to choose from).

Image description

Image description

  • Under "Source code origin" choose local file and upload the jar for your application & click Create Application.

Image description

  • Your environment could take few minutes to deploy.

Image description

Image description

  • Once the environment is created, use given link to access your application. The "Health" on the snapshot says severe because AWS process checks if there is a response from root of your application. Make sure your WebApp or API does not throws 5xx error on the root path.

  • You can always reupload your code with section given as "Upload and deploy". That's about it!

Please leave your reactions and comment below if you found this short article helpful!

Top comments (0)