getlift / lift

Expanding Serverless Framework beyond functions using the AWS CDK
MIT License
912 stars 111 forks source link

Support visibility timeout to be set #309

Open kais-viz opened 1 year ago

kais-viz commented 1 year ago

Start from the Use-case

I would like to be able to set the visibility timeout on certain queues to be less than the recommended timeout * 6 I have a set of functions that take 5 minutes to run but waiting 30minutes for the next execution is too long.

Example Config

constructs:
  aswesome-sqs-queue:
    type: queue
    timeout: 300
    hidden: 300
    worker:
      handler: src/handlers/awesome.handler

Implementation Idea

No response

mnapoli commented 1 year ago

I think that makes sense. The AWS recommendation is super high in some cases (e.g. the use case described above).

Also, since the introduction of more controls over the concurrency, the risk of throttling should be decreased in some cases, allowing to lower the visibility timeout without too many risks on the errors (that's the theory at least).

I'd be +1 on merging such a change, WDYT @fredericbarthelet?