Domain is created in the wrong region
See original GitHub issueI have a serverless app that I am deploying to us-west-2
. My ACM certificate is in us-east-1
like it should be.
However, when I run sls create-domain
, it successfully makes the domain in us-east-1
:
Serverless: 'api.example.app' was created/updated. New domains may take up to 40 minutes to be initialized.
When I run sls deploy
, it fails since it cannot find the domain in us-west-2
:
Error --------------------------------------------------
Error: Could not set up basepath mapping. Try running sls create_domain first.
Error: Error: 'api.example.app' could not be found in API Gateway.
NotFoundException: Invalid domain name identifier specified
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
Files
serverless.yml
# ...
custom:
customDomain:
domainName: api${self:provider.variables.apiDomainName}
basePath: ''
stage: ${self:provider.stage}
createRoute53Record: true
# ...
Possible Solution?
Perhaps when the API Gateway object gets created, a region can be passed to it that is set from the custom
section in the yml file?
this.apigateway = new AWS.APIGateway({ region: customRegion || 'us-east-1' });
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (2 by maintainers)
Top Results From Across the Web
International domains
International domains help search engines display the correct region-specific domain when your store appears in search results. For example, search results for ...
Read more >Solved: Default environment created in wrong region
My default environment is located in the US but the admin account is connected to a Canadian domain. I understand that I cannot...
Read more >Wrong region - Google Search Community
Wrong region · Open the Google country domain you want to use for searching (e.g., https://www.google.de) · Open Settings > Search settings ·...
Read more >How to change region? - Render
Start a new Web Service and database with new region. Do not change A Record. Add old domain address to new Web Service....
Read more >Deploy domain controllers in additional regions
This page also shows you how to add or remove a region from your domain. Managed Microsoft AD supports multiple regions. Combined with...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I had the exact same issue as ascheucher, one solution is to use the certificateArn property instead of the certificateName property, then the certificate can be in any region while you still do the api gateway calls in the correct region.
So I also had the same issue. After spending a lot of time digging around I got it to work. Here is the answer/solution.
Certificates for CloudFront can only be in the us-east-1 region. Refer This
Add region to provider as