def get_asset_manifest()

in src/pkg/qs_asset_gov.py [0:0]


def get_asset_manifest(account_id):
    """
    Retrieve manifest file and generate list of asset objects
    """
    assets = {}
    try:
        data = S3_CLIENT.get_object(Bucket=BUCKET, Key=KEY)
        json_data = json.loads(data['Body'].read().decode('utf-8'))
        assets = json_data['assets']
        for asset in assets:
            asset['account_id'] = account_id
    except ClientError as err:
        LOGGER.info(f"Could not retrieve manifest file. Error: {str(err)}")
    return [QuickSightAsset(**asset) for asset in assets]