Follow-up to #4491. Tracked in #4607. CloudWatch Logs allows 2 subscription filters per log group.
Problem
E2529 only enumerates AWS::Logs::SubscriptionFilter. SAM CloudWatchLogs events on AWS::Serverless::Function used to expand into those filters; post-#4491 they do not, so >2 SAM events on one log group are not flagged. test_events_log_group_name::test_file_negative was set to expect 0.
Fix
In __get_log_group_name_list, also read AWS::Serverless::Function Events of Type: CloudWatchLogs and merge their LogGroupName into the same per-group buckets as explicit filters.
Acceptance
- Flags >2 SAM events on one group
- Flags mixed explicit+SAM >2 on one group
- Match path at
Resources/<Fn>/Properties/Events/<Id>/...
- isinstance guards for non-dict/intrinsic Events
- Flip
bad/some_logs_stream_lambda.yaml back to 1 error
Follow-up to #4491. Tracked in #4607. CloudWatch Logs allows 2 subscription filters per log group.
Problem
E2529 only enumerates
AWS::Logs::SubscriptionFilter. SAMCloudWatchLogsevents onAWS::Serverless::Functionused to expand into those filters; post-#4491 they do not, so >2 SAM events on one log group are not flagged.test_events_log_group_name::test_file_negativewas set to expect 0.Fix
In
__get_log_group_name_list, also readAWS::Serverless::FunctionEventsofType: CloudWatchLogsand merge theirLogGroupNameinto the same per-group buckets as explicit filters.Acceptance
Resources/<Fn>/Properties/Events/<Id>/...bad/some_logs_stream_lambda.yamlback to 1 error