Conditions: C1: Fn::Equals: - true - true Parameters: UsagePlanType: Type: String Default: PER_API Globals: Api: OpenApiVersion: 3.0.0 Auth: ApiKeyRequired: true UsagePlan: CreateUsagePlan: !Ref UsagePlanType Resources: MyApiOne: Condition: C1 Type: AWS::Serverless::Api Properties: StageName: Prod MyApiTwo: Type: AWS::Serverless::Api Properties: StageName: Prod MyFunctionOne: Type: AWS::Serverless::Function Properties: Handler: index.handler Runtime: nodejs12.x InlineCode: | exports.handler = async (event) => { return { statusCode: 200, body: JSON.stringify(event), headers: {} } } Events: ApiKey: Type: Api Properties: RestApiId: Ref: MyApiOne Method: get Path: /path/one MyFunctionTwo: Type: AWS::Serverless::Function Properties: Handler: index.handler Runtime: nodejs12.x InlineCode: | exports.handler = async (event) => { return { statusCode: 200, body: JSON.stringify(event), headers: {} } } Events: ApiKey: Type: Api Properties: RestApiId: Ref: MyApiTwo Method: get Path: /path/two Outputs: ApiOneUrl: Description: API endpoint URL for Prod environment Value: Fn::Sub: https://${MyApiOne}.execute-api.${AWS::Region}.amazonaws.com/Prod/ ApiTwoUrl: Description: API endpoint URL for Prod environment Value: Fn::Sub: https://${MyApiTwo}.execute-api.${AWS::Region}.amazonaws.com/Prod/