英文:
How to fix "The specified queue does not exist for this wsdl version" error?
问题
我尝试使用LocalStack在本地创建AWS SQS队列。以下是我的终端操作:
我使用以下命令创建队列:
aws --endpoint-url=http://localhost:4566 sqs create-queue --queue-name activitiesQueue
然后,我使用以下命令列出队列:
aws --endpoint-url=http://localhost:4566 sqs list-queues
然后显示了创建的队列。
我尝试使用以下命令消费队列消息,或者尝试启动Node.js服务器:
命令:
aws --endpoint-url=http://localhost:4566 sqs send-message --region us-east-1 --queue-url "http://localhost:4566/000000000000/activitiesQueue" --message-body '{"command":["do-something"]}'
然后出现了以下错误:
An error occurred (AWS.SimpleQueueService.NonExistentQueue) when calling the SendMessage operation: The specified queue does not exist for this wsdl version
我还设置了AWS凭据:
路径:
C:\Users\user\.aws
[default]
aws_access_key_id = XXXXXXXXXXXXXXXXXX
aws_secret_access_key = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
英文:
I try to use LocalStack and create aws sqs queues locally.
Here is my terminal:
I create queues using this command aws --endpoint-url=http://localhost:4566 sqs create-queue --queue-name activitiesQueue
Then list queue using this command aws --endpoint-url=http://localhost:4566 sqs list-queues
Then created queues are displayed.
I try to consume queue messages using command or try to start node.js server:
Command:aws --endpoint-url=http://localhost:4566 sqs send-message --region us-east-1 --queue-url "http://localhost:4566/000000000000/activitiesQueue" --message-body '{"command":["do-something"]}'
then the following error occurred.
> An error occurred (AWS.SimpleQueueService.NonExistentQueue) when calling the SendMessage operation: The specified queue does not exist
> for this wsdl version
I also set aws credentials:
> path:
C:\Users\user.aws
[default]
aws_access_key_id = XXXXXXXXXXXXXXXXXX
aws_secret_access_key = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
答案1
得分: 3
我使用 LocalStack config show
命令检查了LocalStack的默认区域。
默认区域是"ap-southeast-1"。然后我在config.js文件中创建了一个带有AWS区域的队列。
区域不匹配是错误的原因。
使用 aws --endpoint-url=http://localhost:4566 sqs create-queue --queue-name activitiesQueue --region us-east-1
命令,我创建了一个队列。
然后使用 aws --endpoint-url=http://localhost:4566 sqs list-queues --region us-east-1
命令检查了在LocalStack中创建的所有队列。
英文:
I checked the LocalStack default region using LocalStack config show
command.
The default region was "ap-southeast-1". Then I created a queue with the aws region in the config.js file.
Region mismatch was the cause of the error.
aws --endpoint-url=http://localhost:4566 sqs create-queue --queue-name activitiesQueue --region us-east-1
Then using aws --endpoint-url=http://localhost:4566 sqs list-queues --region us-east-1
command I checked all the created queues in the LocalStack.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论