def get_account_id(context):
    """
    Return the AWS account id for the executing lambda function

    Args:
        context: AWS lambda Context Object http://docs.aws.amazon.com/lambda/latest/dg/python-context-object.html

    Returns:
        str : AWS Account ID

    """
    return str(context.invoked_function_arn.split(':')[4])
