aws-solutions-constructs.aws-iot-lambda-dynamodb 2.85.2__tar.gz → 2.85.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.3/PKG-INFO +30 -0
  2. aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.3/README.md +1 -0
  3. {aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.2 → aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.3}/setup.py +5 -5
  4. {aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.2 → aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.3}/src/aws_solutions_constructs/aws_iot_lambda_dynamodb/__init__.py +1 -173
  5. {aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.2 → aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.3}/src/aws_solutions_constructs/aws_iot_lambda_dynamodb/_jsii/__init__.py +2 -2
  6. aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.3/src/aws_solutions_constructs/aws_iot_lambda_dynamodb/_jsii/aws-iot-lambda-dynamodb@2.85.3.jsii.tgz +0 -0
  7. aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.3/src/aws_solutions_constructs.aws_iot_lambda_dynamodb.egg-info/PKG-INFO +30 -0
  8. {aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.2 → aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.3}/src/aws_solutions_constructs.aws_iot_lambda_dynamodb.egg-info/SOURCES.txt +1 -1
  9. aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.3/src/aws_solutions_constructs.aws_iot_lambda_dynamodb.egg-info/requires.txt +8 -0
  10. aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.2/PKG-INFO +0 -202
  11. aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.2/README.md +0 -173
  12. aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.2/src/aws_solutions_constructs/aws_iot_lambda_dynamodb/_jsii/aws-iot-lambda-dynamodb@2.85.2.jsii.tgz +0 -0
  13. aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.2/src/aws_solutions_constructs.aws_iot_lambda_dynamodb.egg-info/PKG-INFO +0 -202
  14. aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.2/src/aws_solutions_constructs.aws_iot_lambda_dynamodb.egg-info/requires.txt +0 -8
  15. {aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.2 → aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.3}/LICENSE +0 -0
  16. {aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.2 → aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.3}/MANIFEST.in +0 -0
  17. {aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.2 → aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.3}/pyproject.toml +0 -0
  18. {aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.2 → aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.3}/setup.cfg +0 -0
  19. {aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.2 → aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.3}/src/aws_solutions_constructs/aws_iot_lambda_dynamodb/py.typed +0 -0
  20. {aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.2 → aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.3}/src/aws_solutions_constructs.aws_iot_lambda_dynamodb.egg-info/dependency_links.txt +0 -0
  21. {aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.2 → aws_solutions_constructs_aws_iot_lambda_dynamodb-2.85.3}/src/aws_solutions_constructs.aws_iot_lambda_dynamodb.egg-info/top_level.txt +0 -0
@@ -0,0 +1,30 @@
1
+ Metadata-Version: 2.1
2
+ Name: aws-solutions-constructs.aws-iot-lambda-dynamodb
3
+ Version: 2.85.3
4
+ Summary: CDK Constructs for AWS IoT to AWS Lambda to AWS DyanmoDB integration.
5
+ Home-page: https://github.com/awslabs/aws-solutions-constructs.git
6
+ Author: Amazon Web Services
7
+ License: Apache-2.0
8
+ Project-URL: Source, https://github.com/awslabs/aws-solutions-constructs.git
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Programming Language :: JavaScript
12
+ Classifier: Programming Language :: Python :: 3 :: Only
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Typing :: Typed
17
+ Classifier: License :: OSI Approved
18
+ Requires-Python: ~=3.9
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: aws-cdk-lib<3.0.0,>=2.193.0
22
+ Requires-Dist: aws-solutions-constructs.aws-iot-lambda==2.85.3
23
+ Requires-Dist: aws-solutions-constructs.aws-lambda-dynamodb==2.85.3
24
+ Requires-Dist: aws-solutions-constructs.core==2.85.3
25
+ Requires-Dist: constructs<11.0.0,>=10.0.0
26
+ Requires-Dist: jsii<2.0.0,>=1.111.0
27
+ Requires-Dist: publication>=0.0.3
28
+ Requires-Dist: typeguard<4.3.0,>=2.13.3
29
+
30
+ Documentation for this pattern can be found [here](https://github.com/awslabs/aws-solutions-constructs/blob/main/source/patterns/%40aws-solutions-constructs/aws-iot-lambda-dynamodb/README.adoc)
@@ -0,0 +1 @@
1
+ Documentation for this pattern can be found [here](https://github.com/awslabs/aws-solutions-constructs/blob/main/source/patterns/%40aws-solutions-constructs/aws-iot-lambda-dynamodb/README.adoc)
@@ -5,7 +5,7 @@ kwargs = json.loads(
5
5
  """
6
6
  {
7
7
  "name": "aws-solutions-constructs.aws-iot-lambda-dynamodb",
8
- "version": "2.85.2",
8
+ "version": "2.85.3",
9
9
  "description": "CDK Constructs for AWS IoT to AWS Lambda to AWS DyanmoDB integration.",
10
10
  "license": "Apache-2.0",
11
11
  "url": "https://github.com/awslabs/aws-solutions-constructs.git",
@@ -26,7 +26,7 @@ kwargs = json.loads(
26
26
  ],
27
27
  "package_data": {
28
28
  "aws_solutions_constructs.aws_iot_lambda_dynamodb._jsii": [
29
- "aws-iot-lambda-dynamodb@2.85.2.jsii.tgz"
29
+ "aws-iot-lambda-dynamodb@2.85.3.jsii.tgz"
30
30
  ],
31
31
  "aws_solutions_constructs.aws_iot_lambda_dynamodb": [
32
32
  "py.typed"
@@ -35,9 +35,9 @@ kwargs = json.loads(
35
35
  "python_requires": "~=3.9",
36
36
  "install_requires": [
37
37
  "aws-cdk-lib>=2.193.0, <3.0.0",
38
- "aws-solutions-constructs.aws-iot-lambda==2.85.2",
39
- "aws-solutions-constructs.aws-lambda-dynamodb==2.85.2",
40
- "aws-solutions-constructs.core==2.85.2",
38
+ "aws-solutions-constructs.aws-iot-lambda==2.85.3",
39
+ "aws-solutions-constructs.aws-lambda-dynamodb==2.85.3",
40
+ "aws-solutions-constructs.core==2.85.3",
41
41
  "constructs>=10.0.0, <11.0.0",
42
42
  "jsii>=1.111.0, <2.0.0",
43
43
  "publication>=0.0.3",
@@ -1,177 +1,5 @@
1
1
  r'''
2
- # aws-iot-lambda-dynamodb module
3
-
4
- <!--BEGIN STABILITY BANNER-->---
5
-
6
-
7
- ![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)
8
-
9
- > All classes are under active development and subject to non-backward compatible changes or removal in any
10
- > future version. These are not subject to the [Semantic Versioning](https://semver.org/) model.
11
- > This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.
12
-
13
- ---
14
- <!--END STABILITY BANNER-->
15
-
16
- | **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
17
- |:-------------|:-------------|
18
-
19
- <div style="height:8px"></div>
20
-
21
- | **Language** | **Package** |
22
- |:-------------|-----------------|
23
- |![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_iot_lambda_dynamodb`|
24
- |![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-iot-lambda-dynamodb`|
25
- |![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.iotlambdadynamodb`|
26
-
27
- ## Overview
28
-
29
- This AWS Solutions Construct implements an AWS IoT topic rule, an AWS Lambda function and Amazon DynamoDB table with the least privileged permissions.
30
-
31
- Here is a minimal deployable pattern definition:
32
-
33
- Typescript
34
-
35
- ```python
36
- import { Construct } from 'constructs';
37
- import { Stack, StackProps } from 'aws-cdk-lib';
38
- import { IotToLambdaToDynamoDBProps, IotToLambdaToDynamoDB } from '@aws-solutions-constructs/aws-iot-lambda-dynamodb';
39
- import * as lambda from 'aws-cdk-lib/aws-lambda';
40
-
41
- const constructProps: IotToLambdaToDynamoDBProps = {
42
- lambdaFunctionProps: {
43
- code: lambda.Code.fromAsset(`lambda`),
44
- runtime: lambda.Runtime.NODEJS_20_X,
45
- handler: 'index.handler'
46
- },
47
- iotTopicRuleProps: {
48
- topicRulePayload: {
49
- ruleDisabled: false,
50
- description: "Processing of DTC messages from the AWS Connected Vehicle Solution.",
51
- sql: "SELECT * FROM 'connectedcar/dtc/#'",
52
- actions: []
53
- }
54
- }
55
- };
56
-
57
- new IotToLambdaToDynamoDB(this, 'test-iot-lambda-dynamodb-stack', constructProps);
58
- ```
59
-
60
- Python
61
-
62
- ```python
63
- from aws_solutions_constructs.aws_iot_lambda_dynamodb import IotToLambdaToDynamoDB
64
- from aws_cdk import (
65
- aws_iot as iot,
66
- aws_lambda as _lambda,
67
- Stack
68
- )
69
- from constructs import Construct
70
-
71
- IotToLambdaToDynamoDB(self, 'test-iot-lambda-dynamodb-stack',
72
- lambda_function_props=_lambda.FunctionProps(
73
- code=_lambda.Code.from_asset('lambda'),
74
- runtime=_lambda.Runtime.PYTHON_3_11,
75
- handler='index.handler'
76
- ),
77
- iot_topic_rule_props=iot.CfnTopicRuleProps(
78
- topic_rule_payload=iot.CfnTopicRule.TopicRulePayloadProperty(
79
- rule_disabled=False,
80
- description="Processing of DTC messages from the AWS Connected Vehicle Solution.",
81
- sql="SELECT * FROM 'connectedcar/dtc/#'",
82
- actions=[]
83
- )
84
- ))
85
- ```
86
-
87
- Java
88
-
89
- ```java
90
- import software.constructs.Construct;
91
- import java.util.List;
92
-
93
- import software.amazon.awscdk.Stack;
94
- import software.amazon.awscdk.StackProps;
95
- import software.amazon.awscdk.services.lambda.*;
96
- import software.amazon.awscdk.services.lambda.Runtime;
97
- import software.amazon.awscdk.services.iot.*;
98
- import software.amazon.awscdk.services.iot.CfnTopicRule.TopicRulePayloadProperty;
99
- import software.amazon.awsconstructs.services.iotlambdadynamodb.*;
100
-
101
- new IotToLambdaToDynamoDB(this, "test-iot-lambda-dynamodb-stack", new IotToLambdaToDynamoDBProps.Builder()
102
- .lambdaFunctionProps(new FunctionProps.Builder()
103
- .runtime(Runtime.NODEJS_20_X)
104
- .code(Code.fromAsset("lambda"))
105
- .handler("index.handler")
106
- .build())
107
- .iotTopicRuleProps(new CfnTopicRuleProps.Builder()
108
- .topicRulePayload(new TopicRulePayloadProperty.Builder()
109
- .ruleDisabled(false)
110
- .description("Processing of DTC messages from the AWS Connected Vehicle Solution.")
111
- .sql("SELECT * FROM 'connectedcar/dtc/#'")
112
- .actions(List.of())
113
- .build())
114
- .build())
115
- .build());
116
- ```
117
-
118
- ## Pattern Construct Props
119
-
120
- | **Name** | **Type** | **Description** |
121
- |:-------------|:----------------|-----------------|
122
- |existingLambdaObj?|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Existing instance of Lambda Function object, providing both this and `lambdaFunctionProps` will cause an error.|
123
- |lambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.FunctionProps.html)|User provided props to override the default props for the Lambda function.|
124
- |iotTopicRuleProps|[`iot.CfnTopicRuleProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iot.CfnTopicRuleProps.html)|User provided props to override the default props|
125
- |dynamoTableProps?|[`dynamodb.TableProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.TableProps.html)|Optional user provided props to override the default props for DynamoDB Table|
126
- |tablePermissions?|`string`|Optional table permissions to grant to the Lambda function. One of the following may be specified: `All`, `Read`, `ReadWrite`, `Write`.|
127
- |existingTableObj?|[`dynamodb.Table`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.Table.html)|Existing instance of DynamoDB table object, providing both this and `dynamoTableProps` will cause an error.|
128
- |tableEnvironmentVariableName?|`string`|Optional Name for the Lambda function environment variable set to the name of the DynamoDB table. Default: DDB_TABLE_NAME |
129
- |existingVpc?|[`ec2.IVpc`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html)|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 a Gateway Endpoint will be created in the VPC for Amazon DynamoDB. If an existing VPC is provided, the `deployVpc` property cannot be `true`. This uses `ec2.IVpc` to allow clients to supply VPCs that exist outside the stack using the [`ec2.Vpc.fromLookup()`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.Vpc.html#static-fromwbrlookupscope-id-options) method.|
130
- |vpcProps?|[`ec2.VpcProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.VpcProps.html)|Optional user-provided properties to override the default properties for the new VPC. `enableDnsHostnames`, `enableDnsSupport`, `natGateways` and `subnetConfiguration` are set by the pattern, so any values for those properties supplied here will be overridden. If `deployVpc` is not `true` then this property will be ignored.|
131
- |deployVpc?|`boolean`|Whether to create a new VPC based on `vpcProps` into which to deploy this pattern. Setting this to true will deploy the minimal, most private VPC to run the pattern:<ul><li> One isolated subnet in each Availability Zone used by the CDK program</li><li>`enableDnsHostnames` and `enableDnsSupport` will both be set to true</li></ul>If this property is `true` then `existingVpc` cannot be specified. Defaults to `false`.|
132
-
133
- ## Pattern Properties
134
-
135
- | **Name** | **Type** | **Description** |
136
- |:-------------|:----------------|-----------------|
137
- |iotTopicRule|[`iot.CfnTopicRule`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iot.CfnTopicRule.html)|Returns an instance of iot.CfnTopicRule created by the construct|
138
- |lambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Returns an instance of lambda.Function created by the construct|
139
- |dynamoTable|[`dynamodb.Table`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.Table.html)|Returns an instance of dynamodb.Table created by the construct|
140
- |vpc?|[`ec2.IVpc`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html)|Returns an interface on 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.|
141
-
142
- ## Default settings
143
-
144
- Out of the box implementation of the Construct without any override will set the following defaults:
145
-
146
- ### Amazon IoT Rule
147
-
148
- * Configure least privilege access IAM role for Amazon IoT
149
-
150
- ### AWS Lambda Function
151
-
152
- * Configure limited privilege access IAM role for Lambda function
153
- * Enable reusing connections with Keep-Alive for NodeJs Lambda function
154
- * Enable X-Ray Tracing
155
- * Set Environment Variables
156
-
157
- * AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
158
-
159
- ### Amazon DynamoDB Table
160
-
161
- * Set the billing mode for DynamoDB Table to On-Demand (Pay per request)
162
- * Enable server-side encryption for DynamoDB Table using AWS managed KMS Key
163
- * Creates a partition key called 'id' for DynamoDB Table
164
- * Retain the Table when deleting the CloudFormation stack
165
- * Enable continuous backups and point-in-time recovery
166
-
167
- ## Architecture
168
-
169
- ![Architecture Diagram](architecture.png)
170
-
171
- ---
172
-
173
-
174
- © Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ Documentation for this pattern can be found [here](https://github.com/awslabs/aws-solutions-constructs/blob/main/source/patterns/%40aws-solutions-constructs/aws-iot-lambda-dynamodb/README.adoc)
175
3
  '''
176
4
  from pkgutil import extend_path
177
5
  __path__ = extend_path(__path__, __name__)
@@ -36,9 +36,9 @@ import constructs._jsii
36
36
 
37
37
  __jsii_assembly__ = jsii.JSIIAssembly.load(
38
38
  "@aws-solutions-constructs/aws-iot-lambda-dynamodb",
39
- "2.85.2",
39
+ "2.85.3",
40
40
  __name__[0:-6],
41
- "aws-iot-lambda-dynamodb@2.85.2.jsii.tgz",
41
+ "aws-iot-lambda-dynamodb@2.85.3.jsii.tgz",
42
42
  )
43
43
 
44
44
  __all__ = [
@@ -0,0 +1,30 @@
1
+ Metadata-Version: 2.1
2
+ Name: aws-solutions-constructs.aws-iot-lambda-dynamodb
3
+ Version: 2.85.3
4
+ Summary: CDK Constructs for AWS IoT to AWS Lambda to AWS DyanmoDB integration.
5
+ Home-page: https://github.com/awslabs/aws-solutions-constructs.git
6
+ Author: Amazon Web Services
7
+ License: Apache-2.0
8
+ Project-URL: Source, https://github.com/awslabs/aws-solutions-constructs.git
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Programming Language :: JavaScript
12
+ Classifier: Programming Language :: Python :: 3 :: Only
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Typing :: Typed
17
+ Classifier: License :: OSI Approved
18
+ Requires-Python: ~=3.9
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: aws-cdk-lib<3.0.0,>=2.193.0
22
+ Requires-Dist: aws-solutions-constructs.aws-iot-lambda==2.85.3
23
+ Requires-Dist: aws-solutions-constructs.aws-lambda-dynamodb==2.85.3
24
+ Requires-Dist: aws-solutions-constructs.core==2.85.3
25
+ Requires-Dist: constructs<11.0.0,>=10.0.0
26
+ Requires-Dist: jsii<2.0.0,>=1.111.0
27
+ Requires-Dist: publication>=0.0.3
28
+ Requires-Dist: typeguard<4.3.0,>=2.13.3
29
+
30
+ Documentation for this pattern can be found [here](https://github.com/awslabs/aws-solutions-constructs/blob/main/source/patterns/%40aws-solutions-constructs/aws-iot-lambda-dynamodb/README.adoc)
@@ -11,4 +11,4 @@ src/aws_solutions_constructs.aws_iot_lambda_dynamodb.egg-info/top_level.txt
11
11
  src/aws_solutions_constructs/aws_iot_lambda_dynamodb/__init__.py
12
12
  src/aws_solutions_constructs/aws_iot_lambda_dynamodb/py.typed
13
13
  src/aws_solutions_constructs/aws_iot_lambda_dynamodb/_jsii/__init__.py
14
- src/aws_solutions_constructs/aws_iot_lambda_dynamodb/_jsii/aws-iot-lambda-dynamodb@2.85.2.jsii.tgz
14
+ src/aws_solutions_constructs/aws_iot_lambda_dynamodb/_jsii/aws-iot-lambda-dynamodb@2.85.3.jsii.tgz
@@ -0,0 +1,8 @@
1
+ aws-cdk-lib<3.0.0,>=2.193.0
2
+ aws-solutions-constructs.aws-iot-lambda==2.85.3
3
+ aws-solutions-constructs.aws-lambda-dynamodb==2.85.3
4
+ aws-solutions-constructs.core==2.85.3
5
+ constructs<11.0.0,>=10.0.0
6
+ jsii<2.0.0,>=1.111.0
7
+ publication>=0.0.3
8
+ typeguard<4.3.0,>=2.13.3
@@ -1,202 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: aws-solutions-constructs.aws-iot-lambda-dynamodb
3
- Version: 2.85.2
4
- Summary: CDK Constructs for AWS IoT to AWS Lambda to AWS DyanmoDB integration.
5
- Home-page: https://github.com/awslabs/aws-solutions-constructs.git
6
- Author: Amazon Web Services
7
- License: Apache-2.0
8
- Project-URL: Source, https://github.com/awslabs/aws-solutions-constructs.git
9
- Classifier: Intended Audience :: Developers
10
- Classifier: Operating System :: OS Independent
11
- Classifier: Programming Language :: JavaScript
12
- Classifier: Programming Language :: Python :: 3 :: Only
13
- Classifier: Programming Language :: Python :: 3.9
14
- Classifier: Programming Language :: Python :: 3.10
15
- Classifier: Programming Language :: Python :: 3.11
16
- Classifier: Typing :: Typed
17
- Classifier: License :: OSI Approved
18
- Requires-Python: ~=3.9
19
- Description-Content-Type: text/markdown
20
- License-File: LICENSE
21
- Requires-Dist: aws-cdk-lib<3.0.0,>=2.193.0
22
- Requires-Dist: aws-solutions-constructs.aws-iot-lambda==2.85.2
23
- Requires-Dist: aws-solutions-constructs.aws-lambda-dynamodb==2.85.2
24
- Requires-Dist: aws-solutions-constructs.core==2.85.2
25
- Requires-Dist: constructs<11.0.0,>=10.0.0
26
- Requires-Dist: jsii<2.0.0,>=1.111.0
27
- Requires-Dist: publication>=0.0.3
28
- Requires-Dist: typeguard<4.3.0,>=2.13.3
29
-
30
- # aws-iot-lambda-dynamodb module
31
-
32
- <!--BEGIN STABILITY BANNER-->---
33
-
34
-
35
- ![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)
36
-
37
- > All classes are under active development and subject to non-backward compatible changes or removal in any
38
- > future version. These are not subject to the [Semantic Versioning](https://semver.org/) model.
39
- > This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.
40
-
41
- ---
42
- <!--END STABILITY BANNER-->
43
-
44
- | **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
45
- |:-------------|:-------------|
46
-
47
- <div style="height:8px"></div>
48
-
49
- | **Language** | **Package** |
50
- |:-------------|-----------------|
51
- |![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_iot_lambda_dynamodb`|
52
- |![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-iot-lambda-dynamodb`|
53
- |![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.iotlambdadynamodb`|
54
-
55
- ## Overview
56
-
57
- This AWS Solutions Construct implements an AWS IoT topic rule, an AWS Lambda function and Amazon DynamoDB table with the least privileged permissions.
58
-
59
- Here is a minimal deployable pattern definition:
60
-
61
- Typescript
62
-
63
- ```python
64
- import { Construct } from 'constructs';
65
- import { Stack, StackProps } from 'aws-cdk-lib';
66
- import { IotToLambdaToDynamoDBProps, IotToLambdaToDynamoDB } from '@aws-solutions-constructs/aws-iot-lambda-dynamodb';
67
- import * as lambda from 'aws-cdk-lib/aws-lambda';
68
-
69
- const constructProps: IotToLambdaToDynamoDBProps = {
70
- lambdaFunctionProps: {
71
- code: lambda.Code.fromAsset(`lambda`),
72
- runtime: lambda.Runtime.NODEJS_20_X,
73
- handler: 'index.handler'
74
- },
75
- iotTopicRuleProps: {
76
- topicRulePayload: {
77
- ruleDisabled: false,
78
- description: "Processing of DTC messages from the AWS Connected Vehicle Solution.",
79
- sql: "SELECT * FROM 'connectedcar/dtc/#'",
80
- actions: []
81
- }
82
- }
83
- };
84
-
85
- new IotToLambdaToDynamoDB(this, 'test-iot-lambda-dynamodb-stack', constructProps);
86
- ```
87
-
88
- Python
89
-
90
- ```python
91
- from aws_solutions_constructs.aws_iot_lambda_dynamodb import IotToLambdaToDynamoDB
92
- from aws_cdk import (
93
- aws_iot as iot,
94
- aws_lambda as _lambda,
95
- Stack
96
- )
97
- from constructs import Construct
98
-
99
- IotToLambdaToDynamoDB(self, 'test-iot-lambda-dynamodb-stack',
100
- lambda_function_props=_lambda.FunctionProps(
101
- code=_lambda.Code.from_asset('lambda'),
102
- runtime=_lambda.Runtime.PYTHON_3_11,
103
- handler='index.handler'
104
- ),
105
- iot_topic_rule_props=iot.CfnTopicRuleProps(
106
- topic_rule_payload=iot.CfnTopicRule.TopicRulePayloadProperty(
107
- rule_disabled=False,
108
- description="Processing of DTC messages from the AWS Connected Vehicle Solution.",
109
- sql="SELECT * FROM 'connectedcar/dtc/#'",
110
- actions=[]
111
- )
112
- ))
113
- ```
114
-
115
- Java
116
-
117
- ```java
118
- import software.constructs.Construct;
119
- import java.util.List;
120
-
121
- import software.amazon.awscdk.Stack;
122
- import software.amazon.awscdk.StackProps;
123
- import software.amazon.awscdk.services.lambda.*;
124
- import software.amazon.awscdk.services.lambda.Runtime;
125
- import software.amazon.awscdk.services.iot.*;
126
- import software.amazon.awscdk.services.iot.CfnTopicRule.TopicRulePayloadProperty;
127
- import software.amazon.awsconstructs.services.iotlambdadynamodb.*;
128
-
129
- new IotToLambdaToDynamoDB(this, "test-iot-lambda-dynamodb-stack", new IotToLambdaToDynamoDBProps.Builder()
130
- .lambdaFunctionProps(new FunctionProps.Builder()
131
- .runtime(Runtime.NODEJS_20_X)
132
- .code(Code.fromAsset("lambda"))
133
- .handler("index.handler")
134
- .build())
135
- .iotTopicRuleProps(new CfnTopicRuleProps.Builder()
136
- .topicRulePayload(new TopicRulePayloadProperty.Builder()
137
- .ruleDisabled(false)
138
- .description("Processing of DTC messages from the AWS Connected Vehicle Solution.")
139
- .sql("SELECT * FROM 'connectedcar/dtc/#'")
140
- .actions(List.of())
141
- .build())
142
- .build())
143
- .build());
144
- ```
145
-
146
- ## Pattern Construct Props
147
-
148
- | **Name** | **Type** | **Description** |
149
- |:-------------|:----------------|-----------------|
150
- |existingLambdaObj?|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Existing instance of Lambda Function object, providing both this and `lambdaFunctionProps` will cause an error.|
151
- |lambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.FunctionProps.html)|User provided props to override the default props for the Lambda function.|
152
- |iotTopicRuleProps|[`iot.CfnTopicRuleProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iot.CfnTopicRuleProps.html)|User provided props to override the default props|
153
- |dynamoTableProps?|[`dynamodb.TableProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.TableProps.html)|Optional user provided props to override the default props for DynamoDB Table|
154
- |tablePermissions?|`string`|Optional table permissions to grant to the Lambda function. One of the following may be specified: `All`, `Read`, `ReadWrite`, `Write`.|
155
- |existingTableObj?|[`dynamodb.Table`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.Table.html)|Existing instance of DynamoDB table object, providing both this and `dynamoTableProps` will cause an error.|
156
- |tableEnvironmentVariableName?|`string`|Optional Name for the Lambda function environment variable set to the name of the DynamoDB table. Default: DDB_TABLE_NAME |
157
- |existingVpc?|[`ec2.IVpc`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html)|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 a Gateway Endpoint will be created in the VPC for Amazon DynamoDB. If an existing VPC is provided, the `deployVpc` property cannot be `true`. This uses `ec2.IVpc` to allow clients to supply VPCs that exist outside the stack using the [`ec2.Vpc.fromLookup()`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.Vpc.html#static-fromwbrlookupscope-id-options) method.|
158
- |vpcProps?|[`ec2.VpcProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.VpcProps.html)|Optional user-provided properties to override the default properties for the new VPC. `enableDnsHostnames`, `enableDnsSupport`, `natGateways` and `subnetConfiguration` are set by the pattern, so any values for those properties supplied here will be overridden. If `deployVpc` is not `true` then this property will be ignored.|
159
- |deployVpc?|`boolean`|Whether to create a new VPC based on `vpcProps` into which to deploy this pattern. Setting this to true will deploy the minimal, most private VPC to run the pattern:<ul><li> One isolated subnet in each Availability Zone used by the CDK program</li><li>`enableDnsHostnames` and `enableDnsSupport` will both be set to true</li></ul>If this property is `true` then `existingVpc` cannot be specified. Defaults to `false`.|
160
-
161
- ## Pattern Properties
162
-
163
- | **Name** | **Type** | **Description** |
164
- |:-------------|:----------------|-----------------|
165
- |iotTopicRule|[`iot.CfnTopicRule`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iot.CfnTopicRule.html)|Returns an instance of iot.CfnTopicRule created by the construct|
166
- |lambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Returns an instance of lambda.Function created by the construct|
167
- |dynamoTable|[`dynamodb.Table`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.Table.html)|Returns an instance of dynamodb.Table created by the construct|
168
- |vpc?|[`ec2.IVpc`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html)|Returns an interface on 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.|
169
-
170
- ## Default settings
171
-
172
- Out of the box implementation of the Construct without any override will set the following defaults:
173
-
174
- ### Amazon IoT Rule
175
-
176
- * Configure least privilege access IAM role for Amazon IoT
177
-
178
- ### AWS Lambda Function
179
-
180
- * Configure limited privilege access IAM role for Lambda function
181
- * Enable reusing connections with Keep-Alive for NodeJs Lambda function
182
- * Enable X-Ray Tracing
183
- * Set Environment Variables
184
-
185
- * AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
186
-
187
- ### Amazon DynamoDB Table
188
-
189
- * Set the billing mode for DynamoDB Table to On-Demand (Pay per request)
190
- * Enable server-side encryption for DynamoDB Table using AWS managed KMS Key
191
- * Creates a partition key called 'id' for DynamoDB Table
192
- * Retain the Table when deleting the CloudFormation stack
193
- * Enable continuous backups and point-in-time recovery
194
-
195
- ## Architecture
196
-
197
- ![Architecture Diagram](architecture.png)
198
-
199
- ---
200
-
201
-
202
- © Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
@@ -1,173 +0,0 @@
1
- # aws-iot-lambda-dynamodb module
2
-
3
- <!--BEGIN STABILITY BANNER-->---
4
-
5
-
6
- ![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)
7
-
8
- > All classes are under active development and subject to non-backward compatible changes or removal in any
9
- > future version. These are not subject to the [Semantic Versioning](https://semver.org/) model.
10
- > This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.
11
-
12
- ---
13
- <!--END STABILITY BANNER-->
14
-
15
- | **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
16
- |:-------------|:-------------|
17
-
18
- <div style="height:8px"></div>
19
-
20
- | **Language** | **Package** |
21
- |:-------------|-----------------|
22
- |![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_iot_lambda_dynamodb`|
23
- |![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-iot-lambda-dynamodb`|
24
- |![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.iotlambdadynamodb`|
25
-
26
- ## Overview
27
-
28
- This AWS Solutions Construct implements an AWS IoT topic rule, an AWS Lambda function and Amazon DynamoDB table with the least privileged permissions.
29
-
30
- Here is a minimal deployable pattern definition:
31
-
32
- Typescript
33
-
34
- ```python
35
- import { Construct } from 'constructs';
36
- import { Stack, StackProps } from 'aws-cdk-lib';
37
- import { IotToLambdaToDynamoDBProps, IotToLambdaToDynamoDB } from '@aws-solutions-constructs/aws-iot-lambda-dynamodb';
38
- import * as lambda from 'aws-cdk-lib/aws-lambda';
39
-
40
- const constructProps: IotToLambdaToDynamoDBProps = {
41
- lambdaFunctionProps: {
42
- code: lambda.Code.fromAsset(`lambda`),
43
- runtime: lambda.Runtime.NODEJS_20_X,
44
- handler: 'index.handler'
45
- },
46
- iotTopicRuleProps: {
47
- topicRulePayload: {
48
- ruleDisabled: false,
49
- description: "Processing of DTC messages from the AWS Connected Vehicle Solution.",
50
- sql: "SELECT * FROM 'connectedcar/dtc/#'",
51
- actions: []
52
- }
53
- }
54
- };
55
-
56
- new IotToLambdaToDynamoDB(this, 'test-iot-lambda-dynamodb-stack', constructProps);
57
- ```
58
-
59
- Python
60
-
61
- ```python
62
- from aws_solutions_constructs.aws_iot_lambda_dynamodb import IotToLambdaToDynamoDB
63
- from aws_cdk import (
64
- aws_iot as iot,
65
- aws_lambda as _lambda,
66
- Stack
67
- )
68
- from constructs import Construct
69
-
70
- IotToLambdaToDynamoDB(self, 'test-iot-lambda-dynamodb-stack',
71
- lambda_function_props=_lambda.FunctionProps(
72
- code=_lambda.Code.from_asset('lambda'),
73
- runtime=_lambda.Runtime.PYTHON_3_11,
74
- handler='index.handler'
75
- ),
76
- iot_topic_rule_props=iot.CfnTopicRuleProps(
77
- topic_rule_payload=iot.CfnTopicRule.TopicRulePayloadProperty(
78
- rule_disabled=False,
79
- description="Processing of DTC messages from the AWS Connected Vehicle Solution.",
80
- sql="SELECT * FROM 'connectedcar/dtc/#'",
81
- actions=[]
82
- )
83
- ))
84
- ```
85
-
86
- Java
87
-
88
- ```java
89
- import software.constructs.Construct;
90
- import java.util.List;
91
-
92
- import software.amazon.awscdk.Stack;
93
- import software.amazon.awscdk.StackProps;
94
- import software.amazon.awscdk.services.lambda.*;
95
- import software.amazon.awscdk.services.lambda.Runtime;
96
- import software.amazon.awscdk.services.iot.*;
97
- import software.amazon.awscdk.services.iot.CfnTopicRule.TopicRulePayloadProperty;
98
- import software.amazon.awsconstructs.services.iotlambdadynamodb.*;
99
-
100
- new IotToLambdaToDynamoDB(this, "test-iot-lambda-dynamodb-stack", new IotToLambdaToDynamoDBProps.Builder()
101
- .lambdaFunctionProps(new FunctionProps.Builder()
102
- .runtime(Runtime.NODEJS_20_X)
103
- .code(Code.fromAsset("lambda"))
104
- .handler("index.handler")
105
- .build())
106
- .iotTopicRuleProps(new CfnTopicRuleProps.Builder()
107
- .topicRulePayload(new TopicRulePayloadProperty.Builder()
108
- .ruleDisabled(false)
109
- .description("Processing of DTC messages from the AWS Connected Vehicle Solution.")
110
- .sql("SELECT * FROM 'connectedcar/dtc/#'")
111
- .actions(List.of())
112
- .build())
113
- .build())
114
- .build());
115
- ```
116
-
117
- ## Pattern Construct Props
118
-
119
- | **Name** | **Type** | **Description** |
120
- |:-------------|:----------------|-----------------|
121
- |existingLambdaObj?|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Existing instance of Lambda Function object, providing both this and `lambdaFunctionProps` will cause an error.|
122
- |lambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.FunctionProps.html)|User provided props to override the default props for the Lambda function.|
123
- |iotTopicRuleProps|[`iot.CfnTopicRuleProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iot.CfnTopicRuleProps.html)|User provided props to override the default props|
124
- |dynamoTableProps?|[`dynamodb.TableProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.TableProps.html)|Optional user provided props to override the default props for DynamoDB Table|
125
- |tablePermissions?|`string`|Optional table permissions to grant to the Lambda function. One of the following may be specified: `All`, `Read`, `ReadWrite`, `Write`.|
126
- |existingTableObj?|[`dynamodb.Table`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.Table.html)|Existing instance of DynamoDB table object, providing both this and `dynamoTableProps` will cause an error.|
127
- |tableEnvironmentVariableName?|`string`|Optional Name for the Lambda function environment variable set to the name of the DynamoDB table. Default: DDB_TABLE_NAME |
128
- |existingVpc?|[`ec2.IVpc`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html)|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 a Gateway Endpoint will be created in the VPC for Amazon DynamoDB. If an existing VPC is provided, the `deployVpc` property cannot be `true`. This uses `ec2.IVpc` to allow clients to supply VPCs that exist outside the stack using the [`ec2.Vpc.fromLookup()`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.Vpc.html#static-fromwbrlookupscope-id-options) method.|
129
- |vpcProps?|[`ec2.VpcProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.VpcProps.html)|Optional user-provided properties to override the default properties for the new VPC. `enableDnsHostnames`, `enableDnsSupport`, `natGateways` and `subnetConfiguration` are set by the pattern, so any values for those properties supplied here will be overridden. If `deployVpc` is not `true` then this property will be ignored.|
130
- |deployVpc?|`boolean`|Whether to create a new VPC based on `vpcProps` into which to deploy this pattern. Setting this to true will deploy the minimal, most private VPC to run the pattern:<ul><li> One isolated subnet in each Availability Zone used by the CDK program</li><li>`enableDnsHostnames` and `enableDnsSupport` will both be set to true</li></ul>If this property is `true` then `existingVpc` cannot be specified. Defaults to `false`.|
131
-
132
- ## Pattern Properties
133
-
134
- | **Name** | **Type** | **Description** |
135
- |:-------------|:----------------|-----------------|
136
- |iotTopicRule|[`iot.CfnTopicRule`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iot.CfnTopicRule.html)|Returns an instance of iot.CfnTopicRule created by the construct|
137
- |lambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Returns an instance of lambda.Function created by the construct|
138
- |dynamoTable|[`dynamodb.Table`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.Table.html)|Returns an instance of dynamodb.Table created by the construct|
139
- |vpc?|[`ec2.IVpc`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html)|Returns an interface on 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.|
140
-
141
- ## Default settings
142
-
143
- Out of the box implementation of the Construct without any override will set the following defaults:
144
-
145
- ### Amazon IoT Rule
146
-
147
- * Configure least privilege access IAM role for Amazon IoT
148
-
149
- ### AWS Lambda Function
150
-
151
- * Configure limited privilege access IAM role for Lambda function
152
- * Enable reusing connections with Keep-Alive for NodeJs Lambda function
153
- * Enable X-Ray Tracing
154
- * Set Environment Variables
155
-
156
- * AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
157
-
158
- ### Amazon DynamoDB Table
159
-
160
- * Set the billing mode for DynamoDB Table to On-Demand (Pay per request)
161
- * Enable server-side encryption for DynamoDB Table using AWS managed KMS Key
162
- * Creates a partition key called 'id' for DynamoDB Table
163
- * Retain the Table when deleting the CloudFormation stack
164
- * Enable continuous backups and point-in-time recovery
165
-
166
- ## Architecture
167
-
168
- ![Architecture Diagram](architecture.png)
169
-
170
- ---
171
-
172
-
173
- © Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
@@ -1,202 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: aws-solutions-constructs.aws-iot-lambda-dynamodb
3
- Version: 2.85.2
4
- Summary: CDK Constructs for AWS IoT to AWS Lambda to AWS DyanmoDB integration.
5
- Home-page: https://github.com/awslabs/aws-solutions-constructs.git
6
- Author: Amazon Web Services
7
- License: Apache-2.0
8
- Project-URL: Source, https://github.com/awslabs/aws-solutions-constructs.git
9
- Classifier: Intended Audience :: Developers
10
- Classifier: Operating System :: OS Independent
11
- Classifier: Programming Language :: JavaScript
12
- Classifier: Programming Language :: Python :: 3 :: Only
13
- Classifier: Programming Language :: Python :: 3.9
14
- Classifier: Programming Language :: Python :: 3.10
15
- Classifier: Programming Language :: Python :: 3.11
16
- Classifier: Typing :: Typed
17
- Classifier: License :: OSI Approved
18
- Requires-Python: ~=3.9
19
- Description-Content-Type: text/markdown
20
- License-File: LICENSE
21
- Requires-Dist: aws-cdk-lib<3.0.0,>=2.193.0
22
- Requires-Dist: aws-solutions-constructs.aws-iot-lambda==2.85.2
23
- Requires-Dist: aws-solutions-constructs.aws-lambda-dynamodb==2.85.2
24
- Requires-Dist: aws-solutions-constructs.core==2.85.2
25
- Requires-Dist: constructs<11.0.0,>=10.0.0
26
- Requires-Dist: jsii<2.0.0,>=1.111.0
27
- Requires-Dist: publication>=0.0.3
28
- Requires-Dist: typeguard<4.3.0,>=2.13.3
29
-
30
- # aws-iot-lambda-dynamodb module
31
-
32
- <!--BEGIN STABILITY BANNER-->---
33
-
34
-
35
- ![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)
36
-
37
- > All classes are under active development and subject to non-backward compatible changes or removal in any
38
- > future version. These are not subject to the [Semantic Versioning](https://semver.org/) model.
39
- > This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.
40
-
41
- ---
42
- <!--END STABILITY BANNER-->
43
-
44
- | **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
45
- |:-------------|:-------------|
46
-
47
- <div style="height:8px"></div>
48
-
49
- | **Language** | **Package** |
50
- |:-------------|-----------------|
51
- |![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_iot_lambda_dynamodb`|
52
- |![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-iot-lambda-dynamodb`|
53
- |![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.iotlambdadynamodb`|
54
-
55
- ## Overview
56
-
57
- This AWS Solutions Construct implements an AWS IoT topic rule, an AWS Lambda function and Amazon DynamoDB table with the least privileged permissions.
58
-
59
- Here is a minimal deployable pattern definition:
60
-
61
- Typescript
62
-
63
- ```python
64
- import { Construct } from 'constructs';
65
- import { Stack, StackProps } from 'aws-cdk-lib';
66
- import { IotToLambdaToDynamoDBProps, IotToLambdaToDynamoDB } from '@aws-solutions-constructs/aws-iot-lambda-dynamodb';
67
- import * as lambda from 'aws-cdk-lib/aws-lambda';
68
-
69
- const constructProps: IotToLambdaToDynamoDBProps = {
70
- lambdaFunctionProps: {
71
- code: lambda.Code.fromAsset(`lambda`),
72
- runtime: lambda.Runtime.NODEJS_20_X,
73
- handler: 'index.handler'
74
- },
75
- iotTopicRuleProps: {
76
- topicRulePayload: {
77
- ruleDisabled: false,
78
- description: "Processing of DTC messages from the AWS Connected Vehicle Solution.",
79
- sql: "SELECT * FROM 'connectedcar/dtc/#'",
80
- actions: []
81
- }
82
- }
83
- };
84
-
85
- new IotToLambdaToDynamoDB(this, 'test-iot-lambda-dynamodb-stack', constructProps);
86
- ```
87
-
88
- Python
89
-
90
- ```python
91
- from aws_solutions_constructs.aws_iot_lambda_dynamodb import IotToLambdaToDynamoDB
92
- from aws_cdk import (
93
- aws_iot as iot,
94
- aws_lambda as _lambda,
95
- Stack
96
- )
97
- from constructs import Construct
98
-
99
- IotToLambdaToDynamoDB(self, 'test-iot-lambda-dynamodb-stack',
100
- lambda_function_props=_lambda.FunctionProps(
101
- code=_lambda.Code.from_asset('lambda'),
102
- runtime=_lambda.Runtime.PYTHON_3_11,
103
- handler='index.handler'
104
- ),
105
- iot_topic_rule_props=iot.CfnTopicRuleProps(
106
- topic_rule_payload=iot.CfnTopicRule.TopicRulePayloadProperty(
107
- rule_disabled=False,
108
- description="Processing of DTC messages from the AWS Connected Vehicle Solution.",
109
- sql="SELECT * FROM 'connectedcar/dtc/#'",
110
- actions=[]
111
- )
112
- ))
113
- ```
114
-
115
- Java
116
-
117
- ```java
118
- import software.constructs.Construct;
119
- import java.util.List;
120
-
121
- import software.amazon.awscdk.Stack;
122
- import software.amazon.awscdk.StackProps;
123
- import software.amazon.awscdk.services.lambda.*;
124
- import software.amazon.awscdk.services.lambda.Runtime;
125
- import software.amazon.awscdk.services.iot.*;
126
- import software.amazon.awscdk.services.iot.CfnTopicRule.TopicRulePayloadProperty;
127
- import software.amazon.awsconstructs.services.iotlambdadynamodb.*;
128
-
129
- new IotToLambdaToDynamoDB(this, "test-iot-lambda-dynamodb-stack", new IotToLambdaToDynamoDBProps.Builder()
130
- .lambdaFunctionProps(new FunctionProps.Builder()
131
- .runtime(Runtime.NODEJS_20_X)
132
- .code(Code.fromAsset("lambda"))
133
- .handler("index.handler")
134
- .build())
135
- .iotTopicRuleProps(new CfnTopicRuleProps.Builder()
136
- .topicRulePayload(new TopicRulePayloadProperty.Builder()
137
- .ruleDisabled(false)
138
- .description("Processing of DTC messages from the AWS Connected Vehicle Solution.")
139
- .sql("SELECT * FROM 'connectedcar/dtc/#'")
140
- .actions(List.of())
141
- .build())
142
- .build())
143
- .build());
144
- ```
145
-
146
- ## Pattern Construct Props
147
-
148
- | **Name** | **Type** | **Description** |
149
- |:-------------|:----------------|-----------------|
150
- |existingLambdaObj?|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Existing instance of Lambda Function object, providing both this and `lambdaFunctionProps` will cause an error.|
151
- |lambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.FunctionProps.html)|User provided props to override the default props for the Lambda function.|
152
- |iotTopicRuleProps|[`iot.CfnTopicRuleProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iot.CfnTopicRuleProps.html)|User provided props to override the default props|
153
- |dynamoTableProps?|[`dynamodb.TableProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.TableProps.html)|Optional user provided props to override the default props for DynamoDB Table|
154
- |tablePermissions?|`string`|Optional table permissions to grant to the Lambda function. One of the following may be specified: `All`, `Read`, `ReadWrite`, `Write`.|
155
- |existingTableObj?|[`dynamodb.Table`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.Table.html)|Existing instance of DynamoDB table object, providing both this and `dynamoTableProps` will cause an error.|
156
- |tableEnvironmentVariableName?|`string`|Optional Name for the Lambda function environment variable set to the name of the DynamoDB table. Default: DDB_TABLE_NAME |
157
- |existingVpc?|[`ec2.IVpc`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html)|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 a Gateway Endpoint will be created in the VPC for Amazon DynamoDB. If an existing VPC is provided, the `deployVpc` property cannot be `true`. This uses `ec2.IVpc` to allow clients to supply VPCs that exist outside the stack using the [`ec2.Vpc.fromLookup()`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.Vpc.html#static-fromwbrlookupscope-id-options) method.|
158
- |vpcProps?|[`ec2.VpcProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.VpcProps.html)|Optional user-provided properties to override the default properties for the new VPC. `enableDnsHostnames`, `enableDnsSupport`, `natGateways` and `subnetConfiguration` are set by the pattern, so any values for those properties supplied here will be overridden. If `deployVpc` is not `true` then this property will be ignored.|
159
- |deployVpc?|`boolean`|Whether to create a new VPC based on `vpcProps` into which to deploy this pattern. Setting this to true will deploy the minimal, most private VPC to run the pattern:<ul><li> One isolated subnet in each Availability Zone used by the CDK program</li><li>`enableDnsHostnames` and `enableDnsSupport` will both be set to true</li></ul>If this property is `true` then `existingVpc` cannot be specified. Defaults to `false`.|
160
-
161
- ## Pattern Properties
162
-
163
- | **Name** | **Type** | **Description** |
164
- |:-------------|:----------------|-----------------|
165
- |iotTopicRule|[`iot.CfnTopicRule`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iot.CfnTopicRule.html)|Returns an instance of iot.CfnTopicRule created by the construct|
166
- |lambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Returns an instance of lambda.Function created by the construct|
167
- |dynamoTable|[`dynamodb.Table`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.Table.html)|Returns an instance of dynamodb.Table created by the construct|
168
- |vpc?|[`ec2.IVpc`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html)|Returns an interface on 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.|
169
-
170
- ## Default settings
171
-
172
- Out of the box implementation of the Construct without any override will set the following defaults:
173
-
174
- ### Amazon IoT Rule
175
-
176
- * Configure least privilege access IAM role for Amazon IoT
177
-
178
- ### AWS Lambda Function
179
-
180
- * Configure limited privilege access IAM role for Lambda function
181
- * Enable reusing connections with Keep-Alive for NodeJs Lambda function
182
- * Enable X-Ray Tracing
183
- * Set Environment Variables
184
-
185
- * AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
186
-
187
- ### Amazon DynamoDB Table
188
-
189
- * Set the billing mode for DynamoDB Table to On-Demand (Pay per request)
190
- * Enable server-side encryption for DynamoDB Table using AWS managed KMS Key
191
- * Creates a partition key called 'id' for DynamoDB Table
192
- * Retain the Table when deleting the CloudFormation stack
193
- * Enable continuous backups and point-in-time recovery
194
-
195
- ## Architecture
196
-
197
- ![Architecture Diagram](architecture.png)
198
-
199
- ---
200
-
201
-
202
- © Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
@@ -1,8 +0,0 @@
1
- aws-cdk-lib<3.0.0,>=2.193.0
2
- aws-solutions-constructs.aws-iot-lambda==2.85.2
3
- aws-solutions-constructs.aws-lambda-dynamodb==2.85.2
4
- aws-solutions-constructs.core==2.85.2
5
- constructs<11.0.0,>=10.0.0
6
- jsii<2.0.0,>=1.111.0
7
- publication>=0.0.3
8
- typeguard<4.3.0,>=2.13.3