如何解决如何在 serverless/cloudformation 中为合作伙伴事件总线创建事件规则
我正在尝试为合作伙伴事件总线创建一个事件规则,即 arn:aws:events:{region}:{accountId}:event-bus/aws.partner/appflow/salesforce.com/{accountId}
将所有事件发送到无服务器中的 SQS 队列,但运气不佳,我一直遇到此错误:
Serverless Error ----------------------------------------
An error occurred: SFSubscriptionPartnerEventsRule - EventBus name starting with 'aws.' is not valid. (Service: AmazonCloudWatchEvents; Status Code: 400; Error Code: ValidationException; Request ID: ; Proxy: null).
就上下文而言,合作伙伴事件总线名称是在创建 appflow 时自动生成的,因此无法避免名称中包含 aws
。
我可以通过 AWS 控制台(即 arn:aws:events:{region}:{accountId}:rule/aws.partner/appflow/salesforce.com/{accountId}/myPartnerEventRule1
)创建它,但是通过无服务器/cloudformation 创建它真的很困难。
这里是 cloudformation 的相关部分:
Type: AWS::Events::Rule
Properties:
Description: 'write salesforce subscription event to sqs'
Name: 'events-${self:custom.deployingStage}-sfsubscriptionevent-sfsubscriptionsqs'
EventBusName:
Fn::GetAtt:
- CustomerPlatformSFPartnerEventBus
- Arn
EventPattern:
account:
- Ref: 'AWS::AccountId'
State: ENABLED
Targets:
- Arn:
Fn::GetAtt:
- SFSubscriptionToCustomerPlatformQueue
- Arn
Id: '${self:custom.queue.sfSubscriptionToCustomerPlatformQueue}'
尝试了一些无济于事:
- 将无服务器更新到最新版本 2.51
- 我想知道您是否将事件规则创建为应用流定义 AWS::AppFlow::Flow 的一部分,但在文档中找不到任何内容;也许我瞎了。
- 如果我将 EventBusName: 值更改为
Fn::ImportValue: 'DefaultEventBusARN-${self:custom.deployingStage}'
,即它部署的非合作伙伴事件总线,则“排除”其他任何事情。但我想要合作伙伴事件总线上的规则。
有什么想法吗?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。