2019-09-27 13:30:22 +01:00
|
|
|
.\" Generated by Mmark Markdown Processer - mmark.miek.nl
|
2026-03-27 05:35:09 +02:00
|
|
|
.TH "COREDNS-ROUTE53" 7 "March 2026" "CoreDNS" "CoreDNS Plugins"
|
2019-04-06 08:42:40 +01:00
|
|
|
|
2019-04-21 22:38:40 +01:00
|
|
|
.SH "NAME"
|
2019-04-06 08:42:40 +01:00
|
|
|
.PP
|
|
|
|
|
\fIroute53\fP - enables serving zone data from AWS route53.
|
|
|
|
|
|
2019-04-21 22:38:40 +01:00
|
|
|
.SH "DESCRIPTION"
|
2019-04-06 08:42:40 +01:00
|
|
|
.PP
|
|
|
|
|
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
|
|
|
|
|
\[la]https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html\[ra]).
|
2026-03-27 05:35:09 +02:00
|
|
|
The route53 plugin can be used when CoreDNS is deployed on AWS or elsewhere.
|
2019-04-06 08:42:40 +01:00
|
|
|
|
2019-04-21 22:38:40 +01:00
|
|
|
.SH "SYNTAX"
|
2019-04-06 08:42:40 +01:00
|
|
|
.PP
|
|
|
|
|
.RS
|
2018-02-03 19:20:22 +02:00
|
|
|
|
2019-04-06 08:42:40 +01:00
|
|
|
.nf
|
|
|
|
|
route53 [ZONE:HOSTED\_ZONE\_ID...] {
|
2026-03-27 05:35:09 +02:00
|
|
|
aws\_access\_key [AWS\_ACCESS\_KEY\_ID AWS\_SECRET\_ACCESS\_KEY] # Deprecated, uses other authentication methods instead.
|
|
|
|
|
aws\_endpoint ENDPOINT
|
2018-10-18 09:47:03 +01:00
|
|
|
credentials PROFILE [FILENAME]
|
2019-04-06 08:42:40 +01:00
|
|
|
fallthrough [ZONES...]
|
2019-08-09 16:40:30 +01:00
|
|
|
refresh DURATION
|
2018-02-03 19:20:22 +02:00
|
|
|
}
|
2019-04-06 08:42:40 +01:00
|
|
|
|
2018-02-03 19:20:22 +02:00
|
|
|
.fi
|
2019-04-06 08:42:40 +01:00
|
|
|
.RE
|
|
|
|
|
|
|
|
|
|
.IP \(bu 4
|
|
|
|
|
\fBZONE\fP 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.
|
|
|
|
|
.IP \(bu 4
|
2019-12-29 13:35:17 +01:00
|
|
|
\fBHOSTED_ZONE_ID\fP the ID of the hosted zone that contains the resource record sets to be
|
2019-04-06 08:42:40 +01:00
|
|
|
accessed.
|
|
|
|
|
.IP \(bu 4
|
2019-12-29 13:35:17 +01:00
|
|
|
\fBAWS_ACCESS_KEY_ID\fP and \fBAWS_SECRET_ACCESS_KEY\fP the AWS access key ID and secret access key
|
2026-03-27 05:35:09 +02:00
|
|
|
to be used when querying AWS (optional). If they are not provided, CoreDNS tries to access
|
|
|
|
|
AWS credentials the same way as AWS CLI - environment variables, shared credential file (and optionally
|
|
|
|
|
shared config file if \fB\fCAWS_SDK_LOAD_CONFIG\fR env is set), and lastly EC2 Instance Roles.
|
|
|
|
|
Note the usage of \fB\fCaws_access_key\fR has been deprecated and may be removed in future versions. Instead,
|
|
|
|
|
user can use other methods to pass crentials, e.g., with environmental variable \fB\fCAWS_ACCESS_KEY_ID\fR and
|
|
|
|
|
\fB\fCAWS_SECRET_ACCESS_KEY\fR, respectively.
|
2019-04-06 08:42:40 +01:00
|
|
|
.IP \(bu 4
|
2026-03-27 05:35:09 +02:00
|
|
|
\fB\fCaws_endpoint\fR can be used to control the endpoint to use when querying AWS (optional). \fBENDPOINT\fP is the
|
|
|
|
|
URL of the endpoint to use. If this is not provided the default AWS endpoint resolution will occur.
|
|
|
|
|
.IP \(bu 4
|
|
|
|
|
\fB\fCcredentials\fR is used for overriding the shared credentials \fBFILENAME\fP and the \fBPROFILE\fP name for a
|
|
|
|
|
given zone. \fBPROFILE\fP is the AWS account profile name. Defaults to \fB\fCdefault\fR. \fBFILENAME\fP is the
|
|
|
|
|
AWS shared credentials filename, defaults to \fB\fC~/.aws/credentials\fR. CoreDNS will only load shared credentials
|
|
|
|
|
file and not shared config file (\fB\fC~/.aws/config\fR) by default. Set \fB\fCAWS_SDK_LOAD_CONFIG\fR env variable to
|
|
|
|
|
a truthy value to enable also loading of \fB\fC~/.aws/config\fR (e.g. if you want to provide assumed IAM role
|
|
|
|
|
configuration). Will be ignored if static keys are set via \fB\fCaws_access_key\fR.
|
2019-04-06 08:42:40 +01:00
|
|
|
.IP \(bu 4
|
|
|
|
|
\fB\fCfallthrough\fR If zone matches and no record can be generated, pass request to the next plugin.
|
2019-07-28 10:02:52 +00:00
|
|
|
If \fBZONES\fP is omitted, then fallthrough happens for all zones for which the plugin is
|
2019-04-06 08:42:40 +01:00
|
|
|
authoritative. If specific zones are listed (for example \fB\fCin-addr.arpa\fR and \fB\fCip6.arpa\fR), then
|
|
|
|
|
only queries for those zones will be subject to fallthrough.
|
|
|
|
|
.IP \(bu 4
|
2019-08-09 16:40:30 +01:00
|
|
|
\fB\fCrefresh\fR 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.
|
|
|
|
|
.IP \(bu 4
|
|
|
|
|
\fBDURATION\fP A duration string. Defaults to \fB\fC1m\fR. If units are unspecified, seconds are assumed.
|
2019-04-06 08:42:40 +01:00
|
|
|
|
|
|
|
|
|
2019-04-21 22:38:40 +01:00
|
|
|
.SH "EXAMPLES"
|
2019-04-06 08:42:40 +01:00
|
|
|
.PP
|
2019-07-28 10:02:52 +00:00
|
|
|
Enable route53 with implicit AWS credentials and resolve CNAMEs via 10.0.0.1:
|
2018-02-03 19:20:22 +02:00
|
|
|
|
2019-04-06 08:42:40 +01:00
|
|
|
.PP
|
|
|
|
|
.RS
|
|
|
|
|
|
|
|
|
|
.nf
|
2019-09-27 13:30:22 +01:00
|
|
|
example.org {
|
|
|
|
|
route53 example.org.:Z1Z2Z3Z4DZ5Z6Z7
|
|
|
|
|
}
|
|
|
|
|
|
2019-04-06 08:42:40 +01:00
|
|
|
\&. {
|
2019-04-21 22:38:40 +01:00
|
|
|
forward . 10.0.0.1
|
2018-02-03 19:20:22 +02:00
|
|
|
}
|
2019-04-06 08:42:40 +01:00
|
|
|
|
2018-02-03 19:20:22 +02:00
|
|
|
.fi
|
2019-04-06 08:42:40 +01:00
|
|
|
.RE
|
|
|
|
|
|
|
|
|
|
.PP
|
2018-10-18 09:47:03 +01:00
|
|
|
Enable route53 with explicit AWS credentials:
|
2018-02-03 19:20:22 +02:00
|
|
|
|
2019-04-06 08:42:40 +01:00
|
|
|
.PP
|
|
|
|
|
.RS
|
|
|
|
|
|
|
|
|
|
.nf
|
2019-09-27 13:30:22 +01:00
|
|
|
example.org {
|
2019-04-06 08:42:40 +01:00
|
|
|
route53 example.org.:Z1Z2Z3Z4DZ5Z6Z7 {
|
2026-03-27 05:35:09 +02:00
|
|
|
aws\_access\_key AWS\_ACCESS\_KEY\_ID AWS\_SECRET\_ACCESS\_KEY # Deprecated, uses other authentication methods instead.
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.fi
|
|
|
|
|
.RE
|
|
|
|
|
|
|
|
|
|
.PP
|
|
|
|
|
Enable route53 with an explicit AWS endpoint:
|
|
|
|
|
|
|
|
|
|
.PP
|
|
|
|
|
.RS
|
|
|
|
|
|
|
|
|
|
.nf
|
|
|
|
|
example.org {
|
|
|
|
|
route53 example.org.:Z1Z2Z3Z4DZ5Z6Z7 {
|
|
|
|
|
aws\_endpoint https://test.us\-west\-2.amazonaws.com
|
2018-10-18 09:47:03 +01:00
|
|
|
}
|
|
|
|
|
}
|
2019-04-06 08:42:40 +01:00
|
|
|
|
2018-10-18 09:47:03 +01:00
|
|
|
.fi
|
2019-04-06 08:42:40 +01:00
|
|
|
.RE
|
|
|
|
|
|
|
|
|
|
.PP
|
2018-10-18 09:47:03 +01:00
|
|
|
Enable route53 with fallthrough:
|
|
|
|
|
|
2019-04-06 08:42:40 +01:00
|
|
|
.PP
|
|
|
|
|
.RS
|
|
|
|
|
|
|
|
|
|
.nf
|
|
|
|
|
\&. {
|
|
|
|
|
route53 example.org.:Z1Z2Z3Z4DZ5Z6Z7 example.gov.:Z654321543245 {
|
|
|
|
|
fallthrough example.gov.
|
2018-10-18 09:47:03 +01:00
|
|
|
}
|
|
|
|
|
}
|
2019-04-06 08:42:40 +01:00
|
|
|
|
2018-10-18 09:47:03 +01:00
|
|
|
.fi
|
2019-04-06 08:42:40 +01:00
|
|
|
.RE
|
|
|
|
|
|
|
|
|
|
.PP
|
2018-10-18 09:47:03 +01:00
|
|
|
Enable route53 with multiple hosted zones with the same domain:
|
|
|
|
|
|
2019-04-06 08:42:40 +01:00
|
|
|
.PP
|
|
|
|
|
.RS
|
|
|
|
|
|
|
|
|
|
.nf
|
2019-09-27 13:30:22 +01:00
|
|
|
example.org {
|
2019-04-06 08:42:40 +01:00
|
|
|
route53 example.org.:Z1Z2Z3Z4DZ5Z6Z7 example.org.:Z93A52145678156
|
2018-02-03 19:20:22 +02:00
|
|
|
}
|
2019-04-06 08:42:40 +01:00
|
|
|
|
2018-02-03 19:20:22 +02:00
|
|
|
.fi
|
2019-04-06 08:42:40 +01:00
|
|
|
.RE
|
2018-02-03 19:20:22 +02:00
|
|
|
|
2019-08-09 16:40:30 +01:00
|
|
|
.PP
|
|
|
|
|
Enable route53 and refresh records every 3 minutes
|
|
|
|
|
|
|
|
|
|
.PP
|
|
|
|
|
.RS
|
|
|
|
|
|
|
|
|
|
.nf
|
2019-09-27 13:30:22 +01:00
|
|
|
example.org {
|
2019-08-09 16:40:30 +01:00
|
|
|
route53 example.org.:Z1Z2Z3Z4DZ5Z6Z7 {
|
|
|
|
|
refresh 3m
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.fi
|
|
|
|
|
.RE
|
|
|
|
|
|
2026-03-27 05:35:09 +02:00
|
|
|
.SH "AUTHENTICATION"
|
|
|
|
|
.PP
|
|
|
|
|
Route53 plugin uses AWS Go SDK
|
|
|
|
|
\[la]https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html\[ra]
|
|
|
|
|
for authentication, where there is a list of accepted configuration methods.
|
|
|
|
|
Note the usage of \fB\fCaws_access_key\fR in Corefile has been deprecated and may be removed in future versions. Instead,
|
|
|
|
|
user can use other methods to pass crentials, e.g., with environmental variable \fB\fCAWS_ACCESS_KEY_ID\fR and
|
|
|
|
|
\fB\fCAWS_SECRET_ACCESS_KEY\fR, respectively.
|
|
|
|
|
|