-
Couldn't load subscription status.
- Fork 2.4k
Description
Description
I want to create a request authorizer which performs authentication if Authorization is existed in header. However, when i try to run sam deploy, it occured an error.
Authorizer must specify Identity with at least one of Headers, QueryStrings, StageVariables, or Context
but the official api docs said (identitySource)
When the authorization caching is not enabled, this property is optional.
https://docs.aws.amazon.com/apigateway/api-reference/resource/authorizer/
so I set ReauthorizeEvery to zero so as to disable caching, but it has no effect.
Steps to reproduce
Auth:
Authorizers:
MyRequestAuthorizer:
FunctionPayloadType: REQUEST
FunctionArn: !GetAtt MyRequestAuthorizerFunction.Arn
Identity:
ReauthorizeEvery: 0Observed result
Authorizer must specify Identity with at least one of Headers, QueryStrings, StageVariables, or Context
Expected result
should be able to create a request authorizer with empty identitySource when caching is disabled
noted that i can remove all the identitySources under api gateway dashboard.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
SAM CLI, version 0.44.0
macos 10.15.3