
[英]SAM Template for AWS Api Gateway Integration with S3 as AWS Service
[英]Creating an API Gateway AWS Integration with S3
我想设置API网关以从S3上的特定存储桶中检索文件。
Cloudformation模板中资源的GET
方法如下所示:
GetMethod:
Type: "AWS::ApiGateway::Method"
Properties:
HttpMethod: GET
ApiKeyRequired: true
AuthorizationType: NONE
RequestParameters:
'method.request.path.listId': true
RestApiId:
Ref: ApiGatewayRestApi
ResourceId:
Ref: Lists
Integration:
Type: aws
Credentials:
Ref: S3ReadAccessRole
IntegrationHttpMethod: GET
PassthroughBehavior: WHEN_NO_MATCH
RequestParameters:
'integration.request.path.key': 'method.request.path.listId'
我在指定要集成的S3 URI时遇到问题。 我做了以下没有成功:
S3 URI: arn:aws:s3:::lists/groceries/{key}
基于API网关的uri基于本文 。 arn:aws:apigateway:us-west-2:s3:lists/groceries/{key}
请帮我找出正确的URI,以便直接使用API Gateway检索S3上的对象。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.