Score:0

Running modify-instance-attribute on multiple ec2 instances at once

us flag

I'd like to run a modify-instance-attribute command like the one below, but run it on multiple instances at once. I'm having a difficult time determining how to do this, as it seems the command only takes in a single instance id at a time. Is there a way to perform a 'lookup' of instance id's and run the the modify-command on multiple ec2 instances at once?

Command I'm using to supply instance ids

aws ec2 describe-instances --filters  "Name=instance-state-name,Values=stopped" --query 'Reservations[].Instances[].InstanceId' --output text

Modify Command I'm trying to run on my instances:

aws ec2 modify-instance-attribute --instance-id <instance-id> --no-disable-api-termination 
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.