in lambda/GameLiftUnreal-CognitoLogin.py [0:0]
def lambda_handler(event, context):
if 'username' not in event or 'password' not in event:
return {
'status': 'fail',
'msg': 'Username and password are required'
}
resp, msg = initiate_auth(event['username'], event['password'])
if msg != None:
return {
'status': 'fail',
'msg': msg
}
return {
'status': 'success',
'tokens': resp['AuthenticationResult']
}