https://serverless-stack.com/ logo
#help
Title
# help
g

Greg Martin

01/12/2022, 4:28 PM
I am having some trouble deploying the React portion to AWS. I haven't tried PROD yet, but I am not ready for this to be "prod" and we have a Wordpress site running where prod will be and it needs to stay up for now. But when I try to deploy to something other than PROD, I am getting errors. Here are what I think are the relevant lines in FrontendStack.js ...
Copy code
customDomain:
    scope.stage === "prod"
        ? {
            domainName: "<http://colemanrodeo.com|colemanrodeo.com>",
            domainAlias: "<http://wwww.colemanrodeo.com|wwww.colemanrodeo.com>",
        }
        : {
            domainName: scope.stage + ".<http://colemanrodeo.com|colemanrodeo.com>",
        },              
    path: "frontend",
Help would be most appreciated. 🙂
f

Frank

01/25/2022, 6:55 AM
Hey @Greg Martin, sorry for the late follow up. Did you get this to work?
Is the domain
<http://colemanrodeo.com|colemanrodeo.com>
hosted on AWS Route 53?
If so, can you try specifiying the hosted zone in the custom domain config like this
Copy code
customDomain:
    scope.stage === "prod"
        ? {
            domainName: "<http://colemanrodeo.com|colemanrodeo.com>",
            domainAlias: "<http://wwww.colemanrodeo.com|wwww.colemanrodeo.com>",
            hostedZone: "<http://colemanrodeo.com|colemanrodeo.com>",
        }
        : {
            domainName: scope.stage + ".<http://colemanrodeo.com|colemanrodeo.com>",
            hostedZone: "<http://colemanrodeo.com|colemanrodeo.com>",
        },              
    path: "frontend",
3 Views