Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
HashTag Lambda Function
import subprocess, json
def lambda_handler(event, context):
command = ['python','HashTag.py', '-sh', event['pathParameters']['hash']]
process = subprocess.Popen(command, shell=False, stdout=subprocess.PIPE)
message = process.stdout.read()
response = {
"isBase64Encoded": False,
"statusCode": 200,
"headers": {},
"body": message
}
return response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.