title: JMESPath query expression with bash variable
body: <p>Messing around with a simple aws cli query to check for the existence of a Lambda function and echo the associated role if it exists:</p>
  
  <pre><code>#!/bin/bash
  
  fname=$1
  role=$(aws lambda list-functions --query 'Functions[?FunctionName == `$fname`].Role' --output text)
  
  echo "$fname role: $role"
  </code></pre>
  
  <p>However, $fname appears to be resolving to an empty string in the aws command.  I've tried escaping the back ticks, swapping ` to ' and a miriad of other thrashing edits (and yes, I'm passing a string on the cl when invoking the script :)</p>
  
  <p>How do I properly pass a variable into JMESPath query inside a bash script?</p>