Skip to content

How to pass parameters to --query #7308

Discussion options

You must be logged in to vote

Hi @AkhilaGarlapally, thanks for reaching out.

AWS uses JMESPath expression and it is enclosed in single quotes. In this case, you can surround the --query value with double quotes and then use single quotes (raw string literals) for the $mybuild var like so:

var=mybuild
aws gamelift list-builds --region us-west-1 --query "Builds[?starts_with(Name, '${var}')].BuildId" --output text

I was able to get the expected output with this command above. Please let me know if you're still having the issue.

Hope it helps,
John

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tim-finnigan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants