How We Migrated from AWS API Gateway to Kong Konnect Using CDKTF and Azure DevOps
Recently, I got an opportunity to work on an interesting project where we migrated our APIs from AWS API Gateway to Kong Konnect.
One thing we wanted to improve during this migration was how we managed API configurations and deployments.
Earlier, managing configurations manually wasn't the approach we wanted to continue with. So, we decided to move towards Infrastructure as Code (IaC) and automate the entire process as much as possible.
For this, we used CDKTF (Terraform with TypeScript) to manage Kong configurations and Azure DevOps to handle deployments.
Here's a little about what we did and some of the challenges we came across.
What did we implement?
We wanted to manage everything through code instead of depending on manual UI configurations.
Here's how we approached it:
- Created Kong services, routes and plugins using CDKTF.
- Managed Dev, Stage and Production environments using a common codebase.
- Built Azure DevOps pipelines to automate Terraform deployments.
- Implemented a Plan → Approval → Apply workflow so changes could be reviewed before deployment.
- Worked on a rollback approach using previously maintained Terraform state and configuration
What challenges did we face?
Like any migration project, things weren't always straightforward. We came across a few challenges along the way:
- Authorization: Mapping existing AWS API Gateway authorizers to the corresponding Kong plugins.
- Rate Limiting: Making sure rate-limiting configurations worked as expected after migration.
- Authentication: Handling existing authentication configurations in Kong.
- Zero Downtime: Planning the migration carefully to avoid any service interruption.
Each of these required proper validation and testing to make sure the APIs continued to work as expected.
What did we like about this approach?
For me, the biggest improvement was the way we started managing infrastructure.
A few things that made a real difference:
- Everything was maintained in Git and became version-controlled.
- No more dependency on manually configuring APIs through the UI.
- Deployments became more consistent across environments.
- Changes could be reviewed before applying them.
- Managing configurations became much easier with a common codebase.
My takeaway
One thing I really liked about this project was seeing how much difference Infrastructure as Code can make in day-to-day operations.
Instead of spending time on repetitive manual configurations, we could focus more on automation, consistency and making the deployment process reliable.
It was a great learning experience working with Kong Konnect, CDKTF, Terraform and Azure DevOps, especially when it came to API management and automation.
I'd love to hear from others who have worked on similar migrations.
Have you migrated from AWS API Gateway to Kong Konnect? What challenges did you face?