Skip to content

Instantly share code, notes, and snippets.

@yasuabe
Created September 2, 2018 11:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yasuabe/95ea7ad7eb2c5243b25b744136500bf5 to your computer and use it in GitHub Desktop.
Save yasuabe/95ea7ad7eb2c5243b25b744136500bf5 to your computer and use it in GitHub Desktop.
slack-ops-test2-func: handling challenge event
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