Static Website on S3 Bucket with Route 53 for DNS – CLI
Last week I posted a generic tutorial on how to create S3 buckets and setup Route 53 so that you can access your static website via the domain. This week lets automate this so we don’t have to go through this mess again and we can simply run a script that is as simple as:
./creates3bucketandroute53.sh domainname.com region ./creates3bucketandroute53.sh legit.fyi eu-central-1
In short here is the execution order of this script
- Collects information from the user
- Validates the region is correct, and sets the hosted zone ID for the region
- Creates the S3 Bucket for the domain
- Configures the S3 Bucket
- Creates the Hosted Zones in Route53
- Creates the resource record sets
The script is available on Github.