Camera Shut down problem persist after using streamlit webrtc in AWS EC2

I’m encountering an issue with my application deployed on an EC2 instance using Streamlit and WebRTC. The application functions properly with HTTPS and SSL certification, but the camera shuts down automatically when I attempt to load it. The EC2 instance is of type c5.4xlarge.

You can find a recording of the error here:

Error Recording

Github code