Configuring AMI elastic beanstalk

I need to use a Java application written for Glassfish on Elastic Beanstalk. Amazon's Beacuse doesn't let me choose AMI with Glassfish, I chose Tomcat and I modified my application to work fine on Tomcat.

Now I saw that I also need to use the Sun JDK, and by default Elastic Beanstalk AMI comes with openjdk. I searched a lot on googled, found some (not many resources) interesting posts, like this answer on https://stackoverflow.com/a/360525/ ...

I can not understand this part of the answer:

Create your own AMI from a working instance of Amazon AMI beanstalk, which you start manually with EC2, and not the one that was launched from starting your application through beanstalk.

So my question is: anyone, how to use a custom AMI with Glassfish on an elastic beanstalk? If this is not possible, can someone explain to me how to create a custom AMI?

Thanks Andrea

+8
amazon-web-services elastic-beanstalk glassfish glassfish-3 ami
source share
3 answers

This answer simply means "Do not run the beanstalk application and do not abbreviate AMI directly from one of these instances. Instead, run the instance based on AMI beanstalk (which are available on the AMI public worksheet)." Ie, use one of them; Note that 84 of them are:

Beanstalk ami

Edit your own AMI when you are done configuring this instance and specify it in your beanstalk environment.

+10
source share

I personally found the chosen answer confusing me, perhaps because I am still climbing the AWS learning curve. Perhaps this answer will help other newbies. Just figuring out how to successfully launch an instance of Elastic Beanstalk with my own custom AMI, I believe that this quote suggests taking the following completely non-obvious steps that just worked for me:

  • Go to EC2 services (not elastic beanstalk services) and run the Elastic Beanstalk AMI instance that you would like to use as a starting point for your custom AMI. You throw it away in a minute.

  • Select an instance and select Create Image / EBS AMI. Once created, you can delete the temporary EC2 instance that you created. The goal was only to create a custom AMI.

  • Now go to the Elastic Beans menu and edit your configuration to reference your custom AMI.

+6
source share

@Danger This will speed up the scaling process.

I use the docker application for EB, but the dockers from the Docker Hub are so slow that when all cases are unhealthy, my site will be closed after 15-30 minutes. Create an AMI setup and pull out the Docker base image to save time.

+1
source share

All Articles