cdklabs / cdk-monitoring-constructs

Easy-to-use CDK constructs for monitoring your AWS infrastructure
https://constructs.dev/packages/cdk-monitoring-constructs
Apache License 2.0
468 stars 61 forks source link

[dynamodb] Add support for monitoring replica DynamoDB tables #323

Open mattjt-amzn opened 1 year ago

mattjt-amzn commented 1 year ago

Feature scope

DynamoDB

Describe your suggested feature

cdk-monitoring-constructs is currently unable to create monitors for replica DynamoDB tables created with the replicationRegions property. Passing an ITable created with a replica table's ARN (using fromTableArn) into the DynamoTableMonitoringProps's table property creates widgets for the main table that is being replicated, instead of the desired replica table.

I believe this is currently happening because these lines strip the replica's region info from the final reference by only using the tableName property.