I'm trying to access our servers MySQL database (Not AWS RDS) with:
def lambda_handler(event, context):
try:
conn = pymysql.connect("mySite.com", user="admin", passwd="pass", connect_timeout=5)
and I'm getting return error:
Response:
{
"errorMessage": "xxxxxxxxxxxxxxxxxxxxxxxxx Task timed out after 3.00 seconds"
}
I've set up my roles with the AWSLambdaVPCAccessExecutionRole and WSLambdaRole and set up a default VPC network with subnets and security groups:
Security group ID: sg-xxxxxxxx
Ports: All
Destination: 0.0.0.0/0
Is there something I'm forgetting? I tested this with a RDS and I'm able to connect to the DB it's just when I try an external DB it's timing out.
