Sign in

Enable custom names for your internal API’s, with CDK Example

AWS API Gateway Private is the ideal way to front our internal applications and services, but there’s one frustrating limitation — you cannot assign a custom domain name to a private API like you do with one that is public facing.

This leads to internal API’s with less than friendly names like:

https://abcdefsxthl.execute-api.ap-southeast-1.amazonaws.com/v1

Or if you need the name to resolve for remote users (VPN or on-prem over Direct Connect), then it would look like this:

https://abcdefsxthl-vpce-aaaaff0d0673c9999.execute-api.ap-southeast-1.amazonaws.com/v1

Either way, it’s a pain to remember! What’s worse if it’s redeployed for…


Now the infrastructure really is code, and it’s a game changer

Photo by Chris Briggs on Unsplash

I believe AWS CDK is a game-changer.

I’ve been using CloudFormation on AWS since it was first introduced, but it never felt like code. Terraform and Serverless are just more specialised (or cross-platform) versions of the same.

With CDK the infrastructure really is code. With loops, and reusable constructs, and unit tests, and all the other goodness that comes with real programming languages. This is a good thing. Some of the modules and microservices I’ve migrated to CDK require CloudFormation templates of more than 1000 lines of code (although…


Using shared services to deploy code from dev into prod

Pipeline Workflow

Cross account pipelines are a pretty common scenario, and recommended by AWS amongst others as a best practice, but complete documentation on how to do it with CDK Pipelines was impossible to find. So here it is…

The Scenario

I’m using AWS CDK to develop and deploy infrastructure and apps into pre-prod and production environments. Specifically, there is:

  • A Dev account (Account number: 111111111111), where the code resides in CodeCommit repositories, and where development code is deployed. Developers have (almost) full access to the account and can manage code and deploy apps.

Mark Ilott

Learning and sharing cloud and AWS technologies

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store