Giter VIP home page Giter VIP logo

aws-ddns's Introduction

AWS Dynamic DNS (No-IP) Service

Deploy this project to your AWS account to get a free Dynamic DNS (No-IP like) service using Route 53, API Gateway, and Lambda. The project uses the โšกServerless Framework to simplify development and continous deployment, so adding and removing this service from your AWS account is as simple as running one single command.

To update your dynamic IP address in a Route 53 record, a simple HTTP call is needed to execute the following process: AWS DDNS Architecture Diagram

Requirements

Installation

Using a terminal, move to a new directory and clone this Git project:

git clone https://github.com/panchosoft/AWS-DDNS.git

Use npm to install the application.

# Install Serverless Framework
npm install -g serverless
# Install package dependencies
npm install

Usage

1) Deploy service to AWS

Run the following command in a terminal to deploy the service to your AWS account:

serverless deploy

You should receive a similar output as the one displayed in the image below. The green mark indicates the endpoint URL that allows updating the DNS record value. Serverless deploy command output

2) Create/Update hosted zone record

Use a web browser or cURL to call the endpoint URL and include the following two URL parameters:

Command Example

# Call the endpoint URL
curl "https://1cjix7wahb.execute-api.us-east-2.amazonaws.com/prod/ddns?hosted_zone_id=XXXXXXXXXXXX&record_name=mydns.mydomain.com"

A new record entry will be created in Route 53 including the specified record name and the IP address of the device that sent the request. If the record name already exists, only its value will be updated.

AWS Route 53 record name

3) Schedule an automated job/task

The endpoint URL can be called everytime you need to update your public IP address in the hosted zone record. However, you might want to automate this task on your personal computer or using an always-on device like a Rasperry PI in your home network.

Here's an example of a crontab entry to schedule a call to the endpoint in a Linux-based system:

# Execute the curl command every 12 hours (crontab entry)
0 */12 * * * /usr/bin/curl -q "https://1cjix7wahb.execute-api.us-east-2.amazonaws.com/prod/ddns?hosted_zone_id=XXXXXXXXXXXX&record_name=mydns.mydomain.com" 2>&1 > /dev/null

aws-ddns's People

Contributors

panchosoft avatar

Watchers

 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.