def get_aws_account_id_from_arn(lambda_arn):
    """
    retrieves and return aws account id from an arn

    :param lambda_arn: arn of a calling lambda
    :type lambda_arn: string
    :returns: aws account id
    :rtype: string
    """
    return lambda_arn.split(':')[4]