I use bat file to launch Amazon Instances by this code:
ec2-run-instances %AMI_Id% -k ED_Key_Pair -t t1.micro -g default -z us-east-1a
But I can not set name of the Instances. I want use
ec2-create-tags resource_id [resource_id ...] --tag key[=value] [--tag key[=value] ...] command to set a name. But I can not get Instances ID from remote computer. How can I do it?
The instance id should be returned by the
ec2-run-instancescommand. A part of the returned string should be something like:instance_id should be in the format
i-12345678If you are on windows (cmd) you will most likely also need to wrap your key=[value] in double quotes.
or in Powershell