Parameters: StageName: Type: String Default: MyOwnStage Conditions: C1: Fn::Equals: - true - true Globals: Api: Auth: ResourcePolicy: CustomStatements: Fn::If: - C1 - Action: execute-api:Invoke Resource: - execute-api:/*/*/* - Action: execute-api:Blah Resource: - execute-api:/*/*/* Resources: ExplicitApiFunction: Type: AWS::Serverless::Function Properties: CodeUri: s3://sam-demo-bucket/member_portal.zip Handler: index.gethtml Runtime: nodejs12.x Events: GetHtml: Type: Api Properties: RestApiId: Ref: ExplicitApi Path: / Method: get ExplicitApi: Type: AWS::Serverless::Api Properties: StageName: !Ref StageName DefinitionBody: swagger: 2.0 info: version: '1.0' title: !Ref AWS::StackName paths: /: get: x-amazon-apigateway-integration: httpMethod: POST type: aws_proxy uri: !Sub arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${ExplicitApiFunction.Arn}/invocations responses: {} x-amazon-apigateway-policy: Version: '2012-10-17' Statement: Action: sts:AssumeRole Effect: Allow Principal: Service: lambda.amazonaws.com AnotherApi: Type: AWS::Serverless::Api Properties: StageName: !Ref StageName Auth: ResourcePolicy: CustomStatements: Fn::If: - C1 - Action: execute-api:Invoke Resource: - execute-api:/*/*/* - Action: execute-api:Another Resource: - execute-api:/*/*/*