AWS Elastic BeanStalk
- Concepts: Refer Here
Activity 1: Deploy a Java application to elastic beanstalk from war file
- Refer Here for the war file and download this
- Create an elastic beanstalk application with java and correto 8
- We have a failure
- Our application runs on 8080 port, elastic beanstalk is trying to reach 80 port
- Our attempt was a failure due to invalid configuration.
- Elastic Beanstalk creates an ec2 instance with custom image (generally AWS Linux) and also the confiugrations like which subnet, size of ec2 instance, key pair to login, network to be connected & this is represented in Configuration section.
- So Elastic Beanstalk suggest source bundles.
- For Java applications we have two files
- Buildfile: What command should be used to build the code
- Procfile: what command should be used to run the application
Activity 2: Deploy a java application to elastic beanstalk from code
- Refer Here for the sample code with java.