Resources: MyApiWithoutAuth: Type: AWS::Serverless::Api Properties: StageName: Prod MyFunctionWithApiKeyRequired: Type: AWS::Serverless::Function Properties: CodeUri: s3://bucket/key Handler: index.handler Runtime: nodejs12.x Events: MyApiWithApiKeyRequired: Type: Api Properties: RestApiId: !Ref MyApiWithoutAuth Path: /ApiKeyRequiredTrue Method: get Auth: ApiKeyRequired: true MyApiWithApiKeyRequiredAnyMethod: Type: Api Properties: RestApiId: !Ref MyApiWithoutAuth Path: /any/ApiKeyRequiredTrue Method: any Auth: ApiKeyRequired: true