[aws_cpi] use another way to do dynamic method calls