You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/aws/services/kinesis.md
+23-26Lines changed: 23 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,5 @@
1
1
---
2
2
title: "Kinesis Data Streams"
3
-
linkTitle: "Kinesis Data Streams"
4
3
description: Get started with Kinesis Data Streams on LocalStack
5
4
persistence: supported
6
5
tags: ["Free"]
@@ -12,7 +11,7 @@ Kinesis Data Streams is an AWS service for ingesting, buffering, and processing
12
11
It is used for applications that require real-time processing and deriving insights from data streams such as logs, metrics, user interactions, and sensor readings.
13
12
14
13
LocalStack allows you to use the Kinesis Data Streams APIs in your local environment from setting up data streams and configuring data processing to building real-time applications.
15
-
The supported APIs are available on our [API coverage page]({{< ref "coverage_kinesis" >}}).
14
+
The supported APIs are available on our [API coverage page]().
16
15
17
16
Emulation for Kinesis is powered by [Kinesis Mock](https://github.com/etspaceman/kinesis-mock).
@@ -96,30 +95,30 @@ The JSON contains a sample Kinesis event.
96
95
You can use the [`Invoke`](https://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html) API to invoke the Lambda function with the Kinesis event as input.
97
96
Execute the following command:
98
97
99
-
{{< command >}}
100
-
$ awslocal lambda invoke \
98
+
```bash
99
+
awslocal lambda invoke \
101
100
--function-name ProcessKinesisRecords \
102
101
--payload file://input.txt outputfile.txt
103
-
{{< / command >}}
102
+
```
104
103
105
104
### Create a Kinesis Stream
106
105
107
106
You can create a Kinesis Stream using the [`CreateStream`](https://docs.aws.amazon.com/kinesis/latest/APIReference/API_CreateStream.html) API.
108
107
Run the following command to create a Kinesis Stream named `lambda-stream`:
109
108
110
-
{{< command >}}
111
-
$ awslocal kinesis create-stream \
109
+
```bash
110
+
awslocal kinesis create-stream \
112
111
--stream-name lambda-stream \
113
112
--shard-count 1
114
-
{{< / command >}}
113
+
```
115
114
116
115
You can retrieve the Stream ARN using the [`DescribeStream`](https://docs.aws.amazon.com/kinesis/latest/APIReference/API_DescribeStream.html) API.
117
116
Execute the following command:
118
117
119
-
{{< command >}}
120
-
$ awslocal kinesis describe-stream \
118
+
```bash
119
+
awslocal kinesis describe-stream \
121
120
--stream-name lambda-stream
122
-
{{< / command >}}
121
+
```
123
122
124
123
The following output would be retrieved:
125
124
@@ -149,25 +148,25 @@ You can save the `StreamARN` value for later use.
149
148
You can add an Event Source to your Lambda function using the [`CreateEventSourceMapping`](https://docs.aws.amazon.com/lambda/latest/dg/API_CreateEventSourceMapping.html) API.
150
149
Run the following command to add the Kinesis Stream as an Event Source to your Lambda function:
You can test the event source mapping by adding a record to the Kinesis Stream using the [`PutRecord`](https://docs.aws.amazon.com/kinesis/latest/APIReference/API_PutRecord.html) API.
163
162
Run the following command to add a record to the Kinesis Stream:
164
163
165
-
{{< command >}}
166
-
$ awslocal kinesis put-record \
164
+
```bash
165
+
awslocal kinesis put-record \
167
166
--stream-name lambda-stream \
168
167
--partition-key 1 \
169
168
--data "Hello, this is a test."
170
-
{{< / command >}}
169
+
```
171
170
172
171
You can fetch the CloudWatch logs for your Lambda function reading records from the stream, using AWS CLI or LocalStack Resource Browser.
173
172
@@ -183,19 +182,17 @@ Additionally, the following parameters can be tuned:
183
182
184
183
Refer to our [Kinesis configuration documentation](https://docs.localstack.cloud/references/configuration/#kinesis) for more details on these parameters.
185
184
186
-
{{< callout "note" >}}
185
+
:::note
187
186
`KINESIS_MOCK_MAXIMUM_HEAP_SIZE` and `KINESIS_MOCK_INITIAL_HEAP_SIZE` are only applicable when using the Scala engine.
188
187
Future versions of LocalStack will likely default to using the `scala` engine over the less-performant `node` version currently in use.
189
-
{{< /callout >}}
188
+
:::
190
189
191
190
## Resource Browser
192
191
193
192
The LocalStack Web Application provides a Resource Browser for managing Kinesis Streams & Kafka Clusters.
194
193
You can access the Resource Browser by opening the LocalStack Web Application in your browser, navigating to the **Resources** section, and then clicking on **Kinesis** under the **Analytics** section.
0 commit comments