[SOLVED] AWS Cloudwatch - dimension_values filter for ApiGateway Resources

Hi all,

I’m trying to wrap my head around a particular template filter. What I need:

  • Obtain list of ApiGateway endpoints (Resources) filtered by Apiname dimension.

Been messing around with a couple of things already but can’t seem to get this one right. What I’ve got so far is along the lines of:

dimension_values(eu-west-1,AWS/ApiGateway,Count,Resource,{"Name":"ApiName","Value":$api_gateway}) ($api_gateway is another variable).

When I try this, I get the following error:

Template variables could not be initialized: JSON.parse: unexpected character at line 1 column 27 of the JSON data

Would appreciate any pointer in the right direction (or an example of using values in filter and/or example of using variable in the filter).

Thanks

Ok, seems like I just needed to insist a little more. Got it working with:

dimension_values(eu-west-1, AWS/ApiGateway, Count, Resource, {"ApiName":"$api_gateway" })