Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sqs lambda doesn't work for FIFO queue #12

Closed
mmuller88 opened this issue Jun 30, 2020 · 1 comment
Closed

Sqs lambda doesn't work for FIFO queue #12

mmuller88 opened this issue Jun 30, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@mmuller88
Copy link

mmuller88 commented Jun 30, 2020

The aws-sqs-lambda pattern fails if you want to use a fifo sqs queue as the documentation says that the name of the queue needs to end with .fifo https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html . But as the dead letter queue is applied too and gets the same name when you use the queueProps parameter. https://github.com/awslabs/aws-solutions-constructs/blob/master/source/patterns/%40aws-solutions-constructs/aws-sqs-lambda/lib/index.ts#L51

One easy fix would be to create dlqueueProps . I created a PR: #13

Reproduction Steps

Apply:

    const sqsToLambda = new SqsToLambda(scope, 'SqsToLambda', {
      deployLambda: false,
      existingLambdaObj: this.executerLambda,
      queueProps: {
        queueName: `${scope.stackName}.fifo`,
        fifo: true,
      },
    });

Error Log

9/61 | 1:58:45 PM | UPDATE_FAILED | AWS::SQS::Queue | SqsToLambda/queue (SqsToLambdaqueueE6C100FE) AlfInstancesStackEuWest1Dev.fifo already exists in stack arn:aws:cloudformation:eu-west-1:981237193288:stack/AlfInstancesStackEuWest1Dev/3e9fb030-baae-11ea-8a64-0abd335268a4
new Queue (/home/travis/build/mmuller88/alf-cdk/node_modules/@aws-solutions-constructs/core/node_modules/@aws-cdk/aws-sqs/lib/queue.js:48:23)
_ Object.buildQueue (/home/travis/build/mmuller88/alf-cdk/node_modules/@aws-solutions-constructs/core/lib/sqs-helper.js:38:12)
_ new SqsToLambda (/home/travis/build/mmuller88/alf-cdk/node_modules/@aws-solutions-constructs/aws-sqs-lambda/lib/index.js:51:34)
_ new AlfCdkLambdas (/home/travis/build/mmuller88/alf-cdk/lib/AlfCdkLambdas.js:141:29)
_ new AlfInstancesStack (/home/travis/build/mmuller88/alf-cdk/index.js:13:25)
_ Object. (/home/travis/build/mmuller88/alf-cdk/index.js:89:1)
_ Module._compile (internal/modules/cjs/loader.js:1138:30)
_ Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
_ Module.load (internal/modules/cjs/loader.js:986:32)
_ Function.Module._load (internal/modules/cjs/loader.js:879:14)
_ Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
_ internal/main/run_main_module.js:17:47

Environment

  • **CDK CLI Version : 1.47
  • **AWS Solutions Constructs Version : 1.47

Other

My current workaround is to disable the deadletter queue with

deployDeadLetterQueue: false


This is 🐛 Bug Report

@mmuller88 mmuller88 added the bug Something isn't working label Jun 30, 2020
@hnishar
Copy link
Contributor

hnishar commented Jul 6, 2020

mmuller88@ Thanks for the contribution, the PR has been merged in v1.48.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants