s3select
is a tool that simplifies the use of s3 select, a feature that allows you to retrieve a subset of S3 objects.
This demo sets s3select configuration up and retrive data from s3 using s3select query.
Download packaged binaries from the releases page.
You will need to have AWS API credentials configured. What works for AWS CLI, should be sufficient. You can use ~/.aws/credentials file or environment variables.
To retrive subset of s3object, run:
s3select configure --profile alb-accesslog
s3select query -b $BUCKET -k $KEY_PREFIX -p alb-accesslog -e "SELECT s._9 as elb_status_code, s._13 as request FROM s3object s WHERE s._1 = 'https'"
The result of running the query will be output stdout.