def handler()

in rekognition/create-collection/create-collection.py [0:0]


def handler(event, context):
    responseStatus = 'SUCCESS'
    responseData = {'Message': ''}

    # Rekognition Collection Data
    maxResults=1
    collectionId=os.environ['COLLECTION_NAME']
	
    #Create a collection
    LOGGER.info('Creating collection:' + collectionId)

    sendResponse(event, context, responseStatus, responseData)
    
    if event['RequestType'] == 'Delete':
        response=client.delete_collection(CollectionId=collectionId)
        sendResponse(event, context, responseStatus, responseData)
    elif event['RequestType'] == 'Create':
        response=client.create_collection(CollectionId=collectionId)
        responseData = {'Message': response['CollectionArn']}
        sendResponse(event, context, responseStatus, responseData)