Skip to content

Commit 3839796

Browse files
authored
chore(lambda-event-sources): fix typo in readme (aws#9959)
>This is a fix for the README in the Kinesis event source example. This removes the undeclared variable `queue` from the example and replaces it with the `stream`. This is a simple typo pointing to a variable that was not declared in the example for Kinesis. The motivation for this change is: - To ensure developers have accurate documentation. - To ensure developers have a good experience when attempting to understand the features of the CDK from the documentation. There is a convention in the README's to refer to variables outside the scope of the example e.g. ```ts myFunction.addEventSource( //etc ``` Where `myFunction` is not declared in the scope of the example. This fix prevents the assumption that a `queue` resource has also been created outside the scope of the example. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 450becf commit 3839796

File tree

1 file changed

+1
-1
lines changed
  • packages/@aws-cdk/aws-lambda-event-sources

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ import { KinesisEventSource } from '@aws-cdk/aws-lambda-event-sources';
196196

197197
const stream = new kinesis.Stream(this, 'MyStream');
198198

199-
myFunction.addEventSource(new KinesisEventSource(queue, {
199+
myFunction.addEventSource(new KinesisEventSource(stream, {
200200
batchSize: 100, // default
201201
startingPosition: lambda.StartingPosition.TRIM_HORIZON
202202
});

0 commit comments

Comments
 (0)