getlift / lift

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

Global function timeout does not set the queue visibility timeout to x6 timeout #388

Open tgdn opened 3 months ago

tgdn commented 3 months ago

Description

When setting the serverless global function handler timeout as follows:

provider:
  name: aws
  timeout: 450

The resulting queue visibility timeout remains the default 36 seconds which results in a failed deployment.

CREATE_FAILED: NameOfWorkerQueue
Resource handler returned message: "Invalid request provided: Queue visibility timeout: 36 seconds is less than Function timeout: 450 seconds

Version of Lift:

serverless-lift: 1.28.1

How to Reproduce

service: api
frameworkVersion: "3"

provider:
  name: aws
  deploymentMethod: direct
  region: eu-west-1
  architecture: arm64
  memorySize: 256
  timeout: 450
  runtime: nodejs20.x
  iamRoleStatements:
    - Effect: "Allow"
      Action:
        - ses:*
      Resource: "*"
    - Effect: Allow
      Action:
        - sns:*
      Resource: "*"

plugins:
  - serverless-lift

constructs:
  sendEmailWorkerQueue:
    type: queue
    worker:
      handler: src/sendEmail.handler
      timeout: 450
    alarm: myemail@example.com

Additional Information

No response