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").

Sem respostas

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas