Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save brevityinmotion/57c9edd7ce19fd50cd545d7a2170927f to your computer and use it in GitHub Desktop.
Save brevityinmotion/57c9edd7ce19fd50cd545d7a2170927f to your computer and use it in GitHub Desktop.
This example shows the receiving code within a Python Lambda to retrieve the task token for a callback
import json, boto3, os, re
def lambda_handler(event, context):
if event['program'] is None:
return {"isBase64Encoded":False,"statusCode":400,"body":json.dumps({"error":"Missing program name."})}
if event['operation'] is None:
return {"isBase64Encoded":False,"statusCode":400,"body":json.dumps({"error":"Missing operation name."})}
else:
operationName = str(event['operation'])
programName = str(event['program'])
taskToken = str(event['token'])
stepFunctionsStatus = generateScriptStepFunctions(programName, taskToken, operationName)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment