如何使用CloudFormation或CDK将另一个AWS账户的事件总线指定为CloudWatch规则的目标?
以下是使用CDK创建示例规则的示例,我试图将CodeDeploy事件发送到另一个账户:
Rule codedeployCreateDeploymentEventRule = Rule.Builder.create(this, "CodedeployCreateDeploymentEventRule")
.description("CloudWatch event rule covering CodeDeploy CreateDeployment notifications.")
.ruleName("MyRule")
.enabled(true)
.targets(List.of(...something here...))
.eventPattern(EventPattern.builder()
.source(List.of("aws.codedeploy"))
.detail(Map.of("eventName", List.of("CreateDeployment")))
.build())
.build();
如何将另一个账户的EventBus指定为目标?语法是什么 - 是ARN还是其他什么?