# Creating SQS in serverless gives an error: sqs:CreateQueue Access to the resource https://sqs.xx-west-1.amazonaws.com/ is denied

**URL:** <https://forum.serverless.com/t/creating-sqs-in-serverless-gives-an-error-sqs-createqueue-access-to-the-resource-https-sqs-xx-west-1-amazonaws-com-is-denied/8119>\
**Category:** Serverless Framework\
**Created:** [April 29, 2019, 2:21pm UTC](https://forum.serverless.com/t/creating-sqs-in-serverless-gives-an-error-sqs-createqueue-access-to-the-resource-https-sqs-xx-west-1-amazonaws-com-is-denied/8119 "2019-04-29T14:21:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kris\_d](https://avatars.discourse-cdn.com/v4/letter/k/ecc23a/32.png) [@Kris\_d](https://forum.serverless.com/u/Kris_d)\
**Post date:** [April 29, 2019, 2:21pm UTC](https://forum.serverless.com/t/creating-sqs-in-serverless-gives-an-error-sqs-createqueue-access-to-the-resource-https-sqs-xx-west-1-amazonaws-com-is-denied/8119/1 "2019-04-29T14:21:16Z")

</div>

Hi, I am trying to create a SQS using the serveless framework, however I keep getting access denied.  
I have double checked and I have all of the permission on my user.

This is what I have in my serverless yaml:

service: createQueueService

```
provider:
  name: aws
  runtime: nodejs8.10
  region: xx-west-1
  iamRoleStatements:
    - Effect: "Allow"
      Action:
       - "sqs:SendMessage"
       - "sqs:GetQueueAttributes"
       - "sqs:GetQueueUrl"
       - "sqs:ListQueues"
      Resource: "arn:aws:sqs:::HtmlToPDFQueue"

functions:
  createQueue:
    handler: handler.createQueue
    timeout: 15
    events:
      - http:
          path: createqueue
          method: post
          cors: true

resources:
  Resources:
    HtmlToPDFQueue:
      Type: "AWS::SQS::Queue"
      Properties:
        QueueName: "HtmlToPDFQueue"

```

If anyone knows how I can fix this or I am doing something wrong, please let me know. thank you.

---

<div class="post-metadata">

**Author:** ![moro](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/moro/32/4303_2.png) [@moro](https://forum.serverless.com/u/moro)\
**Post date:** [April 30, 2019, 3:26pm UTC](https://forum.serverless.com/t/creating-sqs-in-serverless-gives-an-error-sqs-createqueue-access-to-the-resource-https-sqs-xx-west-1-amazonaws-com-is-denied/8119/2 "2019-04-30T15:26:33Z")

</div>

Hi, maybe you have a typo in your region? I don’t think that the xx-west-1 region exists.  
The regions list it here [https://docs.aws.amazon.com/general/latest/gr/rande.html](https://docs.aws.amazon.com/general/latest/gr/rande.html)

p.s I think you can use `Resource: !GetAtt HtmlToPDFQueue.Arn` instead of const.

---

<div class="post-metadata">

**Author:** ![Kris\_d](https://avatars.discourse-cdn.com/v4/letter/k/ecc23a/32.png) [@Kris\_d](https://forum.serverless.com/u/Kris_d)\
**Post date:** [May 1, 2019, 10:03am UTC](https://forum.serverless.com/t/creating-sqs-in-serverless-gives-an-error-sqs-createqueue-access-to-the-resource-https-sqs-xx-west-1-amazonaws-com-is-denied/8119/3 "2019-05-01T10:03:36Z")

</div>

Hi, the I typed xx-west-1 just to hide eu-west-1, didnt actually typed the xx lol.  
Anyway, problem solved, my Resource arn was wrong and I hade some additional access to sort out for my user.

---

<div class="post-metadata">

**Author:** ![moro](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/moro/32/4303_2.png) [@moro](https://forum.serverless.com/u/moro)\
**Post date:** [May 1, 2019, 12:09pm UTC](https://forum.serverless.com/t/creating-sqs-in-serverless-gives-an-error-sqs-createqueue-access-to-the-resource-https-sqs-xx-west-1-amazonaws-com-is-denied/8119/4 "2019-05-01T12:09:45Z")

</div>

Haha, happy you have found the problem 🙂 as for arn - that’s why I proposed to use `!GetAtt HtmlToPDFQueue.Arn`
