Deployment of Java Application to Elastic Beanstalk
- Lets create an Elastic Beanstalk application with Java 11
- Select Upload code and public s3 url
https://referenceapplicationskhaja.s3.us-west-2.amazonaws.com/spring-petclinic-2.4.2.jar
- Now click on create application
- This application will be created but the health will be degraded.
- Navigate to elastic beanstalk url we will be getting 502 Bad Gateway
- The reason is elastic beanstalk is trying to check on port 80, but this application runs on port 8080
- Lets configure elastic beanstalk to check on port 5000.
- Navigate to configuration
-
Add the Environment Configuration
SERVER_PORT
with value 5000 and apply changes
- Delete the Environment and application
Deployment of Tomcat application with Java 8
- Create a Elastic Beanstalk application with tomcat and java 8 (correto 8).
- While uploading the code select https://referenceapplicationskhaja.s3.us-west-2.amazonaws.com/gameoflife.war