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

Identify incorrect MessageVisibilityTimeout using EventSourceMapping #3987

Closed
abhinav-enboarder opened this issue Mar 5, 2025 · 0 comments · Fixed by #3990
Closed

Identify incorrect MessageVisibilityTimeout using EventSourceMapping #3987

abhinav-enboarder opened this issue Mar 5, 2025 · 0 comments · Fixed by #3990

Comments

@abhinav-enboarder
Copy link

CloudFormation Lint Version

1.25.0

What operating system are you using?

MacOS

Describe the bug

When creating an SQS queue, Lambda function and an EventSourceMapping that connects the two, we do not get feedback about the message visibility timeout value.

Expected behavior

If the message visibility timeout is less than lambda function's timeout duration, EventSourceMapping creation should error.

Reproduction template

MyFifoQueue:
    Type: AWS::SQS::Queue
    Properties:
      QueueName: MyQueue.fifo
      FifoQueue: true
      ContentBasedDeduplication: true
      VisibilityTimeout: 120 # should be 300 or more
      MessageRetentionPeriod: 7200

SQSBatch:
    Type: AWS::Lambda::EventSourceMapping
    Properties:
      BatchSize: 10
      Enabled: true
      EventSourceArn: !GetAtt MyFifoQueue.Arn
      FunctionName: !Ref Lambda

Lambda:
    Type: AWS::Lambda::Function
    Properties:
      Code:
        S3Bucket: !Sub "${S3Bucket}${AWS::Region}"
        S3Key: !Sub "${Project}/${App}/${Branch}/${Timestamp}/function.zip"
      Role: !ImportValue all-roles:MyRoleArn
      FunctionName: MyFunction
      Timeout: 300
      Handler: index.handler
      Runtime: !Ref LambdaRunTime
      MemorySize: 256
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant