## Route53Provider provider for octoDNS
An [octoDNS](https://github.com/octodns/octodns/) provider that targets [Route53](https://aws.amazon.com/route53/).
### Installation
#### Command line
```
pip install octodns-route53
```
#### requirements.txt/setup.py
Pinning specific versions or SHAs is recommended to avoid unplanned upgrades.
##### Versions
```
# Start with the latest versions and don't just copy what's here
octodns==0.9.14
octodns-route53==0.0.1
```
##### SHAs
```
# Start with the latest/specific versions and don't just copy what's here
-e git+https://git@github.com/octodns/octodns.git@9da19749e28f68407a1c246dfdf65663cdc1c422#egg=octodns
-e git+https://git@github.com/octodns/octodns-route53.git@ec9661f8b335241ae4746eea467a8509205e6a30#egg=octodns_route53
```
### Configuration
#### Route53 Provider
```yaml
providers:
route53:
class: octodns_route53.Route53Provider
# The AWS access key id
access_key_id: env/AWS_ACCESS_KEY_ID
# The AWS secret access key
secret_access_key: env/AWS_SECRET_ACCESS_KEY
# The AWS session token (optional)
# Only needed if using temporary security credentials
#session_token: env/AWS_SESSION_TOKEN
```
Alternatively, you may leave out access_key_id, secret_access_key and session_token. This will result in boto3 deciding authentication dynamically.
In general the account used will need full permissions on Route53.
#### Ec2Souce
```yaml
providers:
ec2:
class: octodns_route53.Ec2Source
# auth options are the same as Route53Provider
access_key_id: env/AWS_ACCESS_KEY_ID
secret_access_key: env/AWS_SECRET_ACCESS_KEY
# The region in which to look for EC2 instances, required.
region: us-east-1
# Prefix for tag keys containing fqdn(s)
#tag_prefix: octodns
# String to append to all names and tag values
#append_to_names: mydomain.com.
#ttl: 3600
```
In general the account used will need read permissions on EC2 instances.
Records are driven off of the tags attached to the EC2 instances. The "Name" tag and any tags starting with `tag_prefix` are considered.
The value of the tag should be one or more fqdns separated by a `/` character. You can append a string to the name and all tag values with `append_to_names`.
When a zone is being populated any fqdns matching the zone name will result in records. When the instance has a private IPv4 address an A record will be created. When the instance has an IPv6 address a AAAA record will be created.
When the zone is a sub-zone of in-addr.arpa. PTR records will be created for private IPv4 addresses that match the zone. The value(s) will be the fqdn(s) associated with that private IPv4 address.
When the zone is a sub-zone of ip6.arpa. PTR records will be created for IPv6 addresses that match the zone. The value(s) will be the fqdn(s) associated with that IPv6 address.
#### ElbSouce
```yaml
providers:
elb:
class: octodns_route53.ElbSource
# auth options are the same as Route53Provider
access_key_id: env/AWS_ACCESS_KEY_ID
secret_access_key: env/AWS_SECRET_ACCESS_KEY
# The region in which to look for ELB instances, required.
region: us-east-1
# Prefix for tag keys containing fqdn(s)
#tag_prefix: octodns
# String to append to all names and tag values
#append_to_names: mydomain.com.
#ttl: 3600
```
In general the account used will need read permissions on ELB instances and tags.
Records are driven off of the ELB name and the tags attached to the ELB instances. Any tag with `tag_prefix` is considered.
The value of the tag should be one or more fqdns separated by a `/` character. You can append a string to the name and all tag values with `append_to_names`.
When a zone is being populated any fqdns matching the zone name will result in records CNAME records with the target value being the DNSName of the ELB instance.
#### Example Tags for EC2/ELB
```yaml
# This will result in an ALIAS record for example.com. -> DNSName
octodns: example.com.
# This will result in a CNAME record for foo.example.com. -> DNSName
octodns: foo.example.com.
# This will result in CNAME records for foo.example.com. and bar.other.com.
# -> DNSName
octodns: foo.example.com./bar.other.com.
# Tags are limited to 255 characters so in order to support long and/or
# numerous fqdns tags prefixed with `tag_prefix` are considered. It is also
# acceptable to add multiple tags rather than separating things with `/`
octodns-1: foo.example.com.
octodns-2: bar.other.com.
```
#### Processors
```yaml
processors:
awsacm:
class: octodns.processor.acme.AwsAcmMangingProcessor
...
zones:
something.com.:
...
processors:
- awsacm
...
```
### Support Information
#### Records
A, AAAA, CAA, CNAME, DS, MX, NAPTR, NS, PTR, SPF, SRV, TXT
#### Root NS Records
Route53Provider supports full root NS record management.
#### Dynamic
Route53Provider supports dynamic records, CNAME health checks don't support a Host header.
#### Provider Specific Types
`Route53Provider/ALIAS` adds support for the Route53 specific symlink style alias records.
```yaml
# "symlink" to another record in the same zone
alias:
type: Route53Provider/ALIAS
values:
# ALIAS for the zone APEX A record
- type: A
# ALIAS for www.whatever.com. AAAA
- evaluate-target-health: false
# same-zone aliases omit the zone name
name: www
type: AAAA
# "symlink" to a AWS service
alb:
type: Route53Provider/ALIAS
value:
# default for evaluate-target-health is False
evaluate-target-health: true
# hosted-zone-id should only be used when pointing to service endpoints
hosted-zone-id: Z42SXDOTRQ7X7K
name: dualstack.octodns-testing-1165866977.us-east-1.elb.amazonaws.com.
type: A
```
#### Health Check Options
See https://github.com/octodns/octodns/blob/master/docs/dynamic_records.md#health-checks for information on health checking for dynamic records. Route53Provider supports the following options:
| Key | Description | Default |
|--|--|--|
| failure_threshold | Failure threshold before state change, 1-10 | 6 |
| measure_latency | Show latency in AWS console | true |
| request_interval | Healthcheck interval [10\|30] seconds | 10 |
```yaml
---
octodns:
healthcheck:
host: my-host-name
path: /dns-health-check
port: 443
protocol: HTTPS
route53:
healthcheck:
failure_threshold: 3
measure_latency: false
request_interval: 30
```
### Development
See the [/script/](/script/) directory for some tools to help with the development process. They generally follow the [Script to rule them all](https://github.com/github/scripts-to-rule-them-all) pattern. Most useful is `./script/bootstrap` which will create a venv and install both the runtime and development related requirements. It will also hook up a pre-commit hook that covers most of what's run by CI.
Raw data
{
"_id": null,
"home_page": "https://github.com/octodns/octodns-route53",
"name": "octodns-route53",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "Ross McFarland",
"author_email": "rwmcfa1@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/fb/2f/e3b31d2b0468c5eb3ab5020d26779a7e5c46133d6573e3467d96a71181d3/octodns-route53-0.0.7.tar.gz",
"platform": null,
"description": "## Route53Provider provider for octoDNS\n\nAn [octoDNS](https://github.com/octodns/octodns/) provider that targets [Route53](https://aws.amazon.com/route53/).\n\n### Installation\n\n#### Command line\n\n```\npip install octodns-route53\n```\n\n#### requirements.txt/setup.py\n\nPinning specific versions or SHAs is recommended to avoid unplanned upgrades.\n\n##### Versions\n\n```\n# Start with the latest versions and don't just copy what's here\noctodns==0.9.14\noctodns-route53==0.0.1\n```\n\n##### SHAs\n\n```\n# Start with the latest/specific versions and don't just copy what's here\n-e git+https://git@github.com/octodns/octodns.git@9da19749e28f68407a1c246dfdf65663cdc1c422#egg=octodns\n-e git+https://git@github.com/octodns/octodns-route53.git@ec9661f8b335241ae4746eea467a8509205e6a30#egg=octodns_route53\n```\n\n### Configuration\n\n#### Route53 Provider\n\n```yaml\nproviders:\n route53:\n class: octodns_route53.Route53Provider\n # The AWS access key id\n access_key_id: env/AWS_ACCESS_KEY_ID\n # The AWS secret access key\n secret_access_key: env/AWS_SECRET_ACCESS_KEY\n # The AWS session token (optional)\n # Only needed if using temporary security credentials\n #session_token: env/AWS_SESSION_TOKEN\n```\n\nAlternatively, you may leave out access_key_id, secret_access_key and session_token. This will result in boto3 deciding authentication dynamically.\n\nIn general the account used will need full permissions on Route53.\n\n#### Ec2Souce\n\n```yaml\nproviders:\n ec2:\n class: octodns_route53.Ec2Source\n # auth options are the same as Route53Provider\n access_key_id: env/AWS_ACCESS_KEY_ID\n secret_access_key: env/AWS_SECRET_ACCESS_KEY\n # The region in which to look for EC2 instances, required.\n region: us-east-1\n # Prefix for tag keys containing fqdn(s)\n #tag_prefix: octodns\n # String to append to all names and tag values\n #append_to_names: mydomain.com.\n #ttl: 3600\n```\n\nIn general the account used will need read permissions on EC2 instances.\n\nRecords are driven off of the tags attached to the EC2 instances. The \"Name\" tag and any tags starting with `tag_prefix` are considered.\n\nThe value of the tag should be one or more fqdns separated by a `/` character. You can append a string to the name and all tag values with `append_to_names`.\n\nWhen a zone is being populated any fqdns matching the zone name will result in records. When the instance has a private IPv4 address an A record will be created. When the instance has an IPv6 address a AAAA record will be created.\n\nWhen the zone is a sub-zone of in-addr.arpa. PTR records will be created for private IPv4 addresses that match the zone. The value(s) will be the fqdn(s) associated with that private IPv4 address.\n\nWhen the zone is a sub-zone of ip6.arpa. PTR records will be created for IPv6 addresses that match the zone. The value(s) will be the fqdn(s) associated with that IPv6 address.\n\n#### ElbSouce\n\n```yaml\nproviders:\n elb:\n class: octodns_route53.ElbSource\n # auth options are the same as Route53Provider\n access_key_id: env/AWS_ACCESS_KEY_ID\n secret_access_key: env/AWS_SECRET_ACCESS_KEY\n # The region in which to look for ELB instances, required.\n region: us-east-1\n # Prefix for tag keys containing fqdn(s)\n #tag_prefix: octodns\n # String to append to all names and tag values\n #append_to_names: mydomain.com.\n #ttl: 3600\n```\n\nIn general the account used will need read permissions on ELB instances and tags.\n\nRecords are driven off of the ELB name and the tags attached to the ELB instances. Any tag with `tag_prefix` is considered.\n\nThe value of the tag should be one or more fqdns separated by a `/` character. You can append a string to the name and all tag values with `append_to_names`.\n\nWhen a zone is being populated any fqdns matching the zone name will result in records CNAME records with the target value being the DNSName of the ELB instance.\n\n#### Example Tags for EC2/ELB\n\n```yaml\n# This will result in an ALIAS record for example.com. -> DNSName\noctodns: example.com.\n\n# This will result in a CNAME record for foo.example.com. -> DNSName\noctodns: foo.example.com.\n\n# This will result in CNAME records for foo.example.com. and bar.other.com.\n# -> DNSName\noctodns: foo.example.com./bar.other.com.\n\n# Tags are limited to 255 characters so in order to support long and/or\n# numerous fqdns tags prefixed with `tag_prefix` are considered. It is also\n# acceptable to add multiple tags rather than separating things with `/`\noctodns-1: foo.example.com.\noctodns-2: bar.other.com.\n```\n\n#### Processors\n\n```yaml\nprocessors:\n awsacm:\n class: octodns.processor.acme.AwsAcmMangingProcessor\n\n...\n\nzones:\n something.com.:\n ...\n processors:\n - awsacm\n ...\n```\n\n### Support Information\n\n#### Records\n\nA, AAAA, CAA, CNAME, DS, MX, NAPTR, NS, PTR, SPF, SRV, TXT\n\n#### Root NS Records\n\nRoute53Provider supports full root NS record management.\n\n#### Dynamic\n\nRoute53Provider supports dynamic records, CNAME health checks don't support a Host header.\n\n#### Provider Specific Types\n\n`Route53Provider/ALIAS` adds support for the Route53 specific symlink style alias records.\n\n```yaml\n# \"symlink\" to another record in the same zone\nalias:\n type: Route53Provider/ALIAS\n values:\n # ALIAS for the zone APEX A record\n - type: A\n # ALIAS for www.whatever.com. AAAA\n - evaluate-target-health: false\n # same-zone aliases omit the zone name\n name: www\n type: AAAA\n# \"symlink\" to a AWS service\nalb:\n type: Route53Provider/ALIAS\n value:\n # default for evaluate-target-health is False\n evaluate-target-health: true\n # hosted-zone-id should only be used when pointing to service endpoints\n hosted-zone-id: Z42SXDOTRQ7X7K\n name: dualstack.octodns-testing-1165866977.us-east-1.elb.amazonaws.com.\n type: A\n```\n\n#### Health Check Options\n\nSee https://github.com/octodns/octodns/blob/master/docs/dynamic_records.md#health-checks for information on health checking for dynamic records. Route53Provider supports the following options:\n\n| Key | Description | Default |\n|--|--|--|\n| failure_threshold | Failure threshold before state change, 1-10 | 6 |\n| measure_latency | Show latency in AWS console | true |\n| request_interval | Healthcheck interval [10\\|30] seconds | 10 |\n\n```yaml\n---\n octodns:\n healthcheck:\n host: my-host-name\n path: /dns-health-check\n port: 443\n protocol: HTTPS\n route53:\n healthcheck:\n failure_threshold: 3\n measure_latency: false\n request_interval: 30\n```\n\n### Development\n\nSee the [/script/](/script/) directory for some tools to help with the development process. They generally follow the [Script to rule them all](https://github.com/github/scripts-to-rule-them-all) pattern. Most useful is `./script/bootstrap` which will create a venv and install both the runtime and development related requirements. It will also hook up a pre-commit hook that covers most of what's run by CI.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Route53Provider provider for octoDNS",
"version": "0.0.7",
"project_urls": {
"Homepage": "https://github.com/octodns/octodns-route53"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ad37cd6588e4f8997fbac9b5d592bc6078de2f7c5596577fcbcada1349762724",
"md5": "7c11b05d85250bedcfd551be48ac85bf",
"sha256": "bc0f2f8ad0d71a92f4a047ec4d440bebe1057b018e4a576de219d262e87738f0"
},
"downloads": -1,
"filename": "octodns_route53-0.0.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7c11b05d85250bedcfd551be48ac85bf",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 25862,
"upload_time": "2024-04-11T23:51:03",
"upload_time_iso_8601": "2024-04-11T23:51:03.041698Z",
"url": "https://files.pythonhosted.org/packages/ad/37/cd6588e4f8997fbac9b5d592bc6078de2f7c5596577fcbcada1349762724/octodns_route53-0.0.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fb2fe3b31d2b0468c5eb3ab5020d26779a7e5c46133d6573e3467d96a71181d3",
"md5": "93b12b07209a868dd5a42f04a0a463f8",
"sha256": "e3f70f58eace6be5299dfe8ec37ee9d16fd6d934382bc1c4bf3257f3ef8ff5ca"
},
"downloads": -1,
"filename": "octodns-route53-0.0.7.tar.gz",
"has_sig": false,
"md5_digest": "93b12b07209a868dd5a42f04a0a463f8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 45678,
"upload_time": "2024-04-11T23:51:04",
"upload_time_iso_8601": "2024-04-11T23:51:04.531565Z",
"url": "https://files.pythonhosted.org/packages/fb/2f/e3b31d2b0468c5eb3ab5020d26779a7e5c46133d6573e3467d96a71181d3/octodns-route53-0.0.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-11 23:51:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "octodns",
"github_project": "octodns-route53",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "octodns-route53"
}