Created
July 1, 2021 05:33
-
-
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
This file contains hidden or 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, 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