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,260 points
804 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,460 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,460 points
1,130 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
6,052 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,170 points
2,967 views
+2 votes
1 answer

How to Use Amazon AWS Credentials to Access/Query Tables in AWS RDS Instance through Mobile App

You should make your backend functions to ...READ MORE

answered Aug 28, 2018 in AWS by Priyaj
• 58,020 points
1,338 views
+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,020 points
2,739 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,063 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,460 points
5,612 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,460 points
1,347 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP