Resources: MyApiWithAuthSource: Type: AWS::Serverless::Api Properties: StageName: Prod Auth: ApiKeyRequired: true ApiKeySourceType: AUTHORIZER MyFunctionWithApiKeyRequiredTrue: Type: AWS::Serverless::Function Properties: CodeUri: s3://bucket/key Handler: index.handler Runtime: nodejs12.x Events: MyApiWithApiKeyRequiredTrue: Type: Api Properties: RestApiId: !Ref MyApiWithAuthSource Path: /ApiKeyTrue Method: get Auth: ApiKeyRequired: true