Cloudformation "AWS::EC2::Volume" as root device for EC2 instance

0

When using the BlockDeviceMappings it is possible to set the volume size during stack creation but changing the size (or any other EBS property) results in EC2 instance replacement.

The recommendation here is to to use AWS::EC2::Volume to avoid replacement. https://repost.aws/knowledge-center/cloudformation-update-volume-instance

Is it possible to make Cloudformation create a AWS::EC2::Instance based on a public AMI (e.g. Windows_Server-2019 ami-010c18a20eec1a70a) where the root device (/dev/sda1) is defined by AWS::EC2::Volume?

I have tried many variants, "Volumes", "VolumeAttachment", in combination with "NoDevice". Also it seems like the snapshot used as root device for public AMIs are not publicly accessible (fails with "Snapshot does not exist").

已提問 1 年前檢視次數 128 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南