Skip to content

fix(lambda): Raise E2529 CloudWatch Logs subscription filter limit to 5 - #4688

Merged
kddejong merged 1 commit into
aws-cloudformation:mainfrom
kddejong:fix/e2529-cwl-subscription-filter-limit
Sep 9, 2026
Merged

kddejong merged 1 commit into
aws-cloudformation:mainfrom
kddejong:fix/e2529-cwl-subscription-filter-limit

Conversation

@kddejong

@kddejong kddejong commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

CloudWatch Logs now allows up to 5 subscription filters per log group (previously 2). Rule E2529 (EventsLogGroupName) still enforces the old limit of 2, so it incorrectly flags valid templates that attach 3–5 subscription filters to a single log group.

This raises the limit to 5 to match the current quota.

Reference: CloudWatch Logs quotas

Changes

  • Bump limit from 2 to 5 in EventsLogGroupName and update the rule shortdesc/description.
  • Point source_url at the current CloudWatch Logs quotas page.
  • Update the bad fixture (test/fixtures/templates/bad/some_logs_stream_lambda.yaml) so a single log group has 6 subscription filters, exceeding the new limit.
  • Update unit tests to exercise the new boundary (5 passes, 6 fails), covering both explicit AWS::Logs::SubscriptionFilter resources and SAM CloudWatchLogs events.
  • Regenerate docs/rules.md.

Testing

  • pytest test/unit/rules/resources/lmbd/test_events_log_group_name.py — all pass
  • ruff check, ruff format --check, isort, mypy — clean

CloudWatch Logs now allows up to 5 subscription filters per log group
(previously 2). Update E2529 so templates that attach 3-5 subscription
filters to a single log group are no longer incorrectly flagged.

- Bump the limit from 2 to 5 and update the rule shortdesc/description
- Point source_url at the current CloudWatch Logs quotas page
- Update the bad fixture and unit tests to exercise the new boundary
@codecov

codecov Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.65%. Comparing base (0f15d38) to head (abed773).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4688   +/-   ##
=======================================
  Coverage   94.65%   94.65%           
=======================================
  Files         434      434           
  Lines       15528    15528           
  Branches     3011     3011           
=======================================
  Hits        14698    14698           
  Misses        453      453           
  Partials      377      377           
Flag Coverage Δ
unittests 94.65% <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 bfa4984 into aws-cloudformation:main Sep 9, 2026
21 checks passed
@kddejong
kddejong deleted the fix/e2529-cwl-subscription-filter-limit branch September 9, 2026 15:07
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.

1 participant