white-turtle

web-space of - vishal basra

turtles and code!


Interact with Route 53

Route 53

You’ve seen this everywhere, and perhaps you use it too! Maybe you’ve just recently adopted or looking to adapt to Route 53.

The idea of me writing this article is to show one of the many (10,000) methods how to interact with Route 53 to

  • add records
  • update records
  • delete records

in Route 53

To achieve this, I’ll be leveraging something called AWS Lambda and the AWS API Gateway

Here are some useful things to be aware of before proceeding further

Primarily, we’ll be using the change-resource-record-sets method to achieve the purpose/scope of this article.

The change-resource-record-sets method is provided by Route 53 and may be levegaged from the CLI or API. We’re gonna use the Boto 3 to interact with this method therein interacting with Route 53 via an API.

So here’s what your use case looks like

  1. Lambda function is hit by an API with certain parameters
  2. Lambda function wil process and hit Route 53’s API(via Boto 3)
  3. Lambda function will return a response to us

Why would one want to do this?

  • Automation
  • Orchestration
  • Ease of life etc.

Let’s jump right in!

  1. Find the lambda code here
  2. Find an example of inputs that the function specifies here
  3. Create a lambda function with the code from above (modify if needed , better yet create a pull request!)
  4. Create an API gateway endpoint - be considerate about security, access and controls.
  5. Fire away to your api endpoint with an appropriate input from above!

vishal@white-turtle.org