Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Customizing an Elastic Beanstalk AMI

I need to use on Elastic Beanstalk a Java application written for Glassfish server. Beacuse of Amazon doesn't let me choose an AMI with Glassfish, I choosed one with Tomcat and i modified my application to work properly on Tomcat.

Now, I've seen I also needed to use a Sun JDK, while by default Elastic Beanstalk AMI comes with openjdk. I googled a lot, finding some (not so many resources) interesting posts like this answer on StackOverflow

What I can't understand is this part of the answer:

Create your custom AMI from a running instance of Amazon's beanstalk AMI that you manually launch from EC2, NOT one that was launched from starting your application through beanstalk.

So, my question is: does anyone how to use a custom AMI with Glassfish on Elastic Beanstalk? If it's not possible, can someone explain me how to create the custom AMI?

Thanks, Andrea

like image 461
andreaxi Avatar asked Aug 17 '12 08:08

andreaxi


People also ask

How do I customize my AMI?

Log in to the AWS Management Console, display the EC2 page for your region, then click Instances. Choose the instance from which you want to create a custom AMI. Click Actions and click Create Image. Type a name for Image Name that is easily identifiable to you and, optionally, input text for Image Description.

What is custom AMI in AWS?

An Amazon Machine Image (AMI) is a supported and maintained image provided by AWS that provides the information required to launch an instance. You must specify an AMI when you launch an instance. You can launch multiple instances from a single AMI when you require multiple instances with the same configuration.

Can we create our own AMI?

You can create an AMI using the AWS Management Console or the command line. The following diagram summarizes the process for creating an AMI from a running EC2 instance. Start with an existing AMI, launch an instance, customize it, create a new AMI from it, and finally launch an instance of your new AMI.


1 Answers

That answer just means "Don't start a beanstalk application and cut an AMI directly from one of those instances. Instead, launch an instance based on the beanstalk AMIs (which are available in the public AMI listing)." I.e., use one of these; note there are 84 of them:

Beanstalk AMIs

Cut your own private AMI when you're done configuring that instance, and specify it in your beanstalk environment.

like image 181
Christopher Avatar answered Sep 25 '22 00:09

Christopher