Skip to content

Latest commit

 

History

History
48 lines (34 loc) · 1.85 KB

sam-property-function-httpapifunctionauth.md

File metadata and controls

48 lines (34 loc) · 1.85 KB

HttpApiFunctionAuth

Configures authorization at the event level.

Configure Auth for a specific API + Path + Method

Syntax

To declare this entity in your AWS SAM template, use the following syntax:

YAML

  [AuthorizationScopes](#sam-function-httpapifunctionauth-authorizationscopes): List
  [Authorizer](#sam-function-httpapifunctionauth-authorizer): String

Properties

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.

Examples

Function-Auth

Specifing Authorization at Function level

YAML

Auth:
  Authorizer: OpenIdAuth
  AuthorizationScopes:
    - scope1
    - scope2