# AWS Route53 weighted record synced only one entry

**URL:** <https://community.cloudquery.io/t/aws-route53-weighted-record-synced-only-one-entry/1222>\
**Category:** CloudQuery Plugins\
**Tags:** aws\
**Created:** [August 11, 2025, 11:42am UTC](https://community.cloudquery.io/t/aws-route53-weighted-record-synced-only-one-entry/1222 "2025-08-11T11:42:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karl](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@Karl](https://community.cloudquery.io/u/Karl)\
**Post date:** [August 11, 2025, 11:42am UTC](https://community.cloudquery.io/t/aws-route53-weighted-record-synced-only-one-entry/1222/1 "2025-08-11T11:42:04Z")

</div>

Hello,

I have configured two weighted records in Route 53 with the same record name and type:

- **Record name:** A

- **Type:** CNAME

- **Routing policy:** Weighted

- **Weights:** 10 and 0

Both records exist in Route 53, but when I query the `aws_route53_hosted_zone_resource_record_sets` table, only one of these records is returned.

Could you confirm if this is expected behavior for weighted records with the same name, or if there might be an issue with the data synchronization to this table?

Thank you.

---

<div class="post-metadata">

**Author:** ![stefan](https://sea1.discourse-cdn.com/flex001/user_avatar/community.cloudquery.io/stefan/32/75_2.png) [@stefan](https://community.cloudquery.io/u/stefan)\
**Post date:** [August 11, 2025, 12:14pm UTC](https://community.cloudquery.io/t/aws-route53-weighted-record-synced-only-one-entry/1222/2 "2025-08-11T12:14:54Z")

</div>

Hey @Karl,

First things first, welcome to the CloudQuery community! 👋

The `aws_route53_hosted_zone_resource_record_sets` table actually uses APIs similar to what the [list-resource-record-sets — AWS CLI 2.28.6 Command Reference](https://docs.aws.amazon.com/cli/latest/reference/route53/list-resource-record-sets.html) CLI command would, so could you try that out and let us know if the behaviour is different? Could you share the output with us?

Since the Primary Key on that table is built out of Name and Type, I would expect one of two things to happen:

1. either both records are returned but the first one is dropped due to the PK conflict, or,
2. the AWS API & CLI actually only return a single record

Looking forward to your reply!

---

<div class="post-metadata">

**Author:** ![Karl](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@Karl](https://community.cloudquery.io/u/Karl)\
**Post date:** [August 12, 2025, 12:13am UTC](https://community.cloudquery.io/t/aws-route53-weighted-record-synced-only-one-entry/1222/3 "2025-08-12T00:13:21Z")

</div>

@stefan Thanks for checking!  
I ran the AWS CLI `list-resource-record-sets` command, and it returns both records.  
It seems like the PK conflict issue you mentioned.

```bash
$ aws route53 list-resource-record-sets --hosted-zone-id <id> | jq '.ResourceRecordSets[] | select(.Name == "<name>")'
{
  "Name": "<name>",
  "Type": "CNAME",
  "SetIdentifier": "active",
  "Weight": 10,
  "TTL": 300,
  "ResourceRecords": [...]
}
{
  "Name": "<name>",
  "Type": "CNAME",
  "SetIdentifier": "inactive",
  "Weight": 0,
  "TTL": 300,
  "ResourceRecords": [...]
}

```

When I run this query, only one record is returned.

```sql
SELECT * 
FROM public.aws_route53_hosted_zone_resource_record_sets
WHERE EXISTS (
    SELECT 1
    FROM jsonb_array_elements(resource_records) AS record
    WHERE record ->> 'Value' = '<name>'
);

```

If the intention is to behave similarly to the AWS CLI `list-resource-record-sets` output, it would be great to have this fixed. Should I open a GitHub issue for it?

---

<div class="post-metadata">

**Author:** ![stefan](https://sea1.discourse-cdn.com/flex001/user_avatar/community.cloudquery.io/stefan/32/75_2.png) [@stefan](https://community.cloudquery.io/u/stefan)\
**Post date:** [August 12, 2025, 9:30am UTC](https://community.cloudquery.io/t/aws-route53-weighted-record-synced-only-one-entry/1222/4 "2025-08-12T09:30:36Z")

</div>

We managed to reproduce it and included a fix for this in the last version of the AWS plugin, v32.37.0, released today.

> **[AWS Plugin versions | CloudQuery](https://hub.cloudquery.io/plugins/source/cloudquery/aws/latest/versions)**
>
> The CloudQuery AWS plugin allows you to pull data from AWS to any supported destination

Feel free to update to the latest version and let us know if this does it for you.

---

<div class="post-metadata">

**Author:** ![Karl](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@Karl](https://community.cloudquery.io/u/Karl)\
**Post date:** [August 12, 2025, 2:34pm UTC](https://community.cloudquery.io/t/aws-route53-weighted-record-synced-only-one-entry/1222/5 "2025-08-12T14:34:19Z")

</div>

@stefan Thanks for the quick fix — I’ve confirmed it works fine with v32.37.0.

FYI, as a side effect of including it in the PK, I’m seeing the following warning log when synchronizing plain (non-weighted) records:  
`WRN resource resolver finished with validation warning error="missing primary key component on columns: [set_identifier]"`

Anyway, thanks again!

---

<div class="post-metadata">

**Author:** ![erez](https://sea1.discourse-cdn.com/flex001/user_avatar/community.cloudquery.io/erez/32/40_2.png) [@erez](https://community.cloudquery.io/u/erez)\
**Post date:** [August 13, 2025, 8:48am UTC](https://community.cloudquery.io/t/aws-route53-weighted-record-synced-only-one-entry/1222/6 "2025-08-13T08:48:10Z")

</div>

Hi @Karl sorry for the trouble, the warning should be fixed in v32.37.1 of the AWS plugin

---

<div class="post-metadata">

**Author:** ![Karl](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@Karl](https://community.cloudquery.io/u/Karl)\
**Post date:** [August 14, 2025, 1:07pm UTC](https://community.cloudquery.io/t/aws-route53-weighted-record-synced-only-one-entry/1222/7 "2025-08-14T13:07:02Z")

</div>

@erez No worries at all! Really appreciate the fix 🙌 (CloudQuery fan for life 😄)

---

<div class="post-metadata">

**Author:** ![stefan](https://sea1.discourse-cdn.com/flex001/user_avatar/community.cloudquery.io/stefan/32/75_2.png) [@stefan](https://community.cloudquery.io/u/stefan)\
**Post date:** [October 3, 2025, 1:38pm UTC](https://community.cloudquery.io/t/aws-route53-weighted-record-synced-only-one-entry/1222/8 "2025-10-03T13:38:03Z")

</div>


