How safe is Session State in streamlit?

I am storing boto3 sessions in session state. I wanted to confirm if this is the best practice.

from boto3.session import Session
from botocore.config import Config
import streamlit as st

if "BEDROCK_RUNTIME_CLIENT" not in st.session_state:

    st.session_state["BEDROCK_RUNTIME_CLIENT"] = Session().client(
        "bedrock-agent-runtime", config=Config(read_timeout=600)
    )
1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.