def get_s3_object()

in src/pre_human_task_lambda.py [0:0]


def get_s3_object(s3, s3_ref):
    """Return the bytes for an S3 reference undecoded."""
    bucket, key = S3Client.bucket_key_from_s3_uri(s3_ref)
    try:
        return s3.get_object(Bucket=bucket, Key=key)
    except Exception as e:
        print(e)
        print('Error getting object {} from bucket {}. '
              'Make sure they exist and your bucket is in the same region as this function.'.format(key, bucket))
        raise e