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

Aucune réponse

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions