Git Product home page Git Product logo

aws-dns-update's Introduction

Check out on docker Check out on docker Check out on docker

aws-dns-update

A simple container for updating your DNS domain with IP

Usage

You need :

  • an AWS user with proper authorizations (strategies)
  • a DNS A entry in a zone you can write in. My zone here is domain.com my A entry is sub.domain.com bound to IP 1.2.3.4 (whatever). This script doesn't create the A entry, it only modifies it.
  • Docker installed :) Optionally docker-compose

you can find the AWS_ZONE_ID I'm talking about here: https://console.aws.amazon.com/route53/home#hosted-zones: Click on the line of your zone NOT the url. On the right panel you should see the ID

Minimal AWS Role

Create a dedicated user for this:

  • go to IAM console then create an user with API access, click next
  • create a new strategy (or use one you created with at least these below)
    • select service route53
    • Read access: ListResourceRecordSets
    • Write access: ChangeResourceRecordSets
    • Specify resource hostedzone restriction. copy paste the AWS_ZONE_ID.
    • Check then give a name and create the strategy
  • back to the user creation, select the tab to attach existing strategies refresh the list of strategies then type or scroll to the name you just created then tick the checkbox
  • Next until creation confirm.

Variables

To update the DNS sub.domain.com I need an identity in AWS with the correct role. at the end of user creation you get an ID and the KEY: I would recommend setting your environment variables in a file, I use .env and put these in:

AWS_ID=AWSUSERID23487
AWS_KEY=AWSKEY80247523485je39A/+3

#you can get this one in Route53
AWS_ZONE_ID=ZONEIDINROUTE53

DNS_FQDN=sub.domain.com

# TTL for the A record as we overwrite it. 
DNS_TTL=432000
# in seconds, the interval for the job
DNS_QUERY_INTERVAL=1800
With Docker
docker run -d --env-file .env techunter/aws-dns-update:latest

With docker-compose

docker-compose up -d

Building the image

Comment the image line and uncomment the build line.

Thanks

I took some parts from https://github.com/famzah/aws-dyndns so thank you :)

aws-dns-update's People

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.