Noah D
11/25/2021, 7:47 AMCannot convert undefined or null to object
Noah D
11/25/2021, 7:48 AMNoah D
11/25/2021, 7:48 AMRoss Coundon
11/25/2021, 7:49 AMNoah D
11/25/2021, 7:49 AM<http://mydomain.com/stack1|mydomain.com/stack1> & <http://mydomain.com/stack2|mydomain.com/stack2>
Noah D
11/25/2021, 7:50 AMRoss Coundon
11/25/2021, 7:57 AMNoah D
11/25/2021, 8:00 AMNoah D
11/25/2021, 8:06 AMNoah D
11/25/2021, 8:35 AM{
domainName: apiGatewayDomain || `api.${URL}`,
hostedZone: apiGatewayDomain ? undefined : URL,
path: serviceName.toLowerCase(),
}
When trying to give my apis a customDomain, the hostedZone
property seemed to throw an error even if it is declared as undefined. I need to declare hosted zone on the first api I setup, however after this, all which use the apiGatewayDomain should not reference a hostedZone property at allNoah D
11/25/2021, 9:59 AMFrank
Frank
.build/cdk.out
Noah D
11/25/2021, 11:09 PMgetUrlForStage
is defined as follows
const getUrlForStage = (
stage: string,
serviceName: string,
apiGatewayDomain?: DomainName,
): ApiCustomDomainProps => {
if (stage === DeploymentStage.Prod) {
return {
domainName: apiGatewayDomain || `api.${URL}`,
hostedZone: apiGatewayDomain ? undefined : URL,
path: serviceName.toLowerCase(),
};
}
return {
domainName: apiGatewayDomain || `${stage}.api.${URL}`,
hostedZone: apiGatewayDomain ? undefined : URL,
path: serviceName.toLowerCase(),
};
};
Noah D
11/25/2021, 11:10 PMNoah D
11/25/2021, 11:14 PMcustomDomain
property to not include hostedZone
for the stack which was dependant on the apiGatewayDomain
however seemed to start happening again soon after and not sure what I did to break itFrank
Frank
aws cloudformation list-exports
from your terminal to list out all the Export outputs in the account/region. And then look for the export with the name that CloudFormation claims already exists, ie. noah-mend-journal:ExportsOutputRefjournalApiDomainName1FC606F266B7C5E9
Frank
Noah D
12/27/2021, 11:50 AM