Created
February 24, 2017 10:09
-
-
Save srkiNZ84/a08f3897069117167e6d9473c3f0818e to your computer and use it in GitHub Desktop.
Lambda super simple 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): | |
# TODO implement | |
#return 'Hello from Lambda' | |
# Sample input: | |
# { | |
# "username": "foo", | |
# "password": "bar" | |
# } | |
print('username gotten: ' + event['username']) | |
print('password gotten: ' + event['password']) | |
if(event['username'] == 'srdan' and event['password'] == 'foobar'): | |
print('Login Successful!!') | |
else: | |
print('Access Denied!!!') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment