package module
Version: v0.0.0-...-0b98efd Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2019 License: MIT Imports: 6 Imported by: 0


Used to deploy dnslink txt records to AWS Route53

Can be used as a library, or as a cli


  • go get -v github.com/RTradeLtd/dnslink-route53
  • cd $GOPATH/src/github.com/RTradeLTd/dnslink-route53
  • make install

Usage - CLI

To install run make install

By default it uses ENV authentication which expects the following environment variables to be set:

  • Optinonally AWS_SECURITY_TOKEN

If your AWS account needs a security token, you have to use the env auth method.

You can provide a region if you want, but it looks like AWS Route53 doesn't require a specific region, so it should be fine to leave the default at us-east-1. If you want to specify a different region use the -region flag.

You must provide the zone id of your hosted zone through the -zone.id flag

Example invocation using env auth:

$ dlink53 -record.name _dnslink.foo.bar -record.value dnslink=/ipns/foo/bar -zone.id <zone-ID>

successfully deployed dnslink entry to route53

To show the help menu:

$ dlink53 -h
  -access.key string
        aws access key to use if not using env auth
  -name string
        set aws authentication method, valid values are env or get (default "env")
  -record.name string
        the name of the dnslink record, ie _dnslink.foo.bar
  -record.value string
        the value of the dnslink record, ie dnslink=/ipns/foo/bar
  -region string
        the aws region your domain is hosted in (default "us-east-1")
  -secret.key string
        aws secret key use if not using env auth method
  -zone.id string
        the id of the hosted zone for your domain



Package dlink53 is used to deploy DNSLink TXT records to AWS Route53 hosted domains



This section is empty.


This section is empty.


This section is empty.


type AwsLinkManager

type AwsLinkManager struct {
	Auth   aws.Auth
	Region aws.Region
	Client *route53.Client
	Zone   string

type Deployer

type Deployer struct {
	// contains filtered or unexported fields

Deployer is used to handle deployment of DNSLink TXT records to route53 domains

func NewDeployer

func NewDeployer(authMethod, zoneID string, region aws.Region, credentials ...string) (*Deployer, error)

NewDeployer is used to instantiate our DNSLink deployer if authMethod is set to get, credentials variadic parameter must be given the first element in the array is the access key, and the second is the secret key

func (*Deployer) AddEntry

func (d *Deployer) AddEntry(name, value string) (*r.ChangeResourceRecordSetsResponse, error)

AddEntry adds a TXT entry to a domain-name with a ttl value of 300 seconds

Source Files


Path Synopsis
Package main provides a cli helper to deploy TXT records to AWS Route53 domains
Package main provides a cli helper to deploy TXT records to AWS Route53 domains

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL