For AWS::Events::Rule, CloudFormation supports!Ref to return the Rule ID and !GetAtt to return the Rule Arn.
There are cases where the Rule's name is required. For example, CloudWatch metrics for AWS::Events::Rule use the rule name as a dimension. The name can be extracted from the Rule's ID, which takes format <source event bus name>|<rule name>. Given Rule MyEventBridgeRuleResource, we get the name like as follows:
Name of the resource
AWS::Events::Rule
Resource name
No response
Description
For
AWS::Events::Rule
, CloudFormation supports!Ref
to return the Rule ID and!GetAtt
to return the RuleArn
.There are cases where the Rule's name is required. For example, CloudWatch metrics for
AWS::Events::Rule
use the rule name as a dimension. The name can be extracted from the Rule's ID, which takes format<source event bus name>|<rule name>
. Given RuleMyEventBridgeRuleResource
, we get the name like as follows:Whilst the above is a sufficient workaround for now, may
GetAtt
be extended to support name retrieval in addition to ARN?