Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove error for Period < 60 for metrics in the AWS namespace #3553

Closed
Willbly opened this issue Aug 1, 2024 · 1 comment · Fixed by #3556
Closed

Remove error for Period < 60 for metrics in the AWS namespace #3553

Willbly opened this issue Aug 1, 2024 · 1 comment · Fixed by #3556

Comments

@Willbly
Copy link

Willbly commented Aug 1, 2024

CloudFormation Lint Version

1.9.1

What operating system are you using?

Windows

Describe the bug

When creating an AWS::CloudWatch:Alarm with a namespace value prefixed with AWS and a period less than 60 a linting error is produced:

E3615 30 is less than the minimum of 60

This error was added in #1059 that seems no longer relevant. I have found no AWS documentation describing this behaviour. The AWS page linked above simply says

The period, in seconds, over which the statistic is applied. This is required for an alarm based on a metric. Valid values are 10, 30, 60, and any multiple of 60.

Expected behavior

No error should be reported by linting.

Reproduction template

  EnvironmentHealthSevereAlarm:
    Type: AWS::CloudWatch::Alarm
    Properties:
      AlarmActions:
        - !ImportValue Core-CloudWatchAlarmTopicArn
      AlarmName: !Sub "[${EnvironmentName}] Environment Health Severe"
      AlarmDescription: !Sub "The environment health of ${EnvironmentName} is severe"
      ComparisonOperator: GreaterThanOrEqualToThreshold
      EvaluationPeriods: 7
      MetricName: EnvironmentHealth
      Namespace: AWS/ElasticBeanstalk
      Period: 30
      Statistic: Maximum
      Threshold: 25
      TreatMissingData: missing
      Dimensions:
        - Name: EnvironmentName
          Value: !Sub "${EnvironmentName}"
@kddejong
Copy link
Contributor

kddejong commented Aug 1, 2024

Updating this rule to validate all periods in relation to the documentation and error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants