How to use a cli variable in AWSCLI query
<p><strong><em>How do I use a variable with an AWS query??</em></strong></p>

<p>There does not seem to documentation on the query syntax, mearly examples.</p>

<p>Im trying to do the following: </p>

<pre><code>API_ID=$(aws apigateway get-rest-apis --query 'items[?name == `${API_NAME}`] | [0].{id: id}' --output text)
</code></pre>

<p>The problem is that ${API_NAME} is read literally. Any ideas?</p>