I have instances in AWS that have the same ReservationId (they were launched at the same time and they have AmiLaunchIndex of 0 thru x ). My goal is to produce text output with one line per instance, such as this. I added column headers for clarity.
OwnerId ReservationId InstanceId PrivateIpAddress AmiLaunchIndex
12345678910 r-poiu4567 i-asdf1234 10.0.0.1 0
12345678910 r-poiu4567 i-qwer4312 10.0.1.1 1
... etc ...
In the jmespath gitter channel, the map function was suggested as a way to accomplish this, but I can't figure out how to use the function. Any suggestions?
--query Reservations[*].Instances[*].[InstanceId] --output text
Just add the brakets
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With