Ace the AWS Academy Cloud Operations Challenge 2025 – Skyrocket Your Cloud Skills!

Question: 1 / 400

What is the correct JMESPath query to find the state of all instances in a customer’s AWS environment?

--query 'Instances[*].State'

--query 'Reservations[*].Instances.*'

--query 'Reservations[*].Instances[*].State.Name'

The correct JMESPath query to find the state of all instances in a customer’s AWS environment is structured to accurately traverse the JSON response that AWS provides when describing EC2 instances.

The key elements in this query are the nested structure of 'Reservations' and 'Instances.' In AWS, when you describe instances using the EC2 API, the response contains a top-level array called 'Reservations.' Each reservation can have multiple instances and each instance has a state object that contains detailed information about its current state.

The query `Reservations[*].Instances[*].State.Name` effectively navigates this structure. It first accesses all reservations with `Reservations[*]`, then drills down to the 'Instances' array within each reservation using `Instances[*]`, and finally retrieves the 'State.Name' property for each instance, which indicates whether the instance is running, stopped, or in another state.

This comprehensive approach ensures that you retrieve the state for every instance within the customer's entire AWS environment, covering all reservations and instances therein.

The other choices do not fully capture the necessary hierarchy of the response structure or miss key elements, leading to incomplete or incorrect outputs. The choice that refers to 'Instances[*].State' omits the critical 'Reservations' level in the

Get further explanation with Examzify DeepDiveBeta

--query 'Instances[*].Status'

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy