Files
coredns/plugin/route53
Miek Gieben b003d06003 For caddy v1 in our org (#4018)
* For caddy v1 in our org

This RP changes all imports for caddyserver/caddy to coredns/caddy. This
is the v1 code of caddy.

For the coredns/caddy repo the following changes have been made:

* anything not needed by us is deleted
* all `telemetry` stuff is deleted
* all its import paths are also changed to point to coredns/caddy
* the v1 branch has been moved to the master branch
* a v1.1.0 tag has been added to signal the latest release

Signed-off-by: Miek Gieben <miek@miek.nl>

* Fix imports

Signed-off-by: Miek Gieben <miek@miek.nl>

* Group coredns/caddy with out plugins

Signed-off-by: Miek Gieben <miek@miek.nl>

* remove this file

Signed-off-by: Miek Gieben <miek@miek.nl>

* Relax import ordering

github.com/coredns is now also a coredns dep, this makes
github.com/coredns/caddy fit more natural in the list.

Signed-off-by: Miek Gieben <miek@miek.nl>

* Fix final import

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-09-24 18:14:41 +02:00
..
2018-07-19 16:23:06 +01:00
2020-09-24 18:14:41 +02:00
2020-09-24 18:14:41 +02:00

route53

Name

route53 - enables serving zone data from AWS route53.

Description

The route53 plugin is useful for serving zones from resource record sets in AWS route53. This plugin supports all Amazon Route 53 records (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html). The route53 plugin can be used when coredns is deployed on AWS or elsewhere.

Syntax

route53 [ZONE:HOSTED_ZONE_ID...] {
    aws_access_key [AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY]
    credentials PROFILE [FILENAME]
    fallthrough [ZONES...]
    refresh DURATION
}
  • ZONE the name of the domain to be accessed. When there are multiple zones with overlapping domains (private vs. public hosted zone), CoreDNS does the lookup in the given order here. Therefore, for a non-existing resource record, SOA response will be from the rightmost zone.

  • HOSTED_ZONE_ID the ID of the hosted zone that contains the resource record sets to be accessed.

  • AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY the AWS access key ID and secret access key to be used when query AWS (optional). If they are not provided, then coredns tries to access AWS credentials the same way as AWS CLI, e.g., environmental variables, AWS credentials file, instance profile credentials, etc.

  • credentials is used for reading the credential FILENAME and setting the PROFILE name for a given zone. PROFILE is the AWS account profile name. Defaults to default. FILENAME is the AWS credentials filename, defaults to ~/.aws/credentials.

  • fallthrough If zone matches and no record can be generated, pass request to the next plugin. If ZONES is omitted, then fallthrough happens for all zones for which the plugin is authoritative. If specific zones are listed (for example in-addr.arpa and ip6.arpa), then only queries for those zones will be subject to fallthrough.

  • refresh can be used to control how long between record retrievals from Route 53. It requires a duration string as a parameter to specify the duration between update cycles. Each update cycle may result in many AWS API calls depending on how many domains use this plugin and how many records are in each. Adjusting the update frequency may help reduce the potential of API rate-limiting imposed by AWS.

  • DURATION A duration string. Defaults to 1m. If units are unspecified, seconds are assumed.

Examples

Enable route53 with implicit AWS credentials and resolve CNAMEs via 10.0.0.1:

example.org {
	route53 example.org.:Z1Z2Z3Z4DZ5Z6Z7
}

. {
    forward . 10.0.0.1
}

Enable route53 with explicit AWS credentials:

example.org {
    route53 example.org.:Z1Z2Z3Z4DZ5Z6Z7 {
      aws_access_key AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY
    }
}

Enable route53 with fallthrough:

. {
    route53 example.org.:Z1Z2Z3Z4DZ5Z6Z7 example.gov.:Z654321543245 {
      fallthrough example.gov.
    }
}

Enable route53 with multiple hosted zones with the same domain:

example.org {
    route53 example.org.:Z1Z2Z3Z4DZ5Z6Z7 example.org.:Z93A52145678156
}

Enable route53 and refresh records every 3 minutes

example.org {
    route53 example.org.:Z1Z2Z3Z4DZ5Z6Z7 {
      refresh 3m
    }
}