import discovery_utils
import boto3
import uuid
import json
import threading
import traceback

##this file needs to have the format
##{
##   authProvider {
##                   clientSpecificKeys: blah,
##                   .....
##   }
##}
auth_settings_file_path = '/tmp/{}{}'.format(uuid.uuid4(), 'auth-settings.json')
s3Config = discovery_utils.get_configuration_bucket()
bucket = s3Config.configuration_bucket
key = 'player-access/auth-settings.json'
auth_settings = None
lock = threading.Lock()

handlers = {
    'amazon': lwa_auth.handler,   
    'google': google_auth.handler,
    'facebook'  : facebook_auth.handler
}

def handler(event, context):
    global auth_settings

    try:
import discovery_utils
import boto3
import uuid
import json
import threading
import traceback

##this file needs to have the format
##{
##   authProvider {
##                   clientSpecificKeys: blah,
##                   .....
##   }
##}
auth_settings_file_path = '/tmp/{}{}'.format(uuid.uuid4(), 'auth-settings.json')
s3Config = discovery_utils.get_configuration_bucket()
bucket = s3Config.configuration_bucket
key = 'player-access/auth-settings.json'
auth_settings = None
lock = threading.Lock()

handlers = {
    'amazon': lwa_auth.handler,   
    'google': google_auth.handler,
    'facebook'  : facebook_auth.handler
}

def handler(event, context):
    global auth_settings

    try: