Skip to content

Instantly share code, notes, and snippets.

@nktstudios
Last active February 7, 2024 13:49
Show Gist options
  • Save nktstudios/8418b51fb8bd720c352f22db52e568b5 to your computer and use it in GitHub Desktop.
Save nktstudios/8418b51fb8bd720c352f22db52e568b5 to your computer and use it in GitHub Desktop.
AWS Lambda Deployment Package in Python
import json
import pandas as pd
import numpy as np
import requests
def lambda_handler(event, context):
pandas_version = pd.__version__
numpy_version = np.__version__
r = requests.get("https://www.google.com")
google_status_code = r.status_code
return_statement = 'Pandas Version: ', pandas_version, 'Numpy Version: ', numpy_version,\
'Google Status Code: ', google_status_code
return {
'statusCode': 200,
'body': json.dumps(return_statement)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment