Created
September 2, 2018 11:14
-
-
Save yasuabe/95ea7ad7eb2c5243b25b744136500bf5 to your computer and use it in GitHub Desktop.
slack-ops-test2-func: handling challenge event
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 | |
import logging | |
logger = logging.getLogger() | |
logger.setLevel(logging.INFO) | |
def lambda_handler(event, context): | |
logger.info(json.dumps(event)) | |
if ('challenge' in event): | |
return { | |
"statusCode": 200, | |
"body": json.dumps({'challenge': event['challenge']}) | |
} | |
else: | |
return { "statusCode": 200 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment