1개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
0
【以下的回答经过翻译处理】 不了解你的Cloudformation版本的情况下,很难说,无论如何,您链接的文章讨论的是API网关和Lambda之间的集成,而不是从API网关公开的方法。
举个例子,您可以看到有“HttpMethod”和“IntegrationHttpMethod” HttpMethod可以是允许的任何API网关方法,但IntegrationHttpMethod需要是POST
apiGatewayRootMethod:
Type: AWS::ApiGateway::Method
Properties:
AuthorizationType: NONE
HttpMethod: GET
Integration:
IntegrationHttpMethod: POST
Type: AWS_PROXY
Uri: !Sub
- arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${lambdaArn}/invocations
- lambdaArn: !GetAtt lambdaFunction.Arn
ResourceId: !GetAtt apiGateway.RootResourceId
RestApiId: !Ref apiGateway
관련 콘텐츠
- AWS 공식업데이트됨 일 년 전
- AWS 공식업데이트됨 일 년 전
- AWS 공식업데이트됨 2년 전