File args to aws cli

15 Nov 2020

This is documented here, but I just wanted to be sure I did not forget that when you need the contents of an entire file to be the input to an arg for AWS's aws CLI tool, here is how you refer to it:


So, for instance, a file in the current directory

$ aws ec2 describe-instances \
    --filters file://filter.json

or a file specified from / forward:

$ aws ec2 describe-instances \
    --filters file:///tmp/filter.json