策略示例:向 Amazon EventBridge 中其他账户中的自定义总线发送事件
以下策略示例向账户 111122223333 授予权限,向账户 123456789012 中的 central-event-bus
发布事件,但仅适用于源值设置为 com.exampleCorp.webStore
、detail-type
设置为 newOrderCreated
的事件。
{ "Version": "2012-10-17", "Statement": [ { "Sid": "WebStoreCrossAccountPublish", "Effect": "Allow", "Action": [ "events:PutEvents" ], "Principal": { "AWS": "arn:aws:iam::111112222333:root" }, "Resource": "arn:aws:events:us-east-1:123456789012:event-bus/central-event-bus", "Condition": { "StringEquals": { "events:detail-type": "newOrderCreated", "events:source": "com.exampleCorp.webStore" } } } ] }