in lambda/api/lambda_register.py [0:0]
def get_endpoint_variants(endpoint_name):
"""
Get the list of production variant names for an endpoint
"""
logger.info(f"Getting variants for endpoint: {endpoint_name}")
response = sm_client.describe_endpoint(EndpointName=endpoint_name)
endpoint_variants = [
{
"variant_name": r["VariantName"],
"initial_variant_weight": r["CurrentWeight"],
}
for r in response["ProductionVariants"]
]
logger.debug(endpoint_variants)
return endpoint_variants