Skip to content

fix(E3615): Allow a CloudWatch alarm Period of 20 - #4905

Merged
kddejong merged 1 commit into
aws-cloudformation:mainfrom
Thanatos9404:fix/e3615-period-20
Oct 27, 2026
Merged

kddejong merged 1 commit into
aws-cloudformation:mainfrom
Thanatos9404:fix/e3615-period-20

Conversation

@Thanatos9404

Copy link
Copy Markdown
Contributor

Issue #, if available:

Fixes #4835

Description of changes:

E3615 rejected Period: 20 on AWS::CloudWatch::Alarm. The AWS::CloudWatch::Alarm reference lists 10, 20, 30, 60 and any multiple of 60 as valid, and the PutMetricAlarm API reference also allows 20. This adds 20 to the enum in period.json and to the rule's description and message. Values like 15 and 45 are still reported. The unit tests now cover 20 as an integer and as a string. The rule tests and pre-commit pass, and the full suite shows no new failures.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

E3615 rejected Period: 20 on AWS::CloudWatch::Alarm. CloudWatch accepts
20 seconds for high-resolution alarms: the AWS::CloudWatch::Alarm
reference lists the valid values as 10, 20, 30, 60 and any multiple of
60, and the PutMetricAlarm API reference also allows 20.

Add 20 to the enum in aws_cloudwatch_alarm/period.json and to the rule's
description and message. Values such as 15 and 45 are still reported.

Fixes aws-cloudformation#4835
@kddejong
kddejong force-pushed the fix/e3615-period-20 branch from 3346ba7 to 4195285 Compare October 26, 2026 20:52
@codecov

codecov Bot commented Oct 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.68%. Comparing base (0a02f1b) to head (4195285).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4905   +/-   ##
=======================================
  Coverage   94.68%   94.68%           
=======================================
  Files         441      441           
  Lines       16067    16067           
  Branches     3116     3116           
=======================================
  Hits        15213    15213           
  Misses        470      470           
  Partials      384      384           
Flag Coverage Δ
unittests 94.67% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kddejong
kddejong merged commit 91dad67 into aws-cloudformation:main Oct 27, 2026
24 of 25 checks passed
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 this pull request may close these issues.

E3615: AWS::CloudWatch::Alarm Period: 20 rejected, documented as valid

2 participants