How to redirect http to https if streamlit application deployed in AWS EC2

Hi Team,
I have deployed the streamlit application in AWS ec2 instance (with elastic ip) and mapped the elastic ip to A record of subdomain. I have created SSL certtifcates through LetsEncrypt. currently application working on http://xxxx.yyy.ai:8501. How to redirect this to https://xxxx.yyy.ai

kindly do the needful.