- Newest
- Most votes
- Most comments
You are correct in identifying an issue with the regex pattern for the Tier parameter in the AWS::ApplicationInsights::Application ComponentMonitoringSetting resource. The current regex pattern (^[A-Z][[A-Z]_]*$) is indeed incorrect and does not allow valid values like DEFAULT or SQL_SERVER.
This appears to be a documentation error in the CloudFormation resource specification. The correct regex pattern should be (^[A-Z][A-Z_]*$), which would allow for uppercase letters and underscores after the first character, matching the allowed values like DEFAULT, SQL_SERVER, and POSTGRESQL.
To work around this issue while waiting for AWS to correct the documentation and schema, you have a few options:
-
Use the AWS CLI or SDK to create and manage your Application Insights application instead of CloudFormation. This bypasses the CloudFormation validation.
-
If you must use CloudFormation, you could try using the AWS::ApplicationInsights::Application resource without specifying the Tier property in ComponentMonitoringSettings. Instead, rely on the ComponentConfigurationMode set to DEFAULT, which should apply recommended settings based on the component type.
-
Another option is to create a custom resource in CloudFormation that uses the AWS SDK to create and manage the Application Insights application. This allows you to bypass the CloudFormation resource's validation while still managing the resource through your CloudFormation stack.
It's recommended to report this issue to AWS support so they can correct the documentation and the underlying schema for the CloudFormation resource. In the meantime, one of the above workarounds should allow you to proceed with your deployment.
Sources
AWS::ApplicationInsights::Application ComponentMonitoringSetting - AWS CloudFormation
Create and configure CloudWatch Application Insights monitoring using CloudFormation templates - Amazon CloudWatch
Using regular expressions in CloudFormation templates - AWS CloudFormation
Relevant content
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a month ago