Last active
November 28, 2016 21:44
-
-
Save srkiNZ84/37a71dbb7f111dfc7265bbe0cf885128 to your computer and use it in GitHub Desktop.
Simple AWS lambda function to demo "login"
This file contains 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
from __future__ import print_function | |
import json | |
print('Loading login function') | |
def lambda_handler(event, context): | |
print('username gotten: ' + event['username']) | |
print('password gotten: ' + event['password']) | |
if(event['username'] == 'foo' and event['password'] == 'barbaz'): | |
print('Login Successful!!') | |
else: | |
print('Access Denied!!!') |
This file contains 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
{ | |
"username": "foo", | |
"password": "barbaz" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment