Tag Info

Hot answers tagged

64

An AMI is, as you note, a machine image. It's a total snapshot of a system stored as an image that can be launched as an instance. We'll get back to AMI's in a second. Lets look at EBS. Your other two items are sub-items of this. EBS is a virtual block device. You can think of it as a hard drive, although it's really a bunch of software magic to link into ...


21

Since this question was written, Amazon completely revamped for Amazon Linux AMI 2011.09, with all the bootstrapping for CloudFormation as well as Amazon tools. Also, it includes Nginx and PHP-FPM in the yum repos if you're looking for fast and light. Keep up with the latest releases here: http://aws.amazon.com/amazon-linux-ami/latest-release-notes/ Also ...


21

When you attach an EBS volume, you specify the device to attach it as. Under linux, these devices are /dev/xvd* - and are symlinked to /dev/sd* In the AWS console, you can see your EBS volumes, what instances they are attached to, and the device each volume is attached as: You can achieve the same thing from the CLI tools. Set the necessary environment ...


13

I ran into the same problem when trying to duplicate a machine. The problem turned out to be the kernel. Both when creating the AMI and the instance I selected default for the kernel image. To resolve the problem, I recreated the AMI using the same kernel image as the original instance.


13

Best practices: Whenever you build an AMI (or even set up an instance) always document the exact steps you took to install and configure the software and what data you put on it and where. This has many benefits including making it easy to rebuild the same AMI for a different architecture. Even better, I recommend scripting most or all of the install, ...


12

I was in a similar situation; fully managed dedicated server, LAMP, CentOS. Then we decided to move to EC2. Also, I had very little systems or linux administration experience. I have almost zero experience with Ubuntu, so I really cannot speak to which is the so-called better OS. I tried a bunch of pre-built AMI's with minimal OS installs from ...


10

I'm not sure about shared AMIs, but many things in EC2 are segmented by region and you have to select the correct region to see them. You can select the region in the upper right-hand corner of the screen.


8

You list "1690 GB of instance storage". It isn't clear if you were just quoting the specs of your instance type or if you have actually formatted and are using all that storage. It isn't clear from the question exactly what storage you want to increase. Here are some thoughts on different situations: It is not possible to increase instance-store beyond ...


7

No, there is no automated way. You will have to create a new AMI starting with the Ubuntu-plain one. It's possible to convert an Unbuntu installation but it's really messy. It's best you make a fresh AMI.


7

The approach I take to decreasing an EBS root volume is as follows: Stop (not terminate) the target instance, and detach the root EBS volume. Alternatively, you can snapshot the root volume (or use an existing snapshot) and create a new EBS volume from that. (e.g. /dev/xvda1) Note: the volume you use from the step above will be altered - so you may want to ...


7

The only fastest way is that which you have mentioned already, that make a small ami and host a static maintenance page on it, by attaching elastic IP to it. There is no hard and fast rule that which AMI should be used in this scenario. Any micro instance of Debian/RHEL/Ubuntu would work fine.


7

The Amazon image file is a raw file which contains the disk image byte-by-byte, VirtualBox can use it wo/ problem. There is a detailed description here: http://linux.blogs.com.np/2010/04/05/how-to-move-a-virtual-machine-from-ec2-to-virtualbox-or-kvm/


6

Actually, your best bet is probably the Amazon Linux AMI: http://aws.amazon.com/amazon-linux-ami/ It's CentOS/RHEL under the hood, so you can use all the CentOS RPMs and such, but you get Amazon's tweaks and improvements so it runs even better in EC2.


6

You can use the ec2-undbundle tool to download any AMI you control. As you can make an AMI of an instance, this should be no trouble.


6

I believe your only option is to create a new AMI from one of your configured instances. Then you will have to spin up new instances based on that AMI and remove the ones on the old AMI.


6

It's not the TTYs you would disable; it is the gettys (you can also modify udev rules to not create device files for the ttys, but they are implemented in the kernel). If you log in only via SSH and do not log in through any of the console ttys or a serial tty ever, by all means remove the inittab rules that run a getty on them. However, I would personally ...


6

Make sure the time zone is also changed in /etc/sysconfig/clock by setting ZONE="America/New_York"


6

It's actually an error page, and gets served because index.html is missing. You should find it somewhere in the vicinity of /var/www/error/noindex.html


5

imagecreatefromjpeg is in php-gd mb_strlen is in php-mbstring So install them via yum install php-gd php-mbstring


5

Did you allow ICMP and other traffic in security group settings? You should check the security group settings. It looks like you are using a default security group as seen on the 2nd row of 2nd column of the table on your screenshot. You should click "view rules" and adjust the rules there.


5

The official amazon images come quite minimal with only a local sendmail daemon, ntpd, dhcp client, crond, atd, rsyslog and a few other services running. Based on this install and the default security groups, the Amazon Linux AMI is already as minimal as it can be.


5

If you still have access to the instance, I believe the simplest way would be using "dd" to copy it off to a raw file (possibly just directly piping over SSH to the destination system like in ssh your.ec2-syst.em 'dd if=/dev/sdh bs=1M | gzip' | gunzip | dd of=/tmp/ec2-image.raw) and then using something like qemu-img to convert the raw image to a VMDK file.


5

It's broke, fix it. chkconfig nginx on In your current configuration, nginx is never started automatically. Note that the symlinks that start with K indicate that the service will be stopped (killed) in that runlevel. Symlinks that start with S indicate that the service will be started.


4

By default, when creating an AMI image of an EBS-boot instance, the instance will be shutdown. The benefit of shutting down is that the filesystem is ensured to be in a consistent state (no partial file writes). Using the Amazon AWS Management Console, you're forced to stop the instance when creating the AMI image. However, when using the API or ...


4

The best way to go about reducing the size is to create an empty new (small) volume and copy the file system over from an old (big) volume. EBS boot AMIs are based on snapshots. If you own the AMI, then you can create a volume from the snapshot to copy it. Attach both volumes to a running instance for the copy. My favorite rsync options on Ubuntu are: ...


4

If you are building the AMI, then you can put whatever you want on the file system. For your high level question about running code on startup, you can add the code as a standard system startup script on the AMI file system. The specific way to do this depends on the initialization software used by your particular Linux distro and release. HOWEVER! Your ...


4

Can i create a S3-backed / instance-store AMI out of an EBS based instance? Yes, you can create an Instance-store AMI out of an EBS based instance. Install ec2-ami-tools in the instance Upload your x509 certificates to the instance Use ec2-bundle-vol and ec2-upload-bundle commands NOTE: You need your account ID, Access Key and Secret Key to ...


4

You'll need to start with a new AMI I believe, but you can generate a package list on the old image using dpkg: dpkg --get-selections | awk '{print $1}' > pkgs.old Then use this on the new image to figure out what packages you might need to install: dpkg --get-selections | awk '{print $1}' | fgrep -v -f - pkgs.old Then probably copying files out of ...


4

No. You're just able to see your AMI in community AMIs because you have permissions to see it. Observe these two screenshots. I created an AMI in the first account and it shows up in my Community AMIs for that account. I then logged on with a different account and attempted to search for the same AMI but that account was unable to see it.


4

You could go to the EC2ConfigService Settings (Start -> all programs) on your instance. Under "Set Password" put a check in "Set a random password ....". The password will be generated on next boot and your ami created from the instance will have a random generated password. Alternatively you can edit your C:\Program ...



Only top voted, non community-wiki answers of a minimum length are eligible