Do anybody know how to perform grep on S3 files with aws S3 directly into the bucket? For example I have FILE1.csv, FILE2.csv with many rows and want to look for the rows that
The aws s3 cp command can send output to stdout:
aws s3 cp
stdout
aws s3 cp s3://mybucket/foo.csv - | grep 'JZZ'
The dash (-) signals the command to send output to stdout.
-
See: How to use AWS S3 CLI to dump files to stdout in BASH?