I'm trying to create a new AMI from my existing EC2 instance with tags. I tried the following command but it doesn't work:
aws ec2 create-image --instance-id i-xxxxxxxxxxxxx --name "TEST_AMI" --no-reboot --tag-specifications 'ResourceType=instance,Tags=[{Key=name,Value=TEST_AMI}
and its return following error:
**usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:
aws help
aws <command> help
aws <command> <subcommand> help
Unknown options: --tag-specifications, ResourceType=instance,Tags=[{Key=name,Value=TEST_AMI}]**
I just need to do both tasks in one command.