serverless-components / graphql

⚡ Deploy and manage GraphQL applications on serverless infrastructure easily, cheaply and scale massively.
https://serverless.com
Apache License 2.0
50 stars 3 forks source link

custom domain + region doesn't work together #2

Open xiaoxinghu opened 4 years ago

xiaoxinghu commented 4 years ago

When I set domain and region (to value other than us-east-1) together in my serverless.yml, I got the following error message when trying to deploy:

InvalidViewerCertificate: The specified SSL certificate doesn't exist, isn't in us-east-1 region, isn't valid, or doesn't include a valid certificate chain.

I have the domain all setup in Route53, and when I remove the region setting, it works fine, so that eliminates the possibility of mis-configed domains. But the resource is deployed to us-east-1, which is not what I wanted.

According to aws doc here

The certificate must be imported in the US East (N. Virginia) Region.

With my limited knowledge of AWS and serverless framework, my theory is that the region config is used by the process to import the certificate. I think we should hard code it to use us-east-1 right now given it's a hard requirement from AWS officially.

eahefnawy commented 4 years ago

Thanks for reporting @xiaoxinghu ... I'll look into it asap