[PR #715] [MERGED] feat(aws): add support to route53 simple records #813

Closed
opened 2025-11-20 04:26:10 -05:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/qdm12/ddns-updater/pull/715
Author: @marcelohpf
Created: 5/9/2024
Status: Merged
Merged: 6/15/2024
Merged by: @qdm12

Base: masterHead: feat/aws-simple-record


📝 Commits (10+)

  • a2697b5 feat(aws): add support to route53 simple records
  • 7cfe867 chore(route53): improve naming conventions
  • 7c41a38 chore(route53): replace sdk by REST API calls
  • 9df677a fix(route53): change domain ttl to int32 and validate too low
  • 9454d3e docs: change default ttl from 60 ro 300
  • 59628ad docs: change indentation for user permissions section
  • fc38eb5 chore: sort route53 alphabetically in list
  • 23468d1 docs(readme): add route53
  • 810eefd chore: inline route53-specific header setting
  • 40b2886 chore: fix lint errors

📊 Changes

11 files changed (+671 additions, -0 deletions)

View changed files

📝 .golangci.yml (+3 -0)
📝 README.md (+1 -0)
docs/route53.md (+58 -0)
📝 internal/provider/constants/providers.go (+2 -0)
📝 internal/provider/errors/validation.go (+2 -0)
📝 internal/provider/provider.go (+3 -0)
internal/provider/providers/route53/api.go (+85 -0)
internal/provider/providers/route53/api_test.go (+157 -0)
internal/provider/providers/route53/provider.go (+192 -0)
internal/provider/providers/route53/signer.go (+90 -0)
internal/provider/providers/route53/signer_test.go (+78 -0)

📄 Description

Changes

This includes the support to Simple Route policy from Route53.

Details:

  • Set default TTL to 300s as it is same default interval as ddns-updater
  • It implements only Simple Routing, there are other 7 policies available for route53, but it is not a use case for me. If there are larger interest on them, I can send more PRs.
  • Providing the basic policy from documentation is enough for upserting domains following least privilege accesses
  • Uses only Static Credentials following this project design (/data/config.json for all provider configs).
  • It doesn't wait for propagation (GetChange API) because it updates one domain at a time and runs quite often.

Testing

Build container and ran with the default configs and using policy in the documentation

Here is one event for a domain that didn't exit at route53

{
    "eventVersion": "1.09",
    "userIdentity": {...},
    "eventTime": "2024-05-09T18:10:47Z",
    "eventSource": "route53.amazonaws.com",
    "eventName": "ChangeResourceRecordSets",
    "awsRegion": "us-east-1",
    "sourceIPAddress": "<redacted>",
    "userAgent": "DDNS-Updater quentin.mcgaw@gmail.com",
    "requestParameters": {
        "hostedZoneId": "<redacted>",
        "changeBatch": {
            "comment": "Record updated by ddns-updater",
            "changes": [
                {
                    "action": "UPSERT",
                    "resourceRecordSet": {
                        "name": "test.<my-domain>",
                        "type": "A",
                        "tTL": 300,
                        "resourceRecords": [
                            {
                                "value": "<redacted>"
                            }
                        ]
                    }
                }
            ]
        }
    },
    "responseElements": {
        "changeInfo": {
            "id": "/change/<redacted>",
            "status": "PENDING",
            "submittedAt": "May 9, 2024 6:10:47 PM",
            "comment": "Record updated by ddns-updater"
        }
    },
   ...
}

Note: this is a partial implementation of #375 because AWS route53 supports many more DNS features.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/qdm12/ddns-updater/pull/715 **Author:** [@marcelohpf](https://github.com/marcelohpf) **Created:** 5/9/2024 **Status:** ✅ Merged **Merged:** 6/15/2024 **Merged by:** [@qdm12](https://github.com/qdm12) **Base:** `master` ← **Head:** `feat/aws-simple-record` --- ### 📝 Commits (10+) - [`a2697b5`](https://github.com/qdm12/ddns-updater/commit/a2697b572cd1c57796fb59dfac05f68837df1c89) feat(aws): add support to route53 simple records - [`7cfe867`](https://github.com/qdm12/ddns-updater/commit/7cfe867881e5b37d675afa2004dd90cda90d064d) chore(route53): improve naming conventions - [`7c41a38`](https://github.com/qdm12/ddns-updater/commit/7c41a38d4d69bb993111b42ee0bd9da0023c1ca2) chore(route53): replace sdk by REST API calls - [`9df677a`](https://github.com/qdm12/ddns-updater/commit/9df677af70b056815117c334b38bef141273c289) fix(route53): change domain ttl to int32 and validate too low - [`9454d3e`](https://github.com/qdm12/ddns-updater/commit/9454d3ed227fc3476ce7c9e34e05f7ea5a2c0e0e) docs: change default ttl from 60 ro 300 - [`59628ad`](https://github.com/qdm12/ddns-updater/commit/59628adf43d9ebdb61400a0ae4af822582569fa5) docs: change indentation for user permissions section - [`fc38eb5`](https://github.com/qdm12/ddns-updater/commit/fc38eb55aa227bcbde0335cb219c9282e9b84c7c) chore: sort route53 alphabetically in list - [`23468d1`](https://github.com/qdm12/ddns-updater/commit/23468d1ac3b31485643630cfe0bbe9fc3fcc19a1) docs(readme): add route53 - [`810eefd`](https://github.com/qdm12/ddns-updater/commit/810eefdf1c4edb0e91fe1f260dd32e43574a3779) chore: inline route53-specific header setting - [`40b2886`](https://github.com/qdm12/ddns-updater/commit/40b288622a680b097d54aafa39ac13582a932501) chore: fix lint errors ### 📊 Changes **11 files changed** (+671 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `.golangci.yml` (+3 -0) 📝 `README.md` (+1 -0) ➕ `docs/route53.md` (+58 -0) 📝 `internal/provider/constants/providers.go` (+2 -0) 📝 `internal/provider/errors/validation.go` (+2 -0) 📝 `internal/provider/provider.go` (+3 -0) ➕ `internal/provider/providers/route53/api.go` (+85 -0) ➕ `internal/provider/providers/route53/api_test.go` (+157 -0) ➕ `internal/provider/providers/route53/provider.go` (+192 -0) ➕ `internal/provider/providers/route53/signer.go` (+90 -0) ➕ `internal/provider/providers/route53/signer_test.go` (+78 -0) </details> ### 📄 Description # Changes This includes the support to Simple Route policy from Route53. # Details: * Set default TTL to 300s as it is same default interval as ddns-updater * It implements only Simple Routing, there are other 7 [policies available for route53](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html#routing-policy-geo), but it is not a use case for me. If there are larger interest on them, I can send more PRs. * Providing the basic policy from documentation is enough for upserting domains following least privilege accesses * Uses only Static Credentials following this project design (/data/config.json for all provider configs). * It doesn't wait for propagation (GetChange API) because it updates one domain at a time and runs quite often. # Testing Build container and ran with the default configs and using policy in the documentation Here is one event for a domain that didn't exit at route53 ```json { "eventVersion": "1.09", "userIdentity": {...}, "eventTime": "2024-05-09T18:10:47Z", "eventSource": "route53.amazonaws.com", "eventName": "ChangeResourceRecordSets", "awsRegion": "us-east-1", "sourceIPAddress": "<redacted>", "userAgent": "DDNS-Updater quentin.mcgaw@gmail.com", "requestParameters": { "hostedZoneId": "<redacted>", "changeBatch": { "comment": "Record updated by ddns-updater", "changes": [ { "action": "UPSERT", "resourceRecordSet": { "name": "test.<my-domain>", "type": "A", "tTL": 300, "resourceRecords": [ { "value": "<redacted>" } ] } } ] } }, "responseElements": { "changeInfo": { "id": "/change/<redacted>", "status": "PENDING", "submittedAt": "May 9, 2024 6:10:47 PM", "comment": "Record updated by ddns-updater" } }, ... } ``` Note: this is a partial implementation of #375 because AWS route53 supports many more DNS features. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2025-11-20 04:26:10 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ddns-updater#813