On my AWS account I have four file systems. In creating each of these file systems, I have given each on a tag Name. I would like to use the AWS CLI to filter out the one with a specific name, and retrieve its file system id.
I have already tried looking in JMESPath in order to filter out the one specific file system, but it seems the structure of my query as well as the structure of the output is a bit difficult for me to work with.
Here is my query so far:
aws efs describe-file-systems --query FileSystems[?Name=='dev-four'].FileSystemId --region us-east-1 --output text
Ideally, I would get the file system id as a single string, but I keep getting the error:
Bad value for --query FileSystems[?Name==dev-sg].FileSystemId: Bad jmespath expression: Unknown token '-':
FileSystems[?Name==dev-four].FileSystemId
I am not sure how to do the JMES a different way.