Free Tier AWS Dynamic DNS
This repo is a terraform configuration based upon the AWS Labs dynamic dns lambda example. It does the following:
- Creates a Route53 zone for the given root domain name, with SSL certs and validation DNS entries.
- Configures namecheap with the domain name servers for that zone
- Generates a shared secret password to authenticate update requests
- Creates an S3 bucket to hold the domain configuration, and uploads the secrets config for the target host.
- Uploads the domain update lamda function (
lamda.py
) and configures it with the bucket name and config file key. - Sets up API Gateway to route requests to the api endpoint to the lambda, configured against a subdomain on your target domain (default is
update
). - Creates said subdomain and points it at the api.
Once the configuration is applied, you will have a working dyndns service. Use the update-dns.sh
script (after populating the outputs from terraform) to invoke the api endpoint.
Create a secret.auto.tfvars
file in the root of this repository with the following values filled in:
site = "NAME_FOR_SITE_IN_AWS"
domain = "your-domain.name"
api_subdomain = "update"
namecheap = {
username = "NAMECHEAP_USERNAME"
apikey = "NAMECHEAP_SECRET"
}