All file objects must have their contents written to stdout.
To get this, use the aws s3 cp command and provide "-" as the destination. $ aws s3 cp s3:/mybucket/stream.txt is an example of a command.
Is this what you're after? ::
for key in `aws s3api list-objects --bucket $BUCKET --prefix bucket/path/to/files/ | jq -r '.Contents.Key'`
aws s3 cp s3://$BUCKET/$key - | md5sum