Skip to content

Instantly share code, notes, and snippets.

@ashutoshkarna03
Last active May 21, 2020 20:17
Show Gist options
  • Save ashutoshkarna03/56b85c3e09de317fc49a25fd25628d78 to your computer and use it in GitHub Desktop.
Save ashutoshkarna03/56b85c3e09de317fc49a25fd25628d78 to your computer and use it in GitHub Desktop.
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