On Linux, we generally use the head/tail commands to preview the contents of a file. It helps in viewing a part of the file (to inspect the format for instance), rather than ope
As others have answered, assuming the file is large, use get-object
command with --range bytes=0-1000
to download only part of the file.
example:
aws s3api get-object --profile opsrep --region eu-west-1 --bucket
docs
As of 2018 you can now run SELECT Queries in AWS CLI. Use LIMIT 10 to preview the "head" of your file.
example:
aws s3api select-object-content --bucket
docs
Now you can quickly run head OUTPUT.csv
on the small local file