Configures authorization at the event level.
Configure Auth for a specific API + Path + Method
To declare this entity in your AWS SAM template, use the following syntax:
[AuthorizationScopes](#sam-function-httpapifunctionauth-authorizationscopes): List
[Authorizer](#sam-function-httpapifunctionauth-authorizer): String
AuthorizationScopes
Authorization scopes to apply to this API + Path + Method.
Scopes listed here will override any scopes applied by the DefaultAuthorizer
if one exists.
Type: List
Required: No
AWS CloudFormation Compatibility: This property is unique to AWS SAM and doesn't have an AWS CloudFormation equivalent.
Authorizer
The Authorizer
for a specific Function
If you have specified a Global Authorizer on the API and want to make a specific Function public, override by setting Authorizer
to NONE
.
Type: String
Required: No
AWS CloudFormation Compatibility: This property is unique to AWS SAM and doesn't have an AWS CloudFormation equivalent.
Specifing Authorization at Function level
Auth:
Authorizer: OpenIdAuth
AuthorizationScopes:
- scope1
- scope2