snowplow_analytics_sdk/run_manifests.py
def is_glacier(s3_client, bucket, prefix):
    """Check if prefix is archived in Glacier, by checking storage class of
    first object inside that prefix

    Arguments:
    s3_client - boto3 S3 client (not service)
    bucket - valid extracted bucket (without protocol and prefix)
             example: sowplow-events-data
    prefix - valid S3 prefix (usually, run_id)
             example: snowplow-archive/enriched/archive/
    """
    response = s3_client.list_objects_v2(Bucket=bucket,
                                         Prefix=prefix,
                                         MaxKeys=3)  # 3 to not fetch _SUCCESS

    for key in response['Contents']:
        if key.get('StorageClass', 'STANDARD') == 'GLACIER':
            return True
    return False
def is_glacier(s3_client, bucket, prefix):
    response = s3_client.list_objects_v2(Bucket=bucket,
                                         Prefix=prefix,
                                         MaxKeys=3)  # 3 to not fetch _SUCCESS

    for key in response['Contents']:
        if key.get('StorageClass', 'STANDARD') == 'GLACIER':
            return True
    return False
def is_glacier ( s3_client , bucket , prefix ) : response = s3_client . list_objects_v2 ( Bucket = bucket , Prefix = prefix , MaxKeys = 3 ) # 3 to not fetch _SUCCESS for key in response [ 'Contents' ] : if key . get ( 'StorageClass' , 'STANDARD' ) == 'GLACIER' : return True return False
Check if prefix is archived in Glacier, by checking storage class of
    first object inside that prefix

    Arguments:
    s3_client - boto3 S3 client (not service)
    bucket - valid extracted bucket (without protocol and prefix)
             example: sowplow-events-data
    prefix - valid S3 prefix (usually, run_id)
             example: snowplow-archive/enriched/archive/
Check if prefix is archived in Glacier by checking storage class of first object inside that prefix