def check_if_file_exist()

in assets/functions/check_initial_pipeline_run/app.py [0:0]


def check_if_file_exist(bucket, key):
    s3_client = boto3.client('s3')
    file_exists = True
    try:
        s3_client.head_object(Bucket=bucket, Key=key)
    except ClientError:
        file_exists = False
        pass

    return file_exists