s3_objects_check
s3_objects_check copied to clipboard
Use "head_object" instead of "get_object"
We're currently fetching the first 10 bytes for each object instead of making a HEAD request (via https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html#S3.Client.head_object). The API documentation mentions particularities when an object is encrypted with KMS, hence why we're actually fetching [part of] the object.
Would be worth trying out using get_head to see if there are performance gains, and ensure KMS doesn't mess the testing/fetching.