【发布时间】:2020-11-20 20:33:29
【问题描述】:
我正在尝试使用 api gateway 来运行 dynamo 查询。我正在使用 cloudformation 模板来创建它。 我使用 apigateway 方法创建它,但我不知道如何定义名称来访问 /sender 之类的服务。现在我可以在 / 访问该服务。 而且我也不知道为这个服务定义 OPTIONS 方法。 欢迎任何帮助!
Sender:
Type: 'AWS::ApiGateway::Method'
Properties:
OperationName: Sender-dev
RestApiId: !Ref myApiSite
ResourceId: !GetAtt
- myApiSite
- RootResourceId
HttpMethod: PUT
AuthorizationType: NONE
Integration:
Type: AWS
Uri: "arn:aws:apigateway:us-east-1:dynamodb:action/PutItem"
IntegrationHttpMethod: POST
Credentials: "arn:aws:iam::710072603473:role/dynamo-full"
【问题讨论】:
标签: amazon-web-services amazon-dynamodb amazon-cloudformation aws-api-gateway