# AWS Route 53 DNS Provider
This is a drop-in provider for apnscp (opens new window) to enable DNS support for accounts that use AWS. This provider is built into apnscp.
# Configuring
EditDomain -c dns,provider=aws -c dns,key='[key:ABCDEF123,secret:AbCdEf12345]' domain.com
Where the key is created within AWS. Your API key is available within your AWS IAM Console (opens new window). See also Managing Access Keys for Your AWS Account Root User (opens new window).
# Configurables
- key: IAM key
- secret: IAM secret
- region: AWS region. Refer to Regions and Availability Zones (opens new window)
# Setting as default
AWS may be configured as the default provider for all sites using the dns.default-provider
Scope (opens new window). When adding a site in Nexus or AddDomain (opens new window) the key will be replaced with "DEFAULT". This is substituted automatically on account creation.
cpcmd config_set dns.default-provider aws
cpcmd config_set dns.default-provider-key '[key:ABCDEF123,secret:abCdEf12345]'
Note that it is not safe to set this value as a server-wide default in untrusted multiuser environments. A user with panel access can retrieve your key
common_get_service_value dns key
or even using Javascript in the panel,apnscp.cmd('common_get_service_value',['dns','key'], {async: false})
.
# Components
- Module- overrides Dns_Module (opens new window) behavior
- Validator- service validator, checks input with AddDomain/EditDomain helpers
# Minimal module methods
All module methods can be overwritten. The following are the bare minimum that are overwritten for this DNS provider to work:
atomicUpdate()
attempts a record modification, which must retain the original record if it failszoneAxfr()
returns all DNS recordsadd_record()
add a DNS recordremove_record()
removes a DNS recordget_hosting_nameservers()
returns nameservers for the DNS provideradd_zone_backend()
creates DNS zoneremove_zone_backend()
removes a DNS zone
See also: Creating a provider (opens new window) (hq.apnscp.com)
# Contributing
Submit a PR and have fun!