You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

调用SQS CreateQueue接口返回NonExistentQueue错误的技术问询

Troubleshooting AWS.SimpleQueueService.NonExistentQueue Error When Calling CreateQueue

I totally get the confusion here—calling CreateQueue and getting a NonExistentQueue error that’s not listed in the official API docs feels counterintuitive. Let’s break down the most common scenarios that trigger this and how to fix them:

  • You’re referencing a non-existent resource in queue attributes
    This is the most frequent cause. If your CreateQueue request includes attributes that depend on another resource that doesn’t exist, SQS will throw this error. For example:

    • A RedrivePolicy pointing to a dead-letter queue (DLQ) that hasn’t been created yet, or with a typo in its ARN/name
    • A KmsMasterKeyId referencing a KMS key that doesn’t exist in your account/region
    • Any other attribute that relies on an external SQS queue or resource that’s missing
      Fix: Double-check all attribute values in your request. Verify that DLQs, KMS keys, or other referenced resources exist, and that their ARNs/IDs are spelled exactly correctly.
  • Accidental references to a non-existent queue in your request
    Sometimes SDKs or custom code can sneak in unintended references to another queue. For example, if you’re reusing a parameter object from a previous GetQueueAttributes call, you might accidentally include a QueueArn attribute that points to a queue no longer exists.
    Fix: Inspect the full payload of your CreateQueue request. If you’re using the AWS CLI, add the --debug flag to see the exact JSON being sent. Remove any extraneous attributes that reference queues you don’t intend to use here.

  • Region mismatch issues
    If your SDK/CLI is configured for a different region than where you’re trying to create the queue, or if you’re referencing a resource (like a DLQ) in another region without using its full cross-region ARN, SQS won’t find the resource and throw this error.
    Fix: Confirm your AWS client’s region matches the target region for the new queue. When referencing cross-region resources, use their complete ARN (including the region segment) to ensure SQS can locate them.

  • Rare AWS service-side glitches
    While uncommon, temporary service inconsistencies can sometimes lead to misleading error messages. If you’ve ruled out all the above, try retrying the request a few times, or check if there are any ongoing SQS issues in your region via the AWS Health Dashboard.

It’s worth noting that even though this error isn’t explicitly listed in the CreateQueue docs, it’s a generic SQS error for missing dependent resources. You can use ListQueues or GetQueueAttributes to validate the existence of any referenced resources before calling CreateQueue.

内容的提问来源于stack exchange,提问作者hrdwdmrbl

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 06:28:38