Skip to content

fix(amazon): extend SQS QUEUE_REGEXP to match AWS China endpoints#65173

Merged
vincbeck merged 1 commit into
apache:mainfrom
alliasgher:fix-sqs-china-domain
Apr 14, 2026
Merged

fix(amazon): extend SQS QUEUE_REGEXP to match AWS China endpoints#65173
vincbeck merged 1 commit into
apache:mainfrom
alliasgher:fix-sqs-china-domain

Conversation

@alliasgher

Copy link
Copy Markdown
Contributor

What does this PR do?

QUEUE_REGEXP only matched amazonaws.com domains, so SqsMessageQueueProvider.queue_matches() returned False for AWS China region URLs such as:

https://sqs.cn-north-1.amazonaws.cn/123456789012/my-queue

Extends the regex to accept amazonaws.cn as an alternate domain suffix, supporting China regions cn-north-1 and cn-northwest-1.

Fixes #65128

Are there any user-facing changes?

SQS queue URLs in AWS China regions are now correctly recognised by the SqsMessageQueueProvider.

Checklist

  • Added test cases for cn-north-1 and cn-northwest-1 China region URLs in test_message_sqs_queue_matches

Signed-off-by: Ali alliasgher123@gmail.com

The QUEUE_REGEXP only matched standard amazonaws.com domains, causing
SqsMessageQueueProvider.queue_matches() to return False for China region
queue URLs (amazonaws.cn). Added amazonaws.cn as an alternate domain in
the regex to support cn-north-1 and cn-northwest-1 regions.

Fixes apache#65128

Signed-off-by: Ali <alliasgher123@gmail.com>
@vincbeck
vincbeck merged commit e3d7338 into apache:main Apr 14, 2026
94 checks passed
@boring-cyborg

boring-cyborg Bot commented Apr 14, 2026

Copy link
Copy Markdown

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

@crazy-canux

Copy link
Copy Markdown

thanks for quick fix.
but https://sqs.cn-northwest-1.amazonaws.com.cn/123456/my_sqs is the right domain.

alliasgher added a commit to alliasgher/airflow that referenced this pull request Apr 15, 2026
Follow-up to apache#65173. AWS China regions use the endpoint suffix
amazonaws.com.cn, not amazonaws.cn. The regex shipped in apache#65173 fails
to match real AWS China SQS URLs like:

    https://sqs.cn-northwest-1.amazonaws.com.cn/123456/my-sqs

Update the regex to accept the optional .cn suffix on amazonaws.com,
and update the tests to use the correct endpoint. Reported by
@crazy-canux in apache#65128.
vincbeck pushed a commit that referenced this pull request Apr 15, 2026
)

Follow-up to #65173. AWS China regions use the endpoint suffix
amazonaws.com.cn, not amazonaws.cn. The regex shipped in #65173 fails
to match real AWS China SQS URLs like:

    https://sqs.cn-northwest-1.amazonaws.com.cn/123456/my-sqs

Update the regex to accept the optional .cn suffix on amazonaws.com,
and update the tests to use the correct endpoint. Reported by
@crazy-canux in #65128.
karenbraganz pushed a commit to karenbraganz/airflow that referenced this pull request Apr 16, 2026
…che#65299)

Follow-up to apache#65173. AWS China regions use the endpoint suffix
amazonaws.com.cn, not amazonaws.cn. The regex shipped in apache#65173 fails
to match real AWS China SQS URLs like:

    https://sqs.cn-northwest-1.amazonaws.com.cn/123456/my-sqs

Update the regex to accept the optional .cn suffix on amazonaws.com,
and update the tests to use the correct endpoint. Reported by
@crazy-canux in apache#65128.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:amazon AWS/Amazon - related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SQS domain not cover AWS China.

3 participants