How can I create an API with AWS SAM that does authorization using an authorized Cognito User Pools administrator?
Theres AWS :: ApiGateway :: Authorizer . But...
{ "Type" : "AWS::ApiGateway::Authorizer", "Properties" : { "AuthorizerCredentials" : String, "AuthorizerResultTtlInSeconds" : Integer, "AuthorizerUri" : String, "IdentitySource" : String, "IdentityValidationExpression" : String, "Name" : String, "ProviderARNs" : [ String, ... ], "RestApiId" : String, "Type" : String } }
Does it look like RestApiId refers to the API that this authorizer uses? But with AWS SAM, my APIs are defined as
Resources: Ec2Index: Type: AWS::Serverless::Function Properties: Handler: ec2/index.handler Runtime: nodejs6.10 CodeUri: ./src FunctionName: 'ApiEc2IndexHandler' Description: 'List EC2 resources' Timeout: 30 Role: 'arn:aws:iam::598545985414:role/awsmanagement-lambda-management' Events: Ec2Index: Type: Api Properties: Path: /ec2 Method: get
I donβt understand how can I tie them together?
amazon-web-services amazon-cloudformation amazon-cognito
Jiew meng
source share