gpt4 book ai didi

amazon-web-services - Api 网关与 Event Bridge 的连接出现错误。不支持 Eventbridge-PutEvents

转载 作者:行者123 更新时间:2023-12-03 07:22:12 26 4
gpt4 key购买 nike

我尝试通过无服务器框架创建事件桥连接,但收到 EventBridge-PutEvents is not support 错误。

# Create event bridge integration
EventBridgeIntegration:
DependsOn:
- HttpApiRole
Type: AWS::ApiGatewayV2::Integration
Properties:
ApiId: !Ref HttpApi
Description: Event Bridge integration
IntegrationType: AWS_PROXY
IntegrationSubtype: EventBridge-PutEvents
PayloadFormatVersion: 1.0
CredentialsArn: !GetAtt HttpApiRole.Arn
RequestParameters:
Detail: $request.body.detail
DetailType: $request.body.action
Source: $request.body.source
EventBusName: !GetAtt EventBus.Name

我在上述语句中遇到此错误

错误:CREATE_FAILED:EventBridgeIntegration(AWS::ApiGatewayV2::Integration)操作:不支持EventBridge-PutEvents。 (服务:AmazonApiGatewayV2;状态代码:400;错误代码:BadRequestException;

最佳答案

发现问题了。 PayloadFormatVersion 应该用引号引起来。这为我解决了这个问题。

PayloadFormatVersion: “1.0”

关于amazon-web-services - Api 网关与 Event Bridge 的连接出现错误。不支持 Eventbridge-PutEvents,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74737868/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com