Skip to content

docs(lambda-event-sources): remove incorrect description regarding receiveMessageWaitTime#26882

Merged
mergify[bot] merged 2 commits intoaws:mainfrom
tam0ri:docs/aws_lambda_event_sources_receive_message_wait_time
Aug 25, 2023
Merged

docs(lambda-event-sources): remove incorrect description regarding receiveMessageWaitTime#26882
mergify[bot] merged 2 commits intoaws:mainfrom
tam0ri:docs/aws_lambda_event_sources_receive_message_wait_time

Conversation

@tam0ri
Copy link
Copy Markdown
Contributor

@tam0ri tam0ri commented Aug 25, 2023

Currently, the document for aws_lambda_event_sources module includes the following description.
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda_event_sources-readme.html#sqs

receiveMessageWaitTime: Will determine long poll duration. The default value is 20 seconds.

However, from SQS perspective, the default value is 0. So, the above description is incorrect.
https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SetQueueAttributes.html

ReceiveMessageWaitTimeSeconds – The length of time, in seconds, for which a ReceiveMessage action waits for a message to arrive. Valid values: An integer from 0 to 20 (seconds). Default: 0.

Also, when we use SQS queue as Lambda's source, Lambda uses long polling regardless of the queue's ReceiveMessageWaitTimeSeconds setting.
https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-scaling

For standard queues, Lambda uses long polling to poll a queue until it becomes active.

So, in this context, receiveMessageWaitTime prop for Queue construct does not affect the behavior of Lambda EventSource. To avoid confusion, this PR remove the description regarding receiveMessageWaitTime from document.

Closes #24795


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team August 25, 2023 07:47
@github-actions github-actions bot added bug This issue is a bug. effort/small Small work item – less than a day of effort p2 valued-contributor [Pilot] contributed between 6-12 PRs to the CDK labels Aug 25, 2023
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Aug 25, 2023
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Aug 25, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Aug 25, 2023
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Aug 25, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mrgrain mrgrain changed the title docs(lambda-event-sources): Remove description regarding receiveMessageWaitTime docs(lambda-event-sources): remove incorrect description regarding receiveMessageWaitTime Aug 25, 2023
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Aug 25, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 00bd753
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 8a3db0a into aws:main Aug 25, 2023
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Aug 25, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug This issue is a bug. effort/small Small work item – less than a day of effort p2 valued-contributor [Pilot] contributed between 6-12 PRs to the CDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

aws-lambda-event-sources: SQS receiveMessageWaitTime's default value is incorrect

3 participants