I’m in the same challenge: when I deploy, each environment is in its own AWS account, but there’s only one account which owns the Route53 (DNS) domain. Like @bill , when I deploy my “dev” Serverless Lambdas, I want them to appear in
dev.example.com, where example.com is controlled by the Prod AWS account.
- deploy Dev like normal, put a CNAME in the Prod account pointing to it (@jonsmirl 's solution)
This solution is simple. As a Dev I do my Serverless deploy, using my Dev account. It spits out a long URL, like https://6dzyltptt3.execute-api.us-east-1.amazonaws.com. If I curl this domain, I get “hello world” like expected.
If I set up a CNAME in the Prod account, pointing to 6dzyltptt etc, it doesn’t work as expected. The certificate isn’t set up correctly:
$ curl https://6dzyltptt3.execute-api.us-east-1.amazonaws.com/development/hello
Hello, world! 23:37:52
$ curl https://beer-dev.example.com/development/hello
curl: (35) error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
I like the idea of having “static” and “dynamic” files!
Any ideas how we can get cross-account Serverless environments working?