Skip to content

Instantly share code, notes, and snippets.

@brevityinmotion
Created June 9, 2021 03:41
Show Gist options
  • Save brevityinmotion/eae88513fe7afaf2b3dbae0eb93defcf to your computer and use it in GitHub Desktop.
Save brevityinmotion/eae88513fe7afaf2b3dbae0eb93defcf to your computer and use it in GitHub Desktop.
Code example of a Lambda processing a POST request
def lambda_handler(event, context):
eventinput = json.loads(event['body'])
if eventinput['program'] is None:
return {"isBase64Encoded":False,"statusCode":400,"body":json.dumps({"error":"Missing program name."})}
programName = str(eventinput['program'])
listscopein = list(eventinput['scopein'])
listscopeout = list(eventinput['scopeout'])
programPlatform = str(eventinput['platform'])
inviteType = str(eventinput['invite'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment