aws ec2 - modify EBS settings in existing AMI

How can I change the "DeleteOnTermination" flag in the EBS settings of existing AMI? I think I need to use "aws ec2 modify-image-attribute" for that, but not sure of the exact syntax.

EDIT: As a workaround for now, I did the following:

  1. Launch an instance from the existing AMI
  2. Modify the EBS settings in the launch instance wizard
  3. Once instance launched, created an AMI from that instance

That works, but I believe there is much easier way to do it using the modify CLI.

Comments

Popular Posts