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.
- Once your database is ready, add mysql-connector dependency to pom.xml file.
Go to AWS console and search for "Elastic Beanstalk".
- Click on "Create Application" to start the deployment wizard.
- Type in your application name & platform needed to run it (There are many other options to choose from).
- Under "Source code origin" choose local file and upload the jar for your application & click Create Application.
- Your environment could take few minutes to deploy.
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!