Skip to content

Commit 8a3db0a

Browse files
authored
docs(lambda-event-sources): remove incorrect description regarding receiveMessageWaitTime (#26882)
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*
1 parent bf441fa commit 8a3db0a

File tree

1 file changed

+0
-4
lines changed
  • packages/aws-cdk-lib/aws-lambda-event-sources

1 file changed

+0
-4
lines changed

packages/aws-cdk-lib/aws-lambda-event-sources/README.md

-4
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ queue parameters. The following parameters will impact Amazon SQS's polling
4949
behavior:
5050

5151
* __visibilityTimeout__: May impact the period between retries.
52-
* __receiveMessageWaitTime__: Will determine [long
53-
poll](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-long-polling.html)
54-
duration. The default value is 20 seconds.
5552
* __batchSize__: Determines how many records are buffered before invoking your lambda function.
5653
* __maxBatchingWindow__: The maximum amount of time to gather records before invoking the lambda. This increases the likelihood of a full batch at the cost of delayed processing.
5754
* __maxConcurrency__: The maximum concurrency setting limits the number of concurrent instances of the function that an Amazon SQS event source can invoke.
@@ -62,7 +59,6 @@ import { SqsEventSource } from 'aws-cdk-lib/aws-lambda-event-sources';
6259

6360
const queue = new sqs.Queue(this, 'MyQueue', {
6461
visibilityTimeout: Duration.seconds(30), // default,
65-
receiveMessageWaitTime: Duration.seconds(20), // default
6662
});
6763
declare const fn: lambda.Function;
6864

0 commit comments

Comments
 (0)