From an AWS Lambda function, using Python code, I'm trying to make a request.get("https://linkedin.com"), and sometimes I receive a timeout from the Lambda, and other times the following error message: [ERROR] ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')).
The Lambda security group has all outbound traffic open, and I have tested a curl from another machine in the same subnet as the Lambda (request.get method is not working for few specific websites in AWS Lambda Python shell), and it works perfectly. What could be happening?