Amazon EC2 AWS Management Console - Bundling AMIs

This is the fourth part of my review of the AWS Management Console, Amazon's cloud management tool. Last time, I gave an overview of the configuration of Instances (virtual machines). Today, I will show you how to create your own AMIs (Amazon Machine Images) with the AWS Management Console.

Profile gravatar of Michael Pietroforte

Michael Pietroforte

Michael Pietroforte is the founder and editor of 4sysops. He is a Microsoft Most Valuable Professional (MVP) with more than 30 years of experience in IT management and system administration.
Profile gravatar of Michael Pietroforte

Amazon calls the creation of AMIs "bundling". In the Windows world, we would just say "cloning" or "imaging". To bundle a new AMI, you have to first launch the Instance. Before you create an image, you will probably want to configure the operating system and install your software. If the Instance runs Windows, then bundling is quite easy but a bit longwinded.

Initiating the bundling process ^

amazon-aws-management-console-bundle-instance First you have to right-click on the Instance and navigate to "bundling". You will then have to specify an Amazon S3 Bucket Name and the Key Name. The Key Name is just the name of the image. S3 stands for Simple Storage Service. Don't confuse S3 with EBS (Elastic Block Storage), which I mentioned in my last article. There are significant differences between these two storage services. Since S3 is a service that is independent of EC2, you have to sign up first and then create a so-called "bucket". A bucket is basically just a folder that can be accessed via a URL. Unfortunately, S3 can't be managed with the AWS Management Console. However, you can use the free Firefox add-on S3Fox to create a S3 bucket.

amazon-aws-management-S3-fox EC2 has to shut down a Windows Instance before it can be bundled. This is a bit disappointing because technically it should be possible to copy a virtual machine while it is online. However, it is not necessary to shut down Linux Instances for bundling. Bundling is useful if you want to test modifications before the server goes live. But with Amazon's bundling technology, you always have to take a productive Windows server offline before you can create a copy of its current state.

Unfortunately, EC2 doesn't support Instance snapshots, so you can't save the state of a server quickly before modifying the system. Some documentations refer to the bundling of EC2 Instances as snapshot creation. With "snapshot" however, something different is usually meant in virtualization solutions. A snapshot is not a copy of a virtual machine; rather, it saves the state of a VM by logging all changes after the snapshot creation. This not only saves disk space, it is also faster than cloning the complete machine.

Registering an AMI ^

amazon-aws-management-console-register-new-ami I found that bundling is relatively slow. It takes about 20 minutes to bundle a plain Windows Server 2003 machine. This is often too long for a productive server. After bundling has finished, you will find quite a few image files in your S3 bucket. Before you can use an image, you have to register the new AMI. For this, you will need the AMI Manifest Path (its URL). The AMI Manifest Path looks like this http://s3.amazonaws:80/Bucket_Name/Key_Name.manifest.XML. You have to replace Bucket_Name and Key_Name with the values used when you bundled the Instance.

amazon-aws-management-launch-private-ami Once the new AMI is registered, it will show up in the AMI list under Private Images. You can launch the AMI from there. If you want to delete an AMI, you have to de-register it and then delete all the image files in your S3 bucket manually. All in all, I find this bundling process too longwinded. Most virtualization solutions allow you to clone a VM with just one mouse click. The whole process is even more complicated for Linux Instances because you can't initiate the bundling process in the AWS Management Console. You have to do log on on to the Linux machine to bundle it.

Conclusion ^

Compared with modern virtualization management tools, AWS Management Console's features are somewhat limited. However, the fact that the cloud makes the physical machines completely invisible for the system administrator has tremendous advantages. Some time ago, I outlined why cloud computing is nothing more than location virtualization. If you launch a new virtual machine in the cloud, you don't have to think about which host you shove the image on. This also means that you will never run out of computation or storage capacity.

Of course, such flexibility does come with extra costs. Even though, cloud providers keep spreading rumors that you can save money with their services, this is certainly not true in most cases. Pay-as-you-go pricing is great if you quickly need a test machine for a limited time. But for long-term projects, I am pretty sure that cloud computing is more expensive than on-premise computing. Nevertheless, the technical advantages are very interesting. Therefore, I do believe that cloud computing has a great future once the prices begin to fall.

I highly recommend every Windows admin to learn more about cloud computing. It is a new, fast-developing world. Even though many concepts are comparable to server virtualization, there are many new things to learn for sys admins. The easy-to-use AWS Management Console is the perfect playground for getting started. Playing with Amazon's cloud is more or less free. The smallest Instance type costs only $0.10 per hour, and is well worth the money.

Take part in our competition and win $100!

  1. avatar
    bill 8 years ago

    Great post!
    The process as you describe it is not easily found anywhere, at least not in a clear concise format such as your description. And Amazon's documentation is no exception. I am always nervous about technologies that vendors can not explain clearly or without doublespeak.


  2. Profile gravatar of Michael Pietroforte
    Michael Pietroforte 8 years ago

    Thanks bill. Amazon's own documentation often takes it for granted that you are already acquainted with their cloud terminology. That makes it sometimes difficult to understand. It would be easier if they just used common virtualization terminology.

  3. avatar
    Mr Cook 8 years ago

    Good work! You've filled in many of the gaps in AWS Console and the documentation.

  4. avatar
    David 7 years ago

    Thanks for the post. As with Bill, I agree that the info you mention isn't so easy to find, particularly with the Windows AMI. I've did a quick search & found a few articles on making AMIs/snapshots but they're for Linux AMIs.

    One thing that would have been better though is if you did a step by step tutorial on making a custom Windows AMI. You only cover that in a more general sense so far.

  5. Profile gravatar of Michael Pietroforte
    Michael Pietroforte 7 years ago

    Thanks! I will post something about making custom AMI's soon. Hopefully. 🙂

  6. avatar
    Pranab 7 years ago

    Hi Michael, thanks for the post. It was really helpful for me. I am eagerly waiting for your post on custom AMI.

  7. Profile gravatar of Michael Pietroforte
    Michael Pietroforte 7 years ago

    Pranrab, thanks. This article is still on my to-do-list. I hope I will find the time soon.

  8. avatar
    Ivan Garcia 7 years ago

    Hey Michael. Any update on the custom AMI for Windows? I've stumbled across a few linux related methods of getting a vmware image into the EC2, but i'd really like to use my windows system to transfer that same VMDK or any other windows image I have created up into S3 using windows. Thanks.

  9. avatar
    David 7 years ago

    I don't recall if there was an article here about it, but (now) you can also create custom AMIs by "creating" an AMI from a customized instance launched from a public (or private) EBS-based AMI image. Amazon offers public AMIs, with some as S3 AMIs and some as EBS AMIs. EBS AMIs are easier to work with as you can create AMIs out of them w/o going through S3 and registration, etc. It might cost slightly a bit more to store under EC2 EBS than S3 though. And you can create the AMIs while the instance is running or stopped/paused (but not terminated). It still takes a while though. Process is similar to this article here but there is option to create AMI instead of bundle instance when the instance was launched from an EBS AMI.

    @Ivan, for transferring and converting other VM solutions into AMI, I found post about it here, that may work for VMDK to AMI:

    If you just want to store VM images in S3, you can just use the Amazon AWS console S3 file manager to do the transfer or use Firefox's S3Fox or other S3 file manager.

  10. Profile gravatar of Michael Pietroforte
    Michael Pietroforte 7 years ago

    I wonder what happens if you just apply a syspreped WIM image with imageX to a mounted EBS volume and then boot from this volume?


Leave a reply

Your email address will not be published. Required fields are marked *



Please ask IT administration questions in the forum. Any other messages are welcome.

© 4sysops 2006 - 2017
Do NOT follow this link or you will be banned from the site!

Log in with your credentials


Forgot your details?

Create Account