Skip to content

Commit

Permalink
chore(lambda-event-sources): fix typo in readme (aws#9959)
Browse files Browse the repository at this point in the history
>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*
  • Loading branch information
simonireilly authored Oct 16, 2020
1 parent 450becf commit 3839796
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-lambda-event-sources/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ import { KinesisEventSource } from '@aws-cdk/aws-lambda-event-sources';

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

myFunction.addEventSource(new KinesisEventSource(queue, {
myFunction.addEventSource(new KinesisEventSource(stream, {
batchSize: 100, // default
startingPosition: lambda.StartingPosition.TRIM_HORIZON
});
Expand Down

0 comments on commit 3839796

Please sign in to comment.