Conditions: C1: Fn::Equals: - true - true Parameters: MyDomainCert: Type: String Default: another-api-arn EndpointConf: Type: String Default: REGIONAL MyMTLSUri: Default: another-api-truststore-uri Type: String MyMTLSVersion: Default: another-api-truststore-version Type: String Resources: MyFunction: Condition: C1 Type: AWS::Serverless::Function Properties: InlineCode: | exports.handler = async (event) => { const response = { statusCode: 200, body: JSON.stringify('Hello from Lambda!'), }; return response; }; Handler: index.handler Runtime: nodejs12.x Events: Api: Type: Api Properties: RestApiId: !Ref MyApi Method: Put Path: /get ImplicitGet: Type: Api Properties: Method: Post Path: /implicit MyApi: Condition: C1 Type: AWS::Serverless::Api Properties: OpenApiVersion: 3.0.1 StageName: Prod Domain: DomainName: !Sub 'example-${AWS::Region}.com' CertificateArn: !Ref MyDomainCert EndpointConfiguration: !Ref EndpointConf BasePath: [/get, /fetch] MutualTlsAuthentication: TruststoreUri: !Ref MyMTLSUri TruststoreVersion: !Ref MyMTLSVersion SecurityPolicy: TLS_1_2