AWS Stale DNS Finder is a tool designed to identify and manage stale DNS records within your AWS environment. It helps you keep your DNS records clean and up-to-date, preventing issues related to outdated or unnecessary DNS entries.
$ python3 app.py import-dns
Importing records from /hostedzone/ZYXABC0123456789
Processing records from /hostedzone/ZYXABC0123456789
Done
$ python3 app.py fetch-all
Creating boto3 sessions
Loading adapter ec2
Loading adapter elbv2
Loading adapter globalaccelerator
$ python3 app.py analyze
record type region name
------------------------ ----------------- --------- ---------------
mdminhazulhaque.io. loadbalancer us-east-2 prod-web-lb
demo.mdminhazulhaque.io. instance us-west-1 i-5a6b7c8d1100
api.mdminhazulhaque.io. instance us-west-2 i-5a6b7c8d1100
bob.mdminhazulhaque.io. instance us-west-1 i-5a6b7c8d1100
alice.mdminhazulhaque.io. instance us-west-2 i-5a6b7c8d1100
foo.mdminhazulhaque.io. instance us-west-1 i-5a6b7c8d1100
bar.mdminhazulhaque.io. globalaccelerator us-west-2 prod-api-ga
baz.mdminhazulhaque.io. loadbalancer us-west-2 lb-baz
- Scan: Scans your AWS environment for stale DNS records.
- Report: Generates a comprehensive report detailing all identified stale DNS records.
- Clean: Offers an option to clean up the stale DNS records, either manually or automatically.
- AWS Accounts
- AWS CLI installed and configured
- Python 3.x
- Boto3 Python library
- Click Python library
- Clone this repository to your local machine.
- Navigate to the cloned directory.
- Install the necessary Python packages using the command:
pip install -r requirements.txt
- Create a valid config file named
config.ini
- Import DNS records from Hosted Zone:
python app.py import-dns
- Fetch Resources from All Accounts:
python app.py fetch-all
- Prepare Report:
python app.py analyze
- Clear Cached Data:
python app.py clear
- Add more adapters like
cloudfront
andelasticbeanstalk
- Improve code quality and file caching
We welcome contributions to the AWS Stale DNS Finder. Please feel free to submit pull requests or open issues to improve the tool.
AWS Stale DNS Finder is released under the MIT License. See the LICENSE file for more details.