Deploying a spring boot application to AWS Elastic Beanstalk
- Ensure you have the code which runs locally.
- Cross check your applicaton by running
mvn spring-boot:run
- Once the application is running locally, execute
eb init
and then select the environment details like region, key pair etc. - eb will create a config.yml in the
.elasticbeanstalk
folder - Add the deploy section to the config file with jar file path
- By default elastic beanstalk will create an nginx server which will act as proxy and forward the request on 80 port to 5000 port, so if necessary add application.properties file
- Now create the environment by executing
eb create -s
- Once the environment is ready access the endpoint
- If you make changes in the code, then ensure they are running locally and deploy using
eb deploy
- Once you are done
eb terminate <environment-name>