Skip to content

Latest commit

 

History

History
64 lines (44 loc) · 1.68 KB

File metadata and controls

64 lines (44 loc) · 1.68 KB

Route53 Public Hosted Zone Automation at scale

This repository contains scripts for automating the creation of Route53 public hosted zones using AWS CloudFormation and Python.

Files

1. domains.txt

Purpose:
Text file containing a list of domains for which Route53 public hosted zones will be created.

Format:
Each line in the file represents a single domain.

Example domains.txt:

example1.com
example2.com
example3.com

2. create_hosted_zones.sh

Purpose:
Bash script for automating the creation of Route 53 hosted zones for each domain listed in domains.txt.

Usage:
Execute this script to iterate through the domains in domains.txt and invoke the Python script for each domain.

3. create_hosted_zone.py

Purpose:
Python script for creating a Route 53 public hosted zone using AWS CloudFormation.

Usage:
Run this script with a domain as an argument to create a CloudFormation stack for the specified domain.

4. cloudformation_template.json

Purpose:

Temporary CloudFormation template generated by the Python script for creating a Route 53 hosted zone.

Note:

This file is generated dynamically during the execution of create_hosted_zone.py.

Usage:

Populate the domains.txt file with the desired domains.
Run the create_hosted_zones.sh script to automate the creation of Route 53 hosted zones.

How to use the automation in the simplest way

  1. Upload all files into AWS CloudShell Environment
  2. Grant permission to execute the scripts:
chmod +x create_hosted_zones.sh
chmod +x create_hosted_zone.py
  1. Execute the bash script:
./create_hosted_zones.sh