In my case the DNS names and SSL certificates are not managed via serverless, so this presupposes that they already exist in Route 53 and Certificate Manager
custom:
stage: ${opt:stage, self:provider.stage}
stageConfig: ${file(<path to config file in step 2>):${self:custom.stage}}
customDomain:
domainName: ${self:custom.stageConfig.domainName}
certificateName: ${self:custom.stageConfig.certificateName}
stage: ${self:custom.stage}
basePath: <whatever you need this to be>
createRoute53Record: false