aws-lambda-kinesisstreams
| Reference Documentation: | https://docs.aws.amazon.com/solutions/latest/constructs/ |
| Language | Package |
|---|---|
|
|
|
|
|
|
|
|
|
Overview
This AWS Solutions Construct deploys an AWS Lambda Function that can put records on an Amazon Kinesis Data Stream.
Here is a minimal deployable pattern definition:
Example
Pattern Construct Props
| Name | Type | Description |
|---|---|---|
|
existingLambdaObj? |
Optional - instance of an existing Lambda Function object, providing both this and
|
|
|
lambdaFunctionProps? |
Optional - user provided props to override the default props for the Lambda function. Providing both this and |
|
|
existingStreamObj? |
Existing instance of a Kinesis Data Stream, providing both this and
|
|
|
kinesisStreamProps? |
Optional user-provided props to override the default props for the Kinesis Data Stream. |
|
|
createCloudWatchAlarms |
|
Whether to create recommended CloudWatch Alarms (defaults to true). |
|
existingVpc? |
An optional, existing VPC into which this pattern should be deployed.
When deployed in a VPC, the Lambda function will use ENIs in the VPC to
access network resources and an Interface Endpoint will be created in
the VPC for Amazon Kinesis Streams. If an existing VPC is provided, the
|
|
|
vpcProps? |
Optional user-provided properties to override the default properties
for the new VPC. |
|
|
deployVpc? |
|
Whether to create a new VPC based on |
|
streamEnvironmentVariableName? |
|
Optional Name to override the Lambda Function default environment variable name that holds the Kinesis Data Stream name value. Default: KINESIS_DATASTREAM_NAME |
Pattern Properties
| Name | Type | Description |
|---|---|---|
|
lambdaFunction |
Returns an instance of the Lambda Function. |
|
|
kinesisStream |
Returns an instance of the Kinesis Data Stream. |
|
|
cloudwatchAlarms? |
Returns the CloudWatch Alarms created to monitor the Kinesis Data Stream. |
|
|
vpc? |
Returns an interface to the VPC used by the pattern (if any). This may be a VPC created by the pattern or the VPC supplied to the pattern constructor. |
Default settings
Out of the box implementation of the Construct without any overrides will set the following defaults:
AWS Lambda Function
-
Minimally-permissive IAM role for the Lambda Function to put records on the Kinesis Data Stream
-
Enable X-Ray Tracing
-
Sets an Environment Variable named KINESIS_DATASTREAM_NAME that holds the Kinesis Data Stream Name, which is a required property Kinesis Data Streams SDK when making calls to it
Amazon Kinesis Stream
-
Enable server-side encryption for the Kinesis Data Stream using AWS Managed CMK
-
Deploy best practices CloudWatch Alarms for the Kinesis Data Stream
Architecture
Example Lambda Function Implementation
While Solutions Constructs does not publish code for the Lambda function to call Kinesis, here is an example of calling Kinesis PutRecords: 'example'
Github
Go to the Github repo