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
- Route 53 CLI / methods
- Using IAM based controls for Route 53
- Editing IAM policies in general
- Boto 3 and what is Boto 3
- Boto 3 methods for Route 53
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
- Lambda function is hit by an API with certain parameters
- Lambda function wil process and hit Route 53’s API(via Boto 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!
- Find the lambda code here
- Find an example of inputs that the function specifies here
- Create a lambda function with the code from above (modify if needed , better yet create a pull request!)
- Create an API gateway endpoint - be considerate about security, access and controls.
- Fire away to your api endpoint with an appropriate input from above!