Launching with snapshot based volume fails - amazon-web-services

I am trying to launch an instance, and I'm adding an EBS volume on top of the root volume.
In the extra EBS volume, I'm specifying a snapshot I created.
When I click "Launch", I immediately get the following error:
snapshotId can only be modified on EBS devices
Can you explain the problem please?

Ran into the same issue while mounting EBS volume to /dev/sdc on an instance (c3.2xlarge) using HVM image.
The solution which worked for me was to use an available AWS recommended device name e.g. /dev/sdf. AWS recommended device name for attaching EBS volume is /dev/sd[f-p]
For Linux/Unix instance recommended device names are /dev/sd[f-p]
Source: AWS Block Device Naming on Linux Instances

I had the same issue, described it here Amazon Launch Template - Updated AMI .
tl;dr
You need to keep AMI and volume's sizes the same. I had 15 GB AMI and 8 GB volume.

Moving to a bigger instance type solved the problem.

Error Description is not correct, however Maxim Kogan is correct, Moving to larger instance solves the problem.
It appears, that the storage capacity of T1 instance is very little.

Related

Cannot found the AWS EC2 storage disks I created

I created two virtual disks for AWS EC2. One is 16G and the other is 100G.
When I connect to EC2 with puTTy it does not show the disks that I created.
Anyone know what the problem is or how to fix it? Thanks.
Make an Amazon EBS volume available for use on Linux
After you attach an Amazon EBS volume to your instance, it is exposed as a block device. You can format the volume with any file system and then mount it. After you make the EBS volume available for use, you can access it in the same ways that you access any other volume. Any data written to this file system is written to the EBS volume and is transparent to applications using the device.
Depending on your requirement you can choose two ways:
Format and mount an attached volume
Automatically mount an
attached volume after reboot

AWS EBS volume not showing up windows disk management

I created an EC2 Windows instance with gp2 EBS volume.
But on logging into the windows system and checking on Disk Management, I don't find the added volume space under both un-allocated or primary partition.
I created the instance using an AWS launch template and the Device name of EBS was given as xvda.
What am I missing here?
Changing the name of EBS from xvda to xvdd in ec2 launch template and creating a new instance solved the issue.
Seems like any EBS Device name below C is not shown in Disk Management, which is weird.
For those who cannot create a new instance, create a new volume from EBS volume and attach it to instance manually and restart the windows machine. Then it would come up in the Disk management.

Root Device and Block Devices difference

Can someone help me to understand the difference between Root device and Block devices for EC2 instance. You can see a snapshot i posted below.
What i tried to achieve is :
I created a snapshot of the attached volume of the EC2.
Detached the volume from instance.
Deleted the volume.
Created a new volume from the snapshot.
Reattached the newly created volume to the instance.
But it only attaches to the Block Devices but not to the root devices. And results in the failure to launch the instance.
My apologies if my question is wrong.
Awaiting your reply.
Thanks in advance.
The Root device is the EBS volume for the AMI in which your instance is based on. This will contain the operating system. If not configured then, AWS will use the default values of the AMI.
You can configure additional Block device entries optionally to mount additional volumes on the instance, besides the root volume. It can be empty or from a snapshot.

Cant Modify or Resize Amazon EBS Volume

Cant Modify or Resize Amazon EBS Volume. In us-east-1d N. Virginia. The instance it's connected to is t2.medium CentOS 7.
Any help would be appreciated.
Update: the answer below was correct when written, but was subsequently superceded by this announcement on June 28, 2018:
Starting today, Elastic Volumes extends support to Amazon Elastic Block Store (EBS) magnetic (standard) volume type. You can now dynamically increase capacity or change the type of magnetic (standard) volumes with no downtime or performance impact using a simple API call or a few console clicks.
https://aws.amazon.com/about-aws/whats-new/2018/06/amazon-ebs-extends-elastic-volumes-to-support-ebs-magnetic--standard--volume-type/
The issue that originally triggered this question should no longer occur.
In the screen shot, the volume type shows standard.
That's a previous generation magnetic volume.
The previous generation Magnetic volume type is not supported by the volume modification methods [...]
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/limitations.html
Those can't be resized, so the option is grayed out. Your new instance from the AMI probably has a gp2 SSD volume, which does support resize.
Stop the instance that the EBS volume is attached to.
Then the modify option should be available for use.
If that doesn't work then try detaching the volume.
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html
As #michael-sqlbot says, you are using magnetic "standard" EBS volume, you can convert to ssd "gp2" volume following these steps:
Create snapshot of your EBS volume
Create new PIOPS/General Purpose SSD volume from your EBS
snapshot
Detaching existing attached magnetic volume from the
instance
Attach new PIOPS/General Purpose SSD volume
More info: https://n2ws.com/blog/how-to-guides/how-to-change-your-ebs-volume-type

Reattaching an EBS volume to a new instance that was previously accidentally deleted

Just want to preface this question by saying I've checked a few other similar questions but none really answered mine.
So the situation (hypothetically) is this: I have an EC2 instance running with one EBS volume as his root device. I forgot to turn on termination protection, oops, and I accidentally delete my server. Luckily, I set my EBS volume to persist after termination (sidequestion, can you verify this setting without using the API?)
Now, I have an AMI that is a week old. So I want to create a new EC2 instance, but I want to attach the orphaned EBS volume to it, since that has the newest data, settings and whatnot. How can I achieve this?
Am I missing some information here? Is the EC2 instance just a shell, where the EBS volume is essentially my server? Should I just take a snapshot from my EBS volume, create an AMI from that and then launch a new instance that will be the same as the orphaned one?
And while I'm here asking questions, one for the road; You can either create a volume or an image from a snapshot, why would you prefer one over the other?
Thank you in advance.
I've found an indirect answer to one of my many questions.
You can reattach a root device volume. On a Linux instance that has no EBS volumes attached, when attaching the EBS volume, name it /dev/xvda and it will register as the root device.