Is there any way to access videocapture in ec2 instance (can't access camera by index)

Hello everyone, I have a flask app that streams live video; however, when I try to deploy it to an EC2 instance, I receive the problem “can’t find camera by index.” Could you guys please assist me with this? I’ve tried a few internet solutions, but they didn’t work.