Last active
May 21, 2020 20:17
-
-
Save ashutoshkarna03/56b85c3e09de317fc49a25fd25628d78 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import pandas as pd | |
import numpy as np | |
import paramiko | |
import pysftp | |
def lambda_handler(event, context): | |
# test for pandas | |
data = {'name':["Tom", "John", "Andre", "Sam"], | |
'degree': ["MBA", "BCA", "M.Tech", "MBA"], | |
'score':[90, 40, 80, 98]} | |
df = pd.DataFrame(data) | |
print(df.head()) | |
print('----------------') | |
# test for paramiko | |
client = paramiko.SSHClient() | |
print(client) | |
print('----------------') | |
# test for pysftp | |
cnopts = pysftp.CnOpts() | |
cnopts.hostkeys = None | |
print(cnopts) | |
print('----------------') | |
return { | |
'statusCode': 200, | |
'body': json.dumps('Hello from Lambda!') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment