# Instalar jq - JSON processor

Como podemos reparar, o output escolhido por nós no `aws configure` é o `json`. Assim, para que tiremos máximo proveito da automação, é interessante que consigamos processar o output.&#x20;

Para isto, podemos utilizar a [biblioteca jq](https://stedolan.github.io/jq/), que ajuda muito no processo de automação.&#x20;

Uma vez instalado, podemos processar o output a extrair informações relevantes, como o exemplo abaixo que extrai o ID da instância:

```bash
leandronsp:~ $ 
    aws --profile personal ec2 describe-instances | \
        jq -r '.Reservations[0].Instances[0].InstanceId'

#=> i-0efdd68b789a70981
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://aws101.leandronsp.com/instalar-jq-json-processor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
