Select CloudWatch Stat From Variable

I’m trying to set the ‘Stats’ query by using a variable but it is not working.
It throws the error “InvalidParameterValue: The value $stat for parameter ExtendedStatistic.member1 is not supported.”
Using a variable works fine for selecting the metric, but not for the stat.

No, the variable is not supported there.

Thanks, have I used it in the wrong place or is what I’m trying to do just not possible?
As, if you allow users to select a metric then you must be able to change the stat, because some CloudWatch metric only make sense if you pull Sum and some only make sense if you pull Average, e.t.c.

I don’t allow anything - I’m just an ordinary community member.

I just gave you current state: it is not supported = it is not possible to use a variable in the Stat field. I agree that is not perfect.

Feel free to create feature request or better option will be if you fix it and create pull request so everyone will benefit from your contribution.

Thanks for your reply. I’ll raise it.