aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap
AWS::EC2::Instance support "replace root volume" with new AMI
- Dominant language
- No language data
- Stars
- 1.1k
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
### Name of the resource
AWS::EC2::Instance
### Resource name
_No response_
### Description
The new "replace root volume" with an AMI feature is not available in CFN
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/replace-root.html#replace-ami
This allows the root volume AMI to be replaced without replacing the instance.
Currently we use `BlockDeviceMappings` to specify an EBS volume as the instance root
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-blockdev-mapping.html
And we specify the AMI via `ImageId`
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-imageid
We would like to be able to update the `ImageId` without replacing the instance by having CFN perform a root volume replacement using an AMI as described in the article above.
So e.g. given an instance like this:
```json
"myEC2Instance": {
"Type": "AWS::EC2::Instance",
"Properties": {
"BlockDeviceMappings": [
{
"DeviceName": "/dev/sda1",
"Ebs": {
"VolumeSize": 20,
"VolumeType": "gp2"
}
}
],
"ImageId": "ami-XXX"
}
```
We would like to update `ImageId` and have this replace the root volume with the new AMI without replacing the instance.
### Other Details
_No response_
Contributor guide
Research direction
Start by reading the linked EC2 root-volume replacement documentation and the CloudFormation references for AWS::EC2::Instance, ImageId, and BlockDeviceMappings. The requested outcome is that changing ImageId replaces the root volume using the new AMI without replacing the instance; the issue does not name implementation files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100