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.
- Author and member of the year 2019 – Why DevOps still doesn't rule the IT world - Wed, Jan 1 2020
- Results of the 4sysops member and author competition in 2018 - Tue, Jan 8 2019
- Why Microsoft is using Windows customers as guinea pigs - Reply to Tim Warner - Tue, Dec 18 2018
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 ^
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.
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 ^
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.
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.
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.