AWS ROUTE 53 -PYTHON BOTO3

https://howto.lintel.in/update-route53-records-ec2-instance-restart/

TL;DR How to get info from Route 53 via AWS SDK Python (Boto3)

What is an API ?

API is the acronym for Application Programming Interface, which is a software intermediary that allows two applications to talk to each other. Each time you use an app like Facebook, send an instant message, or check the weather on your phone, you’re using an API.

What is Route 53?

Amazon Route 53 is a highly available and scalable cloud Domain Name System (DNS) web service. If you are not using Elastic IPs for your EC2 instances, chances are stopping and starting the server will result in different IPs after the instance comes back online. If you have A records pointing to those IPs in Route53 you will need a way to update them. After the script is executed, it will automatically gather the new Public IP and update the DNS record for it in Route53.

What does boto3 stand for?

Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK) for Python, which allows Python developers to write software that makes use of services like Amazon S3 and Amazon EC2. You can find the latest, most up to date, documentation at our doc site, including a list of services that are supported.

Python Version

python --version
Python 3.7.8

How install boto3 package

pip install boto3

GET LIST DOMAIN

this is the json response

GET LIST HOSTS

now you can call the python script below to get list of hosts

this is the json response

--

--

Director Of Engineering at Bucksense, Inc 📈 Crypto & NFT Fan | ⌨️ Mechanical Keyboard Enthusiast | 🍕 Pizza Maker

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
Michele Berardi

Director Of Engineering at Bucksense, Inc 📈 Crypto & NFT Fan | ⌨️ Mechanical Keyboard Enthusiast | 🍕 Pizza Maker