Adding Custom domain - referring to deployment

Hey Crew,

I’ve got a few decent working SLS stacks going on but have run into a little wrinkle with a custom domain.

I have the custom domain working but at this stage I need to deploy the stack once then uncomment the path mapping element:

Type: AWS::ApiGateway::BasePathMapping
BasePath: ${opt:basePath, self:custom.defaultBasePath}
DomainName: ${opt:domainName, self:custom.defaultDomain}
Ref: ApiGatewayRestApi
Stage: ${opt:stage, self:custom.defaultStage}
DependsOn: ?

My question basically is:
Can I something in DependsOn to allow this to be added without the second deployment? I tried DependsOn: “ApiGatewayDeployment” but this doesn’t take into account the random number at the end of the deployment name.


1 Like