Created
July 28, 2021 04:02
-
-
Save brevityinmotion/614ad0e3c4e18cdd07c30f2cd018e310 to your computer and use it in GitHub Desktop.
Example code to load a program via POST request to Lambda
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 | |
import brevityprogram.programs | |
import brevityscope.scope | |
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