You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EventPattern accepts Null value as per EventBridge service [1] ,even CDK documentation [2] mention that EventPattern can have null values. However CloudFormation service does not accept Null value when defined for EventPattern. Template fails in validation with following error - 'null' values are not allowed in templates
nmeisen
changed the title
Received ''null' values are not allowed in templates'' while creating AWS::Events::Rule-> EventPattern
Received ''null' values are not allowed in templates'' while creating AWS::Events::Rule -> EventPattern
Mar 18, 2024
Hi,
Do you have any solution for this problem? Is this fixed? I am unable to use null check in eventbridge pattern using yaml cloudformation template. @rohan-1995
My colleague had a brilliant hacky idea and it seems to work. Since the property EventPattern is a JSON type, it also supports a stringified JSON object, where null values are allowed.
Name of the resource
AWS::Events::Rule
Resource Name
No response
Issue Description
EventPattern accepts Null value as per EventBridge service [1] ,even CDK documentation [2] mention that EventPattern can have null values. However CloudFormation service does not accept Null value when defined for EventPattern. Template fails in validation with following error - 'null' values are not allowed in templates
[1] https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns-null-values.html
[2] https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.EventPattern.html
Expected Behavior
AWS::Events::Rule should accept null values for 'EventPattern' property
Observed Behavior
template does not pass validation and throws error - 'null' values are not allowed in templates
Test Cases
Create EventBridge rule with EventPattern having null value in CFN template
Other Details
No response
The text was updated successfully, but these errors were encountered: