Skip to content

Instantly share code, notes, and snippets.

@srkiNZ84
Created February 24, 2017 10:09
Show Gist options
  • Save srkiNZ84/a08f3897069117167e6d9473c3f0818e to your computer and use it in GitHub Desktop.
Save srkiNZ84/a08f3897069117167e6d9473c3f0818e to your computer and use it in GitHub Desktop.
Lambda super simple login
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