Error Reading Certificate File /etc/ec2/amitools/cert-ec2.pem
with Amazon Linux AMIseem to excludethiscrucial file when bundling up froman instance-store backed instance. This can cause problems down the road when you want to further customizeyour AMI. For example, Amazon has a 32-bit instance-store backed AMI in the us-east region with ID "ami-4b814f22". We launch an EC2 instance with this AMI, customize it, bundle it up using ec2-bundle-vol, and finally register the bundle. So we are now at, say, ami-12345678. We launch a new EC2 instance with ami-12345678, customize it again and then bundle up the new customization. But the ec2-bundle-vol command will fail this timewith an error like this: error reading certificate file /opt/aws/amitools/ec2/etc/ec2/amitools/cert-ec2.pem: No such file or directory - /opt/aws/amitools/ec2/etc/ec2/amitools/cert-ec2.pem This looks like a bug in EC2 tools shipped by Amazon. An easy but tedious workaround is to launch an instance off the original Amazon AMI, i.e ami-4b814f22 and then copy over the cert-ec2.pem before running ec2-bundle-vol . This problem has been reported here. Hope Amazon will devise a fix soon to save users from this misery. Posted by YC at 6:46 PM Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest Labels: AWS No comments: Post a Comment Newer Post Older Post Home Subscribe to: Post Comments (Atom) Blog Archive ▼ 2012 (5) ► October (1) ► July (1) ► June (2) ▼ January (1) ec2-bundle-vol Error "cert-ec2.pem: No such file o... ► 2011 (20) ► December (1) ► November (3) ► October (4) ► August (1) ► July (3) ► June (1) ► May (2) ► March (2) ► February (3) ► 2010 (13) ► December (2) ► November (2) ► October (2) ► September (6) ► August (1) Popular Posts Using Guice-ified Jersey in Embedded Jetty Configuring Maven to Use a Local Library Folder Step-to-Step Guide to Programming Android SSL with Self-Signed Server C
von GoogleAnmeldenAusgeblendete FelderNach Gruppen oder Nachrichten suchen
scale your application to infinity while reducing IT-budget? Just kidding. As using the (increasingly hyped) cloud infrastructure indeed does make http://blog.makandra.com/2010/04/how-to-create-an-image-from-a-running-amazon-ec2-instance/ sense for some applications out there, some of our customers use it. http://www.idevelopment.info/data/AWS/AWS_Tips/AWS_Management/AWS_10.shtml A common task when working on Amazon EC2 is to launch instances (virtual machines for the old-fashioned) in order to get increased computing power, to add another slave for whatever, etc.. Of course you need some kind of image to boot your virtual machine - and you error reading can't just drive past the Amazon datacenter in Dublin to insert your Ubuntu CD somewhere. Ideally this image already includes the basic stuff you usually need. As we work with Ruby on Rails most of the time we need a Ruby interpreter, a bunch of gems we usually use, maybe a database server, Java run-time-environment for using Solr or Memcached. error reading certificate Additionally you might have some basic configuration like security-stuff, monitoring or SSH keys for your team. In order to create such an instance that includes your individual stuff, boot one of the offered basic AMIs at Amazon, do your configuration homework and follow the next steps to create your own private individual AMI: First of all you need the X.509 keys. Go to the AWS Management Console, click "Account" in the very upper menu line, "Security credentials", enter your login data and click on "X.509 Certificates" located in "Access Credentials". Copy these certificates to your instance: $ scp -i your_keyfile_for_the_instance.pem directory_where_both_x509_certs_are/*.pem root@$hostname.compute.amazonaws.com: Log into the instance and move the keys to a separate directory, as you want to exclude those keys from the image to be created: $ ssh into instance $ mkdir x509_certs $ mv *.pem x509_certs $ cd x509_certs Hints: ec2-bundle-image is very likely not what you want if you intend to create an AMI from a running instance, use ec2-bundle-vol (as described in the following) instead! To ensure you get a clean state of yo
the Instance Convert Instance Store-Backed AMI to an EBS-Backed AMI About the Author Introduction There is no shortage when it comes to finding an available Amazon Elastic Compute Cloud (EC2) Machine Image (AMI). Often times, however, finding an image from the community AMIs that meets your particular needs can be a challenge. In many cases the image is bloated, provides too much customization, performs poorly, or lacks any type of reasonable documentation. Not to mention the inherent security concerns associated with some 3rd party AMIs. In this article, I will demonstrate how to create your own instance store-backed (a.k.a. S3-backed) and EBS-backed Amazon EC2 image of CentOS 6.2 (64-bit) with its own kernel. Creating your own AMI allows you to make the most of Amazon EC2 and provides better control over performance, security, and reproducibility. Your AMIs become the basic unit of deployment which allow you to rapidly boot new custom instances as you need them. This guide has been successfully tested and verified to work with the Linux distributions listed below. Substitute any references to CentOS 6.2 with the appropriate distribution name and version number when completing the tasks in this guide. CentOS 6.2 (64-bit) CentOS 6.3 (64-bit) There are two methods to prepare your own custom Amazon EC2 instances for Linux/UNIX systems: From an Existing AMI Involves launching an existing public AMI and modifying it according to your requirements. Create a New AMI from Scratch on Your Own Machine (loopback method) Involves building a fresh installation either on a stand-alone machine or on an empty file system mounted by loopback. Although preparing a new AMI from an existing one is often the easiest method, this guide will document the procedures to create a new AMI from scratch using a fresh OS install of CentOS 6.2 (64-bit) on an empty file system mounted by loopback. Creating AMIs through a loopback involves performing a full ope