How to give Name in command line when running aws ec2 run-instances ?

I don't find it in the official docs



The Name that's displayed there is taken from the Name tag. To set the instance name e.g. to test01 and its volume name to test01-disk1 you'd run something like this:

aws ec2 run-instances --tag-specifications \
    'ResourceType=instance,Tags=[{Key=Name,Value=test01}]' \
    'ResourceType=volume,Tags=[{Key=Name,Value=test01-disk1}]' \
    ... other parameters ...

Hope that helps :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.