[英]Test sending SQS message from role in Cloud9 having send / received message permission to queue but no message received
I was using Cloud9 to assume a role to test on the dynamic permission to send message to a queue.我正在使用 Cloud9 承担一个角色来测试将消息发送到队列的动态权限。
In cloud9, i assumed this role with the following permissions在 cloud9 中,我使用以下权限承担了这个角色
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"sqs:DeleteMessage",
"sqs:ReceiveMessage",
"sqs:SendMessage",
"sqs:GetQueueAttributes"
],
"Resource": [
"arn:aws:sqs:us-west-2:{accountID}:general-queue-abc",
"arn:aws:sqs:eu-west-2:{accountID}:individual-queue-${insert-attribute-by-customer-name}"
]
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": "sqs:ListQueues",
"Resource": "*"
}
]
} }
After assuming and verifying the right role was assumed, i use cli to send message to the queue, it succeeded with the output在假设并验证了正确的角色后,我使用 cli 将消息发送到队列,它成功了 output
{
"MD5OfMessageBody": "dummyNumbers",
"MessageId": "dummyNumbers" }
Expected: SQS to show as 1 message received since the message sent request succeeded.预期:自消息发送请求成功以来,SQS 显示为收到 1 条消息。
What I saw instead - Number Of Messages Sent increased but no Number Of Messages Received相反,我看到的是 - 发送的消息数量增加但接收的消息数量没有增加
But the queue shows message available但队列显示消息可用
My command我的命令
aws sqs send-message --queue-url https://sqs.{REGION}.amazonaws.com/{AccountID}/individual-queue-{insert-attribute-by-customer-name} --message-body "I am sending a new message...."
Question:问题:
thanks in advance提前致谢
Sounds like you have sent 2 messages but haven't received (ie read from the queue) any.听起来你已经发送了 2 条消息,但还没有收到(即从队列中读取)任何消息。 Try running the following to receive a message:
尝试运行以下命令以接收消息:
aws sqs receive-message --queue-url https://sqs.{REGION}.amazonaws.com/{AccountID}/individual-queue-{insert-attribute-by-customer-name}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.