How to find AWS instance Ids in yaml format from command line

–1 vote

Hi Guys,

I am trying to filter only instance Ids in yaml format. So that I can use these Ids in my Kubernetes configuration file. Can anyone tell me how can I filter in yaml format?

Jun 2, 2020 in AWS by akhtar
• 38,170 points
109 views

1 answer to this question.

0 votes

Hi@akhtar,

By default AWS gives output in json format. But you can use --output keyword in your command to filter in yaml format. Yu can use the given examle.

C:\Users\NADIM AKTHAR>aws ec2 describe-instances --query Reservations[*].Instances[*].["InstanceId"] --output yaml
- - - i-06e0d316abeb7fca4
- - - i-0995dbee8a1dd7169

Hope this will help you

answered Jun 2, 2020 by MD
• 95,060 points

Related Questions In AWS

0 votes
1 answer

How to copy a snapshot in AWS from the command line?

Hi@akhtar, The following copy-snapshot example command copies the specified snapshot ...READ MORE

answered Oct 20, 2020 in AWS by MD
• 95,060 points
113 views
0 votes
2 answers

How to test credentials for AWS Command Line Tools

This command always works regardless of the ...READ MORE

answered Aug 8, 2018 in AWS by anonymous
2,855 views
+1 vote
1 answer

How to auto-scale MYSQL database in AWS EC2 instance?

You could always use the Amazon RDS ...READ MORE

answered Aug 24, 2018 in AWS by Archana
• 4,150 points
1,117 views
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,100 points
1,040 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
953 views
+1 vote
1 answer

How to find all instance Ids In AWS from command line?

Hi@akhtar, You can find one keyword --query in ...READ MORE

answered Jun 2, 2020 in AWS by MD
• 95,060 points
164 views
0 votes
1 answer

How to check the state of the snapshot from the command line in AWS?

Hi@akhtar, You can check the state of the snapshot ...READ MORE

answered Oct 20, 2020 in AWS by MD
• 95,060 points
66 views