{"id":21852559,"url":"https://github.com/renato0307/diy-dyn-dns","last_synced_at":"2026-04-19T10:35:24.134Z","repository":{"id":62265267,"uuid":"559239821","full_name":"renato0307/diy-dyn-dns","owner":"renato0307","description":"DIY Dynamic DNS using AWS serverless services and Go","archived":false,"fork":false,"pushed_at":"2022-10-29T15:24:52.000Z","size":648,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-21T18:36:37.494Z","etag":null,"topics":["aws","dns","go","serverless"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/renato0307.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-29T13:52:46.000Z","updated_at":"2022-10-29T13:58:02.000Z","dependencies_parsed_at":"2023-01-20T15:15:14.509Z","dependency_job_id":null,"html_url":"https://github.com/renato0307/diy-dyn-dns","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/renato0307/diy-dyn-dns","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renato0307%2Fdiy-dyn-dns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renato0307%2Fdiy-dyn-dns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renato0307%2Fdiy-dyn-dns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renato0307%2Fdiy-dyn-dns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/renato0307","download_url":"https://codeload.github.com/renato0307/diy-dyn-dns/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renato0307%2Fdiy-dyn-dns/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32004041,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","dns","go","serverless"],"created_at":"2024-11-28T01:17:36.876Z","updated_at":"2026-04-19T10:35:24.095Z","avatar_url":"https://github.com/renato0307.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DIY Dynamic DNS\n\nI need to connect remotely to my home office and work in my Ubuntu workstation\nfrom a laptop with less resources.\n\nSo, instead of using a dynamic DNS service, I decided to build my own.\n\nInspired by [this article](https://aws.amazon.com/blogs/startups/how-to-build-a-serverless-dynamic-dns-system-with-aws/) with some simplifications.\n\nI used Terraform and Go instead of CloudFormation and Python.\n\n## How am I using this?\n\n![How am I using this](docs/diydyndns.png)\n\n## How much does it cost in terms of AWS services?\n\nThe AWS services will cost 6 USD per year, 0.50 USD per month.\n\nYou can see the details here: \nhttps://calculator.aws/#/estimate?id=cbe57b14d97d3bf63a6073d6276dede0cf99b836\n\n\nIf you don't have a domain name, you can by a `.link` domain in AWS for 5 USD\nper year.\n\nSo, the total cost per year is 11 USD, less than 1 USD per month. \n\n\n## Deploy the AWS Service\n\nFirst create the `terraform.tfvars` inside the `./infra`  folder.\n\nExample:\n\n```hcl\napi_key=\"put-here-a-complex-api-key\"\ndns_dyn_record_name=\"the dns record to be used, e.g. dyn.mypersondomain.com\"\ndns_hosted_zone=\"the route53 hosted zone id\"\n```\n\nThen run the following commands:\n\n```sh\nexport AWS_PROFILE=put-here-your-aws-profile-to-connect-to-aws\nmake init\nmake deploy\n```\n\n## Configuring the cronjob\n\nLog in into the raspberry and run\n\n```sh\ncrontab -e\n```\n\nPaste the contents of the `./crontab/update-dns.crontab` file.\n\nCopy the `./crontab/update-dns.sh` file to `/home/pi` and give permissions to run:\n\n```sh\nchmod 700 update-dns.sh\n```\n\nEdit the `/home/pi/.profile` and set the `DIY_DYN_DNS_UPDATE_API_KEY` and \nthe `DIY_DYN_DNS_UPDATE_ENDPOINT` environment vars:\n\n```sh\nexport DIY_DYN_DNS_UPDATE_ENDPOINT=https://your-id-here.lambda-url.eu-west-1.on.aws\nexport DIY_DYN_DNS_UPDATE_API_KEY=put-here-a-complex-api-key\n```\n\n## Generating an API key\n\nYou can use `openssl`:\n\n```sh\nopenssl rand -base64 64\n```\n\n## Extra\n\n1. Open the SSH port in your router and redirect to the raspberry SSH port.\n2. Confiure SSH keys to facilitate access without password","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenato0307%2Fdiy-dyn-dns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frenato0307%2Fdiy-dyn-dns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenato0307%2Fdiy-dyn-dns/lists"}