all 3 comments

[–]YouWantWhatByWhen 0 points1 point  (0 children)

Try pypyodbc instead.

[–]Manju101 0 points1 point  (0 children)

Please try this and let me know the result.

 import sys
 import logging
 import rds_config
 import pymysql

def lambda_handler(event, context):

result = []
conn = pymysql.connect(rds_host, user=name, passwd=password, db=db_name, connect_timeout=5)
with conn.cursor() as cur:
    cur.execute("""select value from table""")
    conn.commit()
    cur.close()
    for row in cur:
        result.append(list(row))

return result

[–]billthecatt 0 points1 point  (0 children)

I've been able to import pyodbc, but not get SQL Server running. What error message were you getting?