【发布时间】:2017-08-09 01:32:50
【问题描述】:
我在我的 cloudformation 模板中定义了一个自定义授权方:
MyCustomAuthorizer:
Type: AWS::ApiGateway::Authorizer
Properties:
Name: "MyCustomAuthorizer"
Type: "TOKEN"
AuthorizerUri: "arn:my_lambda"
IdentitySource: "method.request.header.Auth"
RestApiId:
Ref: ApiGatewayApi
我有一个 Api 网关 API:
ApiGatewayApi:
Type: AWS::ApiGateway::RestApi
Properties:
Name: "ApiGatewayApi"
Description: "Api gateway REST API"
Body:
basePath: "/prod"
schemes:
- "https"
paths:
/echo:
get:
consumes:
- "application/json"
produces:
- "application/json"
responses:
"200":
description: "200 response"
schema:
$ref: "#/definitions/schema"
security:
- sigv4: []
如何让/echo 路径专门使用MyCustomAuthorizer?
我可以使用here 的说明在控制台上执行此操作
【问题讨论】:
标签: aws-api-gateway amazon-cloudformation