aws-database-migration-tools icon indicating copy to clipboard operation
aws-database-migration-tools copied to clipboard

Override profile CLI default output format to use JSON

Open willgarcia opened this issue 7 years ago • 0 comments

When the default output format is text:

1 🍒  migrate-delimited-files-to-nosql/master 05817a7  $ aws configure
AWS Access Key ID [****************]:
AWS Secret Access Key [****************]:
Default region name [ap-southeast-2]:
Default output format [text]:

the download script fails:

0 🍒  migrate-delimited-files-to-nosql/master 4de075b  $ bash -x download-imdb-title-basics.sh
+ AWSPROFILE=default
+ BUCKETKEY=mybucket/mykey/
+ mkdir -p tempimdbfiles
+ cd tempimdbfiles
++ aws s3api list-objects --bucket imdb-datasets --prefix documents/v1/current/title.basics.tsv.gz --request-payer requester --profile default
++ jq -r '.Contents[].Key'
parse error: Invalid numeric literal at line 2, column 0

Adding the option --output json fixes the issue..

willgarcia avatar Jan 29 '18 08:01 willgarcia