I am trying to open a SQS queue but I got this error:

2019-07-09 07:20:31,855 pid 3604 tid  800 ERROR    connection <?xml version="1.0
"?><ErrorResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/"><Error><Typ
specified queue does not exist or you do not have access to it.</Message><Detail

I have verified that the queue name is correct.

Here is the permission I granted to the IAM role:

enter image description here



If I run the following

 aws sqs receive-message --queue-url https://sqs.us-west-2.amazonaws.com/12345678/my-queue

It does not throw any exception.

In my code, I use boto to connect to the SQS queue

sqs_conn = boto.sqs.connect_to_region(self.region)
LOG.debug("Getting queue for %s" % queue_name)
return sqs_conn.get_queue(queue_name)

Did I miss any permission to connect to the SQS queue?


First, I would double check my application configuration if it use the proper sqs name/region/account settings.

Here is an example what permissions you might need to give to your application to work with your SQS.

    "Version": "2012-10-17",
    "Statement": [
            "Action": [
            "Effect": "Allow",
            "Resource": [

This will give read/write access to your application, but not administration access.

The aws command you execute probably use your local aws configuration credentials and that's why it does not give any error.

I suspect the main reason here is that boto is trying to list the queue first, before it try use it at all.

More: Amazon SQS API Permissions: Actions and Resource Reference


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.