How to map a domain from AWS to Cloudrun

By:

It’s hard to convey how big a fan of GCP Cloudrun I am. We started using it as a testing ground for APIs before “promoting” them to Kubernetes, however now we’re keeping production services on Cloudrun, and basking in it’s minimal overhead and flexibility.

With that in mind we’re migrating over services from AWS, which means mapping existing Route 53 zones over to Cloudrun. Here’s our guide.

In this case we need to map  “api.theAnalyticsapi.com” to an existing Cloudrun service called “tanalytics-collector-api”

Step 1. Cloudrun -> Manage Custom Domains

Step 2. Click “Add Mapping”

Step 3. Select your service, “Verify a new domain” and add the base domain (the Route 53 Zone) – in my case “theanalyticsapi.com”

Step 4. We now need to prove to Google that we own the domain, so click “Verify in webmaster Central” which will open the Webmaster page in a new tab.

Step 5. Select “Other” as the provider, then copy the “google-site-verification….” line

Step 6. In a new browser Tab – Open the Zone in AWS Route 53

Step 7. Click “Create Record”, and add a TXT record using the “google-site-verification…” link

Step 8. Go back to Webmaster tab, and click “Continue Verification and Close” (for me this was instantaneous, however for some domains it may take some time for a TXT record to propagate)

Step 9. Go back to the original Cloudrun tab, and click “Add Mapping” again. Your domain should now be selectable in the list. Add the subdomain you wish to map, for me this was “api”

Step 10. Click “Continue” and copy the CNAME “ghs.googlehosted.com.”, and click “DONE”. This will a while to setup, so carry on with the AWS mapping.

Step 11. Go back to the Route 53 tab, and create a new CNAME record for the same subdomain

Step 12. Wait for the new CNAME to be setup and resolve in both platforms (usually under 20mins), then you should be able to use the new AWS Subdomain with your fancy Cloudrun service

Comments are closed.

Recommended

Apidays Australia 2024- Curiosity and The Cat API

In his recent API Days talk, Curiosity and The Cat API, founder Aden Forshaw shares the story behind The Cat API’s growth from a fun educational tool to a premium product for commercial use. Highlighting the essentials of API success—such as clear documentation and responsive support—Aden’s insights provide a valuable roadmap for developers and businesses alike.

Read More »
API Unbundling

Unbundling API Management Platforms

The unbundling of API management platforms is reshaping how companies manage their APIs, shifting from monolithic solutions to specialized, cloud-native tools. This approach offers greater flexibility, faster innovation, and more control over individual components, empowering teams to tailor their API strategy to specific needs.

Read More »

API Days London Recap

The API Days conference in London brought together industry leaders to discuss the latest trends in API technology, including AI integration and the unbundling of API management platforms. From insightful keynotes to hands-on workshops, the event offered valuable insights into the evolving API landscape and provided networking opportunities for developers, product managers, and API enthusiasts alike.

Read More »