diff --git a/streamlit_app/app.py b/streamlit_app/app.py index a36f45f..ac50016 100644 --- a/streamlit_app/app.py +++ b/streamlit_app/app.py @@ -44,12 +44,15 @@ def get_session(): @st.cache_data def get_endpoint_names(): - sm_client = boto3.client("sagemaker") - response = sm_client.list_endpoints( - SortBy="CreationTime", - SortOrder="Descending", - ) - endpoints = response["Endpoints"] + try: + sm_client = boto3.client("sagemaker") + response = sm_client.list_endpoints( + SortBy="CreationTime", + SortOrder="Descending", + ) + endpoints = response["Endpoints"] + except: + endpoints = [] return endpoints