I need a CLI alternative similar to the example here in
CodePudding user response:
Use single quotes '
to enclose the entire JSON string, if you are using linux/macOS terminal. In powershell, use \
to escape the double quotes.
like this -
aws s3api select-object-content --bucket "my-bucket" --key jobs/test.json --expression "SELECT * FROM s3object s LIMIT 5" --expression-type 'SQL' --input-serialization '"{"JSON":{"Type": "DOCUMENT"},"CompressionType": "None"}"' --output-serialization '"{"JSON": {Type: "DOCUMENT"}}"' /dev/stdout
Note: If you have any single quotes inside your JSON string, needs to be escaped with backslash \
.