Skip to content

Commit

Permalink
Fixed inconsistencies in commands
Browse files Browse the repository at this point in the history
The lambda is created with a different name from that which is used in the rest of the document.
  • Loading branch information
klmz authored Nov 29, 2018
1 parent 4bc1fe1 commit 250398c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions doc_source/with-kinesis-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ exports.handler = function(event, context) {
1. Create a Lambda function with the `create-function` command\.

```
$ aws lambda create-function --function-name ProcessKinesisRecord \
$ aws lambda create-function --function-name ProcessKinesisRecords \
--zip-file fileb://function.zip --handler index.handler --runtime nodejs8.10 \
--role role-arn
```
Expand Down Expand Up @@ -105,7 +105,7 @@ Invoke your Lambda function manually using the `invoke` AWS Lambda CLI command a
"invokeIdentityArn": "arn:aws:iam::account-id:role/testLEBRole",
"eventVersion": "1.0",
"eventName": "aws:kinesis:record",
"eventSourceARN": "arn:aws:kinesis:us-west-2:35667example:stream/examplestream",
"eventSourceARN": "arn:aws:kinesis:us-west-2:35667example:stream/lambda-stream",
"awsRegion": "us-west-2"
}
]
Expand All @@ -132,7 +132,7 @@ $ aws kinesis create-stream --stream-name lambda-stream --shard-count 1
Run the following `describe-stream` command to get the stream ARN\.

```
$ aws kinesis describe-stream --stream-name examplestream
$ aws kinesis describe-stream --stream-name lambda-stream
arn:aws:kinesis:us-east-2:123456789012:stream/lambda-stream
```

Expand Down Expand Up @@ -162,8 +162,8 @@ In the response, you can verify the status value is `enabled`\. Event source map
To test the event source mapping, add event records to your Kinesis stream\. The `--data` value is a base64\-encoded value of the `"Hello, this is a test."` string\. You can run the same command more than once to add multiple records to the stream\.

```
$ aws kinesis put-record --stream-name examplestream \
$ aws kinesis put-record --stream-name lambda-stream \
--data "SGVsbG8sIHRoaXMgaXMgYSB0ZXN0Lg==" --partition-key shardId-000000000000
```

Lambda uses the execution role to read records from the stream\. Then it invokes your Lambda function, passing in batches of records\. The function decodes data from each record and logs it, sending the output to CloudWatch Logs\. View the logs in the [CloudWatch console](https://console.aws.amazon.com/cloudwatch)\.
Lambda uses the execution role to read records from the stream\. Then it invokes your Lambda function, passing in batches of records\. The function decodes data from each record and logs it, sending the output to CloudWatch Logs\. View the logs in the [CloudWatch console](https://console.aws.amazon.com/cloudwatch)\.

0 comments on commit 250398c

Please sign in to comment.