Check the API key of the user.

def check_api_key(email, api_key):
    """Check the API key of the user."""
    table = boto3.resource("dynamodb").Table(os.environ['people'])
    user = table.get_item(Key={'email': email})
    if not user:
        return False
    user = user.get("Item")
    if api_key != user.get('api_key', None):
        return False
    return user