Executing query:
aws ec2 run-instances --image-id ami-7a85a01a --security-group-ids sg-756ae512 --count 1 --instance-type t2.micro --tag-specifications ResourceType=instance,Tags=[{Key=webserver,Value=production}] --subnet-id subnet-cc0b0e8a
Its throwing an error saying:
Unknown options: --tag-specifications, ResourceType=instance,Tags=[{Key=webserver,Value=production}]
Does anybody know if this is depricated, or is the syntax different from expected? I've been running in circles with this.
Possible solution with new syntax:
aws ec2 run-instances --image-id ami-xxxxxxxxxx --security-group-ids sg-ef95c791 --count 1 --instance-type m4.2xlarge --key-name mypemkey --query Reservations[*].Instances[*].[PublicIpAddress,InstanceId]
The best I can come up with, seems to be working:
aws ec2 run-instances --image-id ami-7a85a01a --count 1 --instance-type t2.micro --key-name mykeypair --subnet-id sn-756ae512 --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=production}]' --associate-public-ip-address --output=text