我正在尝试为合作伙伴事件总线创建事件规则,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
- 我想知道您是否将事件规则创建为 appflow 定义 AWS::AppFlow::Flow 的一部分,但在文档中找不到任何内容;也许我是盲人。
Fn::ImportValue: 'DefaultEventBusARN-${self:custom.deployingStage}'
如果我将 EventBusName: 值更改为它部署好的非合作伙伴事件总线,则“排除”其他任何内容。但我想要合作伙伴事件总线上的规则。
有任何想法吗?