route53.toml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. Name = "Amazon Route 53"
  2. Description = ''''''
  3. URL = "https://aws.amazon.com/route53/"
  4. Code = "route53"
  5. Since = "v0.3.0"
  6. Example = '''
  7. AWS_ACCESS_KEY_ID=your_key_id \
  8. AWS_SECRET_ACCESS_KEY=your_secret_access_key \
  9. AWS_REGION=aws-region \
  10. AWS_HOSTED_ZONE_ID=your_hosted_zone_id \
  11. lego --email you@example.com --dns route53 -d '*.example.com' -d example.com run
  12. '''
  13. Additional = '''
  14. ## Description
  15. AWS Credentials are automatically detected in the following locations and prioritized in the following order:
  16. 1. Environment variables: `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, [`AWS_SESSION_TOKEN`]
  17. 2. Shared credentials file (defaults to `~/.aws/credentials`, profiles can be specified using `AWS_PROFILE`)
  18. 3. Amazon EC2 IAM role
  19. The AWS Region is automatically detected in the following locations and prioritized in the following order:
  20. 1. Environment variables: `AWS_REGION`
  21. 2. Shared configuration file if `AWS_SDK_LOAD_CONFIG` is set (defaults to `~/.aws/config`, profiles can be specified using `AWS_PROFILE`)
  22. If `AWS_HOSTED_ZONE_ID` is not set, Lego tries to determine the correct public hosted zone via the FQDN.
  23. See also:
  24. - [sessions](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/sessions.html)
  25. - [Setting AWS Credentials](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials)
  26. - [Setting AWS Region](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-the-region)
  27. ## IAM Policy Examples
  28. ### Broad privileges for testing purposes
  29. The following [IAM policy](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html) document grants access to the required APIs needed by lego to complete the DNS challenge.
  30. A word of caution:
  31. These permissions grant write access to any DNS record in any hosted zone,
  32. so it is recommended to narrow them down as much as possible if you are using this policy in production.
  33. ```json
  34. {
  35. "Version": "2012-10-17",
  36. "Statement": [
  37. {
  38. "Effect": "Allow",
  39. "Action": [
  40. "route53:GetChange",
  41. "route53:ChangeResourceRecordSets",
  42. "route53:ListResourceRecordSets"
  43. ],
  44. "Resource": [
  45. "arn:aws:route53:::hostedzone/*",
  46. "arn:aws:route53:::change/*"
  47. ]
  48. },
  49. {
  50. "Effect": "Allow",
  51. "Action": "route53:ListHostedZonesByName",
  52. "Resource": "*"
  53. }
  54. ]
  55. }
  56. ```
  57. ### Least privilege policy for production purposes
  58. The following AWS IAM policy document describes the least privilege permissions required for lego to complete the DNS challenge.
  59. Write access is limited to a specified hosted zone's DNS TXT records with a key of `_acme-challenge.example.com`.
  60. Replace `Z11111112222222333333` with your hosted zone ID and `example.com` with your domain name to use this policy.
  61. ```json
  62. {
  63. "Version": "2012-10-17",
  64. "Statement": [
  65. {
  66. "Effect": "Allow",
  67. "Action": "route53:GetChange",
  68. "Resource": "arn:aws:route53:::change/*"
  69. },
  70. {
  71. "Effect": "Allow",
  72. "Action": "route53:ListHostedZonesByName",
  73. "Resource": "*"
  74. },
  75. {
  76. "Effect": "Allow",
  77. "Action": [
  78. "route53:ListResourceRecordSets"
  79. ],
  80. "Resource": [
  81. "arn:aws:route53:::hostedzone/Z11111112222222333333"
  82. ]
  83. },
  84. {
  85. "Effect": "Allow",
  86. "Action": [
  87. "route53:ChangeResourceRecordSets"
  88. ],
  89. "Resource": [
  90. "arn:aws:route53:::hostedzone/Z11111112222222333333"
  91. ],
  92. "Condition": {
  93. "ForAllValues:StringEquals": {
  94. "route53:ChangeResourceRecordSetsNormalizedRecordNames": [
  95. "_acme-challenge.example.com"
  96. ],
  97. "route53:ChangeResourceRecordSetsRecordTypes": [
  98. "TXT"
  99. ]
  100. }
  101. }
  102. }
  103. ]
  104. }
  105. ```
  106. '''
  107. [Configuration]
  108. [Configuration.Credentials]
  109. AWS_ACCESS_KEY_ID = "Managed by the AWS client. Access key ID (`AWS_ACCESS_KEY_ID_FILE` is not supported, use `AWS_SHARED_CREDENTIALS_FILE` instead)"
  110. AWS_SECRET_ACCESS_KEY = "Managed by the AWS client. Secret access key (`AWS_SECRET_ACCESS_KEY_FILE` is not supported, use `AWS_SHARED_CREDENTIALS_FILE` instead)"
  111. AWS_REGION = "Managed by the AWS client (`AWS_REGION_FILE` is not supported)"
  112. AWS_HOSTED_ZONE_ID = "Override the hosted zone ID."
  113. AWS_PROFILE = "Managed by the AWS client (`AWS_PROFILE_FILE` is not supported)"
  114. AWS_SDK_LOAD_CONFIG = "Managed by the AWS client. Retrieve the region from the CLI config file (`AWS_SDK_LOAD_CONFIG_FILE` is not supported)"
  115. AWS_ASSUME_ROLE_ARN = "Managed by the AWS Role ARN (`AWS_ASSUME_ROLE_ARN_FILE` is not supported)"
  116. AWS_EXTERNAL_ID = "Managed by STS AssumeRole API operation (`AWS_EXTERNAL_ID_FILE` is not supported)"
  117. AWS_WAIT_FOR_RECORD_SETS_CHANGED = "Wait for changes to be INSYNC (it can be unstable)"
  118. [Configuration.Additional]
  119. AWS_PRIVATE_ZONE = "Set to true to use private zones only (default: use public zones only)"
  120. AWS_SHARED_CREDENTIALS_FILE = "Managed by the AWS client. Shared credentials file."
  121. AWS_MAX_RETRIES = "The number of maximum returns the service will use to make an individual API request"
  122. AWS_POLLING_INTERVAL = "Time between DNS propagation check in seconds (Default: 4)"
  123. AWS_PROPAGATION_TIMEOUT = "Maximum waiting time for DNS propagation in seconds (Default: 120)"
  124. AWS_TTL = "The TTL of the TXT record used for the DNS challenge in seconds (Default: 10)"
  125. [Links]
  126. API = "https://docs.aws.amazon.com/Route53/latest/APIReference/API_Operations_Amazon_Route_53.html"
  127. GoClient = "https://github.com/aws/aws-sdk-go-v2"