The repository to deploy ddns through terraform into aws environment, using API Gateway, Route53 and Lambda. It implements the architecture suggested by Building a serverless dynamic DNS system with AWS and improves it by introducing API-Gateway so DDNS is protected away from non-intended users.
- Set up the infrastructure by terraform.
cd architecture terraform init terraform apply -auto-approve
- Export environment variables for python script.
export APIGW_INVOKE_URI= export X_API_KEY=
- Run cronjob to regularly update.
python src/local/main.py
# linux sudo apt update sudo apt install cron # macos -> need permission settings brew install cron # common after installation crontab -e # add this */2 * * * * APIGW_INVOKE_URI= X_API_KEY= python src/local/main.py >> log.txt 2>&1
- https://www.youtube.com/watch?v=yzT92pEcIvM
- https://aws.amazon.com/blogs/startups/how-to-build-a-serverless-dynamic-dns-system-with-aws/#:~:text=AWS%20Services%20We%20Use%20in%20Our%20Dynamic%20DNS%20system&text=Your%20code%20is%20always%20ready,events%20from%20other%20AWS%20services.
- https://www.bejarano.io/fixing-cron-jobs-in-mojave/