# Function with SQS queue

**URL:** <https://forum.serverless.com/t/function-with-sqs-queue/15030>\
**Category:** Serverless Framework\
**Created:** [May 17, 2021, 3:49pm UTC](https://forum.serverless.com/t/function-with-sqs-queue/15030 "2021-05-17T15:49:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![neilgilbert](https://avatars.discourse-cdn.com/v4/letter/n/e480ec/32.png) [@neilgilbert](https://forum.serverless.com/u/neilgilbert)\
**Post date:** [May 17, 2021, 3:49pm UTC](https://forum.serverless.com/t/function-with-sqs-queue/15030/1 "2021-05-17T15:49:35Z")

</div>

I’m trying to get my function to wire up to my SQS queue that i create in the resource file

```
functions:
  consumer:
    handler: handler.consumer
    events:
      - sqs:
          batchSize: 1
          arn:
            Fn::GetAtt: [WorkerQueue, Arn]

resources:
  Resources:
    WorkerQueue:
      Type: AWS::SQS::Queue
      Properties:
        QueueName: workerQueue-${self:provider.stage}

```

but i keep getting the following error

AWS::Lambda::EventSourceMapping consumerSQSWorkerQueue UPDATE\_FAILED: Resource handler returned message: “The resource you requested does not exist. (Service: Lambda, Status Code: 404, Request ID: , Extended Request ID: null)” (RequestToken: , HandlerErrorCode: NotFound)

It’s strange because in AWS it looks in the stack that it has worked but i get AWS messages around UPDATE\_ROLLBACK\_COMPLETE

---

<div class="post-metadata">

**Author:** ![beenmeckel](https://avatars.discourse-cdn.com/v4/letter/b/8dc957/32.png) [@beenmeckel](https://forum.serverless.com/u/beenmeckel)\
**Post date:** [June 4, 2021, 10:32pm UTC](https://forum.serverless.com/t/function-with-sqs-queue/15030/2 "2021-06-04T22:32:05Z")

</div>

Cloudwatch alarm for sqs trigger sns which triggers [192.168.100.1](https://1921681001.id/) [192.168.1.1](https://19216811.cam/) lambda
