Reputation: 687
Im trying to give more disk space to my instance as by default it used 8GB. I need to be around 20GB. I use the following:
But i get this error - Invalid value '/dev/sda1' for unixDevice. Attachment point /dev/sda1 is already in use
Is there a way of modifying the disk space without creating a new Volume or am i doing something wrong?
"WebServerInstance": {
"Type": "AWS::EC2::Instance",
"Properties": {
"Volumes" : [
{ "VolumeId" : { "Ref" : "MyVolume1" },
"Device" : "/dev/sda1"
}
],
}
}
"MyVolume1": {
"Type": "AWS::EC2::Volume",
"Properties": {
"Size": "50",
"AvailabilityZone" : "eu-west-1a"
},}
Upvotes: 1
Views: 1617
Reputation: 269101
Updated in November 2020
As per the AWS::EC2::Volume
documentation for the Size
property:
Update requires: No interruption
Therefore, you can modify the template and then perform an Update.
Upvotes: 0
Reputation: 21
I have a couple of issues with John Rotenstein's answer. In fairness to John, AWS is rapidly evolving and his advice may have been correct/appropriate at the time.
Upvotes: 2