aws-solutions-constructs.aws-lambda-stepfunctions 2.85.2__tar.gz → 2.85.4__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.
- aws_solutions_constructs_aws_lambda_stepfunctions-2.85.4/PKG-INFO +28 -0
- aws_solutions_constructs_aws_lambda_stepfunctions-2.85.4/README.md +1 -0
- {aws_solutions_constructs_aws_lambda_stepfunctions-2.85.2 → aws_solutions_constructs_aws_lambda_stepfunctions-2.85.4}/setup.py +3 -3
- {aws_solutions_constructs_aws_lambda_stepfunctions-2.85.2 → aws_solutions_constructs_aws_lambda_stepfunctions-2.85.4}/src/aws_solutions_constructs/aws_lambda_stepfunctions/__init__.py +1 -153
- {aws_solutions_constructs_aws_lambda_stepfunctions-2.85.2 → aws_solutions_constructs_aws_lambda_stepfunctions-2.85.4}/src/aws_solutions_constructs/aws_lambda_stepfunctions/_jsii/__init__.py +2 -2
- aws_solutions_constructs_aws_lambda_stepfunctions-2.85.4/src/aws_solutions_constructs/aws_lambda_stepfunctions/_jsii/aws-lambda-stepfunctions@2.85.4.jsii.tgz +0 -0
- aws_solutions_constructs_aws_lambda_stepfunctions-2.85.4/src/aws_solutions_constructs.aws_lambda_stepfunctions.egg-info/PKG-INFO +28 -0
- {aws_solutions_constructs_aws_lambda_stepfunctions-2.85.2 → aws_solutions_constructs_aws_lambda_stepfunctions-2.85.4}/src/aws_solutions_constructs.aws_lambda_stepfunctions.egg-info/SOURCES.txt +1 -1
- {aws_solutions_constructs_aws_lambda_stepfunctions-2.85.2 → aws_solutions_constructs_aws_lambda_stepfunctions-2.85.4}/src/aws_solutions_constructs.aws_lambda_stepfunctions.egg-info/requires.txt +1 -1
- aws_solutions_constructs_aws_lambda_stepfunctions-2.85.2/PKG-INFO +0 -180
- aws_solutions_constructs_aws_lambda_stepfunctions-2.85.2/README.md +0 -153
- aws_solutions_constructs_aws_lambda_stepfunctions-2.85.2/src/aws_solutions_constructs/aws_lambda_stepfunctions/_jsii/aws-lambda-stepfunctions@2.85.2.jsii.tgz +0 -0
- aws_solutions_constructs_aws_lambda_stepfunctions-2.85.2/src/aws_solutions_constructs.aws_lambda_stepfunctions.egg-info/PKG-INFO +0 -180
- {aws_solutions_constructs_aws_lambda_stepfunctions-2.85.2 → aws_solutions_constructs_aws_lambda_stepfunctions-2.85.4}/LICENSE +0 -0
- {aws_solutions_constructs_aws_lambda_stepfunctions-2.85.2 → aws_solutions_constructs_aws_lambda_stepfunctions-2.85.4}/MANIFEST.in +0 -0
- {aws_solutions_constructs_aws_lambda_stepfunctions-2.85.2 → aws_solutions_constructs_aws_lambda_stepfunctions-2.85.4}/pyproject.toml +0 -0
- {aws_solutions_constructs_aws_lambda_stepfunctions-2.85.2 → aws_solutions_constructs_aws_lambda_stepfunctions-2.85.4}/setup.cfg +0 -0
- {aws_solutions_constructs_aws_lambda_stepfunctions-2.85.2 → aws_solutions_constructs_aws_lambda_stepfunctions-2.85.4}/src/aws_solutions_constructs/aws_lambda_stepfunctions/py.typed +0 -0
- {aws_solutions_constructs_aws_lambda_stepfunctions-2.85.2 → aws_solutions_constructs_aws_lambda_stepfunctions-2.85.4}/src/aws_solutions_constructs.aws_lambda_stepfunctions.egg-info/dependency_links.txt +0 -0
- {aws_solutions_constructs_aws_lambda_stepfunctions-2.85.2 → aws_solutions_constructs_aws_lambda_stepfunctions-2.85.4}/src/aws_solutions_constructs.aws_lambda_stepfunctions.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: aws-solutions-constructs.aws-lambda-stepfunctions
|
|
3
|
+
Version: 2.85.4
|
|
4
|
+
Summary: CDK constructs for defining an interaction between an AWS Lambda function and an AWS Step Function.
|
|
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.core==2.85.4
|
|
23
|
+
Requires-Dist: constructs<11.0.0,>=10.0.0
|
|
24
|
+
Requires-Dist: jsii<2.0.0,>=1.111.0
|
|
25
|
+
Requires-Dist: publication>=0.0.3
|
|
26
|
+
Requires-Dist: typeguard<4.3.0,>=2.13.3
|
|
27
|
+
|
|
28
|
+
Documentation for this pattern can be found [here](https://github.com/awslabs/aws-solutions-constructs/blob/main/source/patterns/%40aws-solutions-constructs/aws-lambda-stepfunctions/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-lambda-stepfunctions/README.adoc)
|
|
@@ -5,7 +5,7 @@ kwargs = json.loads(
|
|
|
5
5
|
"""
|
|
6
6
|
{
|
|
7
7
|
"name": "aws-solutions-constructs.aws-lambda-stepfunctions",
|
|
8
|
-
"version": "2.85.
|
|
8
|
+
"version": "2.85.4",
|
|
9
9
|
"description": "CDK constructs for defining an interaction between an AWS Lambda function and an AWS Step Function.",
|
|
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_lambda_stepfunctions._jsii": [
|
|
29
|
-
"aws-lambda-stepfunctions@2.85.
|
|
29
|
+
"aws-lambda-stepfunctions@2.85.4.jsii.tgz"
|
|
30
30
|
],
|
|
31
31
|
"aws_solutions_constructs.aws_lambda_stepfunctions": [
|
|
32
32
|
"py.typed"
|
|
@@ -35,7 +35,7 @@ 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.core==2.85.
|
|
38
|
+
"aws-solutions-constructs.core==2.85.4",
|
|
39
39
|
"constructs>=10.0.0, <11.0.0",
|
|
40
40
|
"jsii>=1.111.0, <2.0.0",
|
|
41
41
|
"publication>=0.0.3",
|
|
@@ -1,157 +1,5 @@
|
|
|
1
1
|
r'''
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
<!--BEGIN STABILITY BANNER-->---
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-

|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
<!--END STABILITY BANNER-->
|
|
11
|
-
|
|
12
|
-
| **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
|
|
13
|
-
|:-------------|:-------------|
|
|
14
|
-
|
|
15
|
-
<div style="height:8px"></div>
|
|
16
|
-
|
|
17
|
-
| **Language** | **Package** |
|
|
18
|
-
|:-------------|-----------------|
|
|
19
|
-
| Python|`aws_solutions_constructs.aws_lambda_stepfunctions`|
|
|
20
|
-
| Typescript|`@aws-solutions-constructs/aws-lambda-stepfunctions`|
|
|
21
|
-
| Java|`software.amazon.awsconstructs.services.lambdastepfunctions`|
|
|
22
|
-
|
|
23
|
-
## Overview
|
|
24
|
-
|
|
25
|
-
This AWS Solutions Construct implements an AWS Lambda function connected to an AWS Step Functions.
|
|
26
|
-
|
|
27
|
-
Here is a minimal deployable pattern definition:
|
|
28
|
-
|
|
29
|
-
Typescript
|
|
30
|
-
|
|
31
|
-
```python
|
|
32
|
-
import { Construct } from 'constructs';
|
|
33
|
-
import { Stack, StackProps } from 'aws-cdk-lib';
|
|
34
|
-
import { LambdaToStepfunctions } from '@aws-solutions-constructs/aws-lambda-stepfunctions';
|
|
35
|
-
import * as stepfunctions from 'aws-cdk-lib/aws-stepfunctions';
|
|
36
|
-
import * as lambda from 'aws-cdk-lib/aws-lambda';
|
|
37
|
-
|
|
38
|
-
const startState = new stepfunctions.Pass(this, 'StartState');
|
|
39
|
-
|
|
40
|
-
new LambdaToStepfunctions(this, 'LambdaToStepfunctionsPattern', {
|
|
41
|
-
lambdaFunctionProps: {
|
|
42
|
-
runtime: lambda.Runtime.NODEJS_20_X,
|
|
43
|
-
handler: 'index.handler',
|
|
44
|
-
code: lambda.Code.fromAsset(`lambda`)
|
|
45
|
-
},
|
|
46
|
-
stateMachineProps: {
|
|
47
|
-
definition: startState
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
Python
|
|
53
|
-
|
|
54
|
-
```python
|
|
55
|
-
from aws_solutions_constructs.aws_lambda_stepfunctions import LambdaToStepfunctions
|
|
56
|
-
from aws_cdk import (
|
|
57
|
-
aws_lambda as _lambda,
|
|
58
|
-
aws_stepfunctions as stepfunctions,
|
|
59
|
-
Stack
|
|
60
|
-
)
|
|
61
|
-
from constructs import Construct
|
|
62
|
-
|
|
63
|
-
start_state = stepfunctions.Pass(self, 'start_state')
|
|
64
|
-
|
|
65
|
-
LambdaToStepfunctions(
|
|
66
|
-
self, 'test-lambda-stepfunctions-stack',
|
|
67
|
-
lambda_function_props=_lambda.FunctionProps(
|
|
68
|
-
code=_lambda.Code.from_asset('lambda'),
|
|
69
|
-
runtime=_lambda.Runtime.PYTHON_3_11,
|
|
70
|
-
handler='index.handler'
|
|
71
|
-
),
|
|
72
|
-
state_machine_props=stepfunctions.StateMachineProps(
|
|
73
|
-
definition=start_state)
|
|
74
|
-
)
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
Java
|
|
78
|
-
|
|
79
|
-
```java
|
|
80
|
-
import software.constructs.Construct;
|
|
81
|
-
|
|
82
|
-
import software.amazon.awscdk.Stack;
|
|
83
|
-
import software.amazon.awscdk.StackProps;
|
|
84
|
-
import software.amazon.awscdk.services.lambda.*;
|
|
85
|
-
import software.amazon.awscdk.services.lambda.Runtime;
|
|
86
|
-
import software.amazon.awscdk.services.stepfunctions.*;
|
|
87
|
-
import software.amazon.awsconstructs.services.lambdastepfunctions.*;
|
|
88
|
-
|
|
89
|
-
final Pass startState = new Pass(this, "StartState");
|
|
90
|
-
|
|
91
|
-
new LambdaToStepfunctions(this, "test-lambda-stepfunctions-stack",
|
|
92
|
-
new LambdaToStepfunctionsProps.Builder()
|
|
93
|
-
.lambdaFunctionProps(new FunctionProps.Builder()
|
|
94
|
-
.runtime(Runtime.NODEJS_20_X)
|
|
95
|
-
.code(Code.fromAsset("lambda"))
|
|
96
|
-
.handler("index.handler")
|
|
97
|
-
.build())
|
|
98
|
-
.stateMachineProps(new StateMachineProps.Builder()
|
|
99
|
-
.definition(startState)
|
|
100
|
-
.build())
|
|
101
|
-
.build());
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
## Pattern Construct Props
|
|
105
|
-
|
|
106
|
-
| **Name** | **Type** | **Description** |
|
|
107
|
-
|:-------------|:----------------|-----------------|
|
|
108
|
-
|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.|
|
|
109
|
-
|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.|
|
|
110
|
-
|stateMachineProps|[`sfn.StateMachineProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.StateMachineProps.html)|User provided props for the sfn.StateMachine.|
|
|
111
|
-
|createCloudWatchAlarms|`boolean`|Whether to create recommended CloudWatch alarms|
|
|
112
|
-
|logGroupProps?|[`logs.LogGroupProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroupProps.html)|User provided props to override the default props for for the CloudWatchLogs LogGroup.|
|
|
113
|
-
|stateMachineEnvironmentVariableName?|`string`|Optional Name for the Lambda function environment variable set to the ARN of the state machine. Default: STATE_MACHINE_ARN |
|
|
114
|
-
|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 an Interface Endpoint will be created in the VPC for Amazon Step Functions. 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.|
|
|
115
|
-
|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.|
|
|
116
|
-
|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`.|
|
|
117
|
-
|
|
118
|
-
## Pattern Properties
|
|
119
|
-
|
|
120
|
-
| **Name** | **Type** | **Description** |
|
|
121
|
-
|:-------------|:----------------|-----------------|
|
|
122
|
-
|lambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Returns an instance of the Lambda function created by the pattern.|
|
|
123
|
-
|stateMachine|[`sfn.StateMachine`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.StateMachine.html)|Returns an instance of StateMachine created by the construct.|
|
|
124
|
-
|stateMachineLogGroup|[`logs.ILogGroup`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.ILogGroup.html)|Returns an instance of the ILogGroup created by the construct for StateMachine|
|
|
125
|
-
|cloudwatchAlarms?|[`cloudwatch.Alarm[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.Alarm.html)|Returns a list of alarms created by the construct.|
|
|
126
|
-
|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.|
|
|
127
|
-
|
|
128
|
-
## Default settings
|
|
129
|
-
|
|
130
|
-
Out of the box implementation of the Construct without any override will set the following defaults:
|
|
131
|
-
|
|
132
|
-
### AWS Lambda Function
|
|
133
|
-
|
|
134
|
-
* Configure limited privilege access IAM role for Lambda function
|
|
135
|
-
* Enable reusing connections with Keep-Alive for NodeJs Lambda function
|
|
136
|
-
* Enable X-Ray Tracing
|
|
137
|
-
* Set Environment Variables
|
|
138
|
-
|
|
139
|
-
* (default) STATE_MACHINE_ARN
|
|
140
|
-
* AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
|
|
141
|
-
|
|
142
|
-
### AWS Step Functions
|
|
143
|
-
|
|
144
|
-
* Enable CloudWatch logging for API Gateway
|
|
145
|
-
* Deploy best practices CloudWatch Alarms for the Step Functions
|
|
146
|
-
|
|
147
|
-
## Architecture
|
|
148
|
-
|
|
149
|
-

|
|
150
|
-
|
|
151
|
-
---
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
© 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-lambda-stepfunctions/README.adoc)
|
|
155
3
|
'''
|
|
156
4
|
from pkgutil import extend_path
|
|
157
5
|
__path__ = extend_path(__path__, __name__)
|
|
@@ -34,9 +34,9 @@ import constructs._jsii
|
|
|
34
34
|
|
|
35
35
|
__jsii_assembly__ = jsii.JSIIAssembly.load(
|
|
36
36
|
"@aws-solutions-constructs/aws-lambda-stepfunctions",
|
|
37
|
-
"2.85.
|
|
37
|
+
"2.85.4",
|
|
38
38
|
__name__[0:-6],
|
|
39
|
-
"aws-lambda-stepfunctions@2.85.
|
|
39
|
+
"aws-lambda-stepfunctions@2.85.4.jsii.tgz",
|
|
40
40
|
)
|
|
41
41
|
|
|
42
42
|
__all__ = [
|
|
Binary file
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: aws-solutions-constructs.aws-lambda-stepfunctions
|
|
3
|
+
Version: 2.85.4
|
|
4
|
+
Summary: CDK constructs for defining an interaction between an AWS Lambda function and an AWS Step Function.
|
|
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.core==2.85.4
|
|
23
|
+
Requires-Dist: constructs<11.0.0,>=10.0.0
|
|
24
|
+
Requires-Dist: jsii<2.0.0,>=1.111.0
|
|
25
|
+
Requires-Dist: publication>=0.0.3
|
|
26
|
+
Requires-Dist: typeguard<4.3.0,>=2.13.3
|
|
27
|
+
|
|
28
|
+
Documentation for this pattern can be found [here](https://github.com/awslabs/aws-solutions-constructs/blob/main/source/patterns/%40aws-solutions-constructs/aws-lambda-stepfunctions/README.adoc)
|
|
@@ -11,4 +11,4 @@ src/aws_solutions_constructs.aws_lambda_stepfunctions.egg-info/top_level.txt
|
|
|
11
11
|
src/aws_solutions_constructs/aws_lambda_stepfunctions/__init__.py
|
|
12
12
|
src/aws_solutions_constructs/aws_lambda_stepfunctions/py.typed
|
|
13
13
|
src/aws_solutions_constructs/aws_lambda_stepfunctions/_jsii/__init__.py
|
|
14
|
-
src/aws_solutions_constructs/aws_lambda_stepfunctions/_jsii/aws-lambda-stepfunctions@2.85.
|
|
14
|
+
src/aws_solutions_constructs/aws_lambda_stepfunctions/_jsii/aws-lambda-stepfunctions@2.85.4.jsii.tgz
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: aws-solutions-constructs.aws-lambda-stepfunctions
|
|
3
|
-
Version: 2.85.2
|
|
4
|
-
Summary: CDK constructs for defining an interaction between an AWS Lambda function and an AWS Step Function.
|
|
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.core==2.85.2
|
|
23
|
-
Requires-Dist: constructs<11.0.0,>=10.0.0
|
|
24
|
-
Requires-Dist: jsii<2.0.0,>=1.111.0
|
|
25
|
-
Requires-Dist: publication>=0.0.3
|
|
26
|
-
Requires-Dist: typeguard<4.3.0,>=2.13.3
|
|
27
|
-
|
|
28
|
-
# aws-lambda-stepfunctions module
|
|
29
|
-
|
|
30
|
-
<!--BEGIN STABILITY BANNER-->---
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-

|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
<!--END STABILITY BANNER-->
|
|
37
|
-
|
|
38
|
-
| **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
|
|
39
|
-
|:-------------|:-------------|
|
|
40
|
-
|
|
41
|
-
<div style="height:8px"></div>
|
|
42
|
-
|
|
43
|
-
| **Language** | **Package** |
|
|
44
|
-
|:-------------|-----------------|
|
|
45
|
-
| Python|`aws_solutions_constructs.aws_lambda_stepfunctions`|
|
|
46
|
-
| Typescript|`@aws-solutions-constructs/aws-lambda-stepfunctions`|
|
|
47
|
-
| Java|`software.amazon.awsconstructs.services.lambdastepfunctions`|
|
|
48
|
-
|
|
49
|
-
## Overview
|
|
50
|
-
|
|
51
|
-
This AWS Solutions Construct implements an AWS Lambda function connected to an AWS Step Functions.
|
|
52
|
-
|
|
53
|
-
Here is a minimal deployable pattern definition:
|
|
54
|
-
|
|
55
|
-
Typescript
|
|
56
|
-
|
|
57
|
-
```python
|
|
58
|
-
import { Construct } from 'constructs';
|
|
59
|
-
import { Stack, StackProps } from 'aws-cdk-lib';
|
|
60
|
-
import { LambdaToStepfunctions } from '@aws-solutions-constructs/aws-lambda-stepfunctions';
|
|
61
|
-
import * as stepfunctions from 'aws-cdk-lib/aws-stepfunctions';
|
|
62
|
-
import * as lambda from 'aws-cdk-lib/aws-lambda';
|
|
63
|
-
|
|
64
|
-
const startState = new stepfunctions.Pass(this, 'StartState');
|
|
65
|
-
|
|
66
|
-
new LambdaToStepfunctions(this, 'LambdaToStepfunctionsPattern', {
|
|
67
|
-
lambdaFunctionProps: {
|
|
68
|
-
runtime: lambda.Runtime.NODEJS_20_X,
|
|
69
|
-
handler: 'index.handler',
|
|
70
|
-
code: lambda.Code.fromAsset(`lambda`)
|
|
71
|
-
},
|
|
72
|
-
stateMachineProps: {
|
|
73
|
-
definition: startState
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
Python
|
|
79
|
-
|
|
80
|
-
```python
|
|
81
|
-
from aws_solutions_constructs.aws_lambda_stepfunctions import LambdaToStepfunctions
|
|
82
|
-
from aws_cdk import (
|
|
83
|
-
aws_lambda as _lambda,
|
|
84
|
-
aws_stepfunctions as stepfunctions,
|
|
85
|
-
Stack
|
|
86
|
-
)
|
|
87
|
-
from constructs import Construct
|
|
88
|
-
|
|
89
|
-
start_state = stepfunctions.Pass(self, 'start_state')
|
|
90
|
-
|
|
91
|
-
LambdaToStepfunctions(
|
|
92
|
-
self, 'test-lambda-stepfunctions-stack',
|
|
93
|
-
lambda_function_props=_lambda.FunctionProps(
|
|
94
|
-
code=_lambda.Code.from_asset('lambda'),
|
|
95
|
-
runtime=_lambda.Runtime.PYTHON_3_11,
|
|
96
|
-
handler='index.handler'
|
|
97
|
-
),
|
|
98
|
-
state_machine_props=stepfunctions.StateMachineProps(
|
|
99
|
-
definition=start_state)
|
|
100
|
-
)
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
Java
|
|
104
|
-
|
|
105
|
-
```java
|
|
106
|
-
import software.constructs.Construct;
|
|
107
|
-
|
|
108
|
-
import software.amazon.awscdk.Stack;
|
|
109
|
-
import software.amazon.awscdk.StackProps;
|
|
110
|
-
import software.amazon.awscdk.services.lambda.*;
|
|
111
|
-
import software.amazon.awscdk.services.lambda.Runtime;
|
|
112
|
-
import software.amazon.awscdk.services.stepfunctions.*;
|
|
113
|
-
import software.amazon.awsconstructs.services.lambdastepfunctions.*;
|
|
114
|
-
|
|
115
|
-
final Pass startState = new Pass(this, "StartState");
|
|
116
|
-
|
|
117
|
-
new LambdaToStepfunctions(this, "test-lambda-stepfunctions-stack",
|
|
118
|
-
new LambdaToStepfunctionsProps.Builder()
|
|
119
|
-
.lambdaFunctionProps(new FunctionProps.Builder()
|
|
120
|
-
.runtime(Runtime.NODEJS_20_X)
|
|
121
|
-
.code(Code.fromAsset("lambda"))
|
|
122
|
-
.handler("index.handler")
|
|
123
|
-
.build())
|
|
124
|
-
.stateMachineProps(new StateMachineProps.Builder()
|
|
125
|
-
.definition(startState)
|
|
126
|
-
.build())
|
|
127
|
-
.build());
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
## Pattern Construct Props
|
|
131
|
-
|
|
132
|
-
| **Name** | **Type** | **Description** |
|
|
133
|
-
|:-------------|:----------------|-----------------|
|
|
134
|
-
|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.|
|
|
135
|
-
|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.|
|
|
136
|
-
|stateMachineProps|[`sfn.StateMachineProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.StateMachineProps.html)|User provided props for the sfn.StateMachine.|
|
|
137
|
-
|createCloudWatchAlarms|`boolean`|Whether to create recommended CloudWatch alarms|
|
|
138
|
-
|logGroupProps?|[`logs.LogGroupProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroupProps.html)|User provided props to override the default props for for the CloudWatchLogs LogGroup.|
|
|
139
|
-
|stateMachineEnvironmentVariableName?|`string`|Optional Name for the Lambda function environment variable set to the ARN of the state machine. Default: STATE_MACHINE_ARN |
|
|
140
|
-
|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 an Interface Endpoint will be created in the VPC for Amazon Step Functions. 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.|
|
|
141
|
-
|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.|
|
|
142
|
-
|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`.|
|
|
143
|
-
|
|
144
|
-
## Pattern Properties
|
|
145
|
-
|
|
146
|
-
| **Name** | **Type** | **Description** |
|
|
147
|
-
|:-------------|:----------------|-----------------|
|
|
148
|
-
|lambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Returns an instance of the Lambda function created by the pattern.|
|
|
149
|
-
|stateMachine|[`sfn.StateMachine`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.StateMachine.html)|Returns an instance of StateMachine created by the construct.|
|
|
150
|
-
|stateMachineLogGroup|[`logs.ILogGroup`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.ILogGroup.html)|Returns an instance of the ILogGroup created by the construct for StateMachine|
|
|
151
|
-
|cloudwatchAlarms?|[`cloudwatch.Alarm[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.Alarm.html)|Returns a list of alarms created by the construct.|
|
|
152
|
-
|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.|
|
|
153
|
-
|
|
154
|
-
## Default settings
|
|
155
|
-
|
|
156
|
-
Out of the box implementation of the Construct without any override will set the following defaults:
|
|
157
|
-
|
|
158
|
-
### AWS Lambda Function
|
|
159
|
-
|
|
160
|
-
* Configure limited privilege access IAM role for Lambda function
|
|
161
|
-
* Enable reusing connections with Keep-Alive for NodeJs Lambda function
|
|
162
|
-
* Enable X-Ray Tracing
|
|
163
|
-
* Set Environment Variables
|
|
164
|
-
|
|
165
|
-
* (default) STATE_MACHINE_ARN
|
|
166
|
-
* AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
|
|
167
|
-
|
|
168
|
-
### AWS Step Functions
|
|
169
|
-
|
|
170
|
-
* Enable CloudWatch logging for API Gateway
|
|
171
|
-
* Deploy best practices CloudWatch Alarms for the Step Functions
|
|
172
|
-
|
|
173
|
-
## Architecture
|
|
174
|
-
|
|
175
|
-

|
|
176
|
-
|
|
177
|
-
---
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
© Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
# aws-lambda-stepfunctions module
|
|
2
|
-
|
|
3
|
-
<!--BEGIN STABILITY BANNER-->---
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-

|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
<!--END STABILITY BANNER-->
|
|
10
|
-
|
|
11
|
-
| **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
|
|
12
|
-
|:-------------|:-------------|
|
|
13
|
-
|
|
14
|
-
<div style="height:8px"></div>
|
|
15
|
-
|
|
16
|
-
| **Language** | **Package** |
|
|
17
|
-
|:-------------|-----------------|
|
|
18
|
-
| Python|`aws_solutions_constructs.aws_lambda_stepfunctions`|
|
|
19
|
-
| Typescript|`@aws-solutions-constructs/aws-lambda-stepfunctions`|
|
|
20
|
-
| Java|`software.amazon.awsconstructs.services.lambdastepfunctions`|
|
|
21
|
-
|
|
22
|
-
## Overview
|
|
23
|
-
|
|
24
|
-
This AWS Solutions Construct implements an AWS Lambda function connected to an AWS Step Functions.
|
|
25
|
-
|
|
26
|
-
Here is a minimal deployable pattern definition:
|
|
27
|
-
|
|
28
|
-
Typescript
|
|
29
|
-
|
|
30
|
-
```python
|
|
31
|
-
import { Construct } from 'constructs';
|
|
32
|
-
import { Stack, StackProps } from 'aws-cdk-lib';
|
|
33
|
-
import { LambdaToStepfunctions } from '@aws-solutions-constructs/aws-lambda-stepfunctions';
|
|
34
|
-
import * as stepfunctions from 'aws-cdk-lib/aws-stepfunctions';
|
|
35
|
-
import * as lambda from 'aws-cdk-lib/aws-lambda';
|
|
36
|
-
|
|
37
|
-
const startState = new stepfunctions.Pass(this, 'StartState');
|
|
38
|
-
|
|
39
|
-
new LambdaToStepfunctions(this, 'LambdaToStepfunctionsPattern', {
|
|
40
|
-
lambdaFunctionProps: {
|
|
41
|
-
runtime: lambda.Runtime.NODEJS_20_X,
|
|
42
|
-
handler: 'index.handler',
|
|
43
|
-
code: lambda.Code.fromAsset(`lambda`)
|
|
44
|
-
},
|
|
45
|
-
stateMachineProps: {
|
|
46
|
-
definition: startState
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Python
|
|
52
|
-
|
|
53
|
-
```python
|
|
54
|
-
from aws_solutions_constructs.aws_lambda_stepfunctions import LambdaToStepfunctions
|
|
55
|
-
from aws_cdk import (
|
|
56
|
-
aws_lambda as _lambda,
|
|
57
|
-
aws_stepfunctions as stepfunctions,
|
|
58
|
-
Stack
|
|
59
|
-
)
|
|
60
|
-
from constructs import Construct
|
|
61
|
-
|
|
62
|
-
start_state = stepfunctions.Pass(self, 'start_state')
|
|
63
|
-
|
|
64
|
-
LambdaToStepfunctions(
|
|
65
|
-
self, 'test-lambda-stepfunctions-stack',
|
|
66
|
-
lambda_function_props=_lambda.FunctionProps(
|
|
67
|
-
code=_lambda.Code.from_asset('lambda'),
|
|
68
|
-
runtime=_lambda.Runtime.PYTHON_3_11,
|
|
69
|
-
handler='index.handler'
|
|
70
|
-
),
|
|
71
|
-
state_machine_props=stepfunctions.StateMachineProps(
|
|
72
|
-
definition=start_state)
|
|
73
|
-
)
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
Java
|
|
77
|
-
|
|
78
|
-
```java
|
|
79
|
-
import software.constructs.Construct;
|
|
80
|
-
|
|
81
|
-
import software.amazon.awscdk.Stack;
|
|
82
|
-
import software.amazon.awscdk.StackProps;
|
|
83
|
-
import software.amazon.awscdk.services.lambda.*;
|
|
84
|
-
import software.amazon.awscdk.services.lambda.Runtime;
|
|
85
|
-
import software.amazon.awscdk.services.stepfunctions.*;
|
|
86
|
-
import software.amazon.awsconstructs.services.lambdastepfunctions.*;
|
|
87
|
-
|
|
88
|
-
final Pass startState = new Pass(this, "StartState");
|
|
89
|
-
|
|
90
|
-
new LambdaToStepfunctions(this, "test-lambda-stepfunctions-stack",
|
|
91
|
-
new LambdaToStepfunctionsProps.Builder()
|
|
92
|
-
.lambdaFunctionProps(new FunctionProps.Builder()
|
|
93
|
-
.runtime(Runtime.NODEJS_20_X)
|
|
94
|
-
.code(Code.fromAsset("lambda"))
|
|
95
|
-
.handler("index.handler")
|
|
96
|
-
.build())
|
|
97
|
-
.stateMachineProps(new StateMachineProps.Builder()
|
|
98
|
-
.definition(startState)
|
|
99
|
-
.build())
|
|
100
|
-
.build());
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
## Pattern Construct Props
|
|
104
|
-
|
|
105
|
-
| **Name** | **Type** | **Description** |
|
|
106
|
-
|:-------------|:----------------|-----------------|
|
|
107
|
-
|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.|
|
|
108
|
-
|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.|
|
|
109
|
-
|stateMachineProps|[`sfn.StateMachineProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.StateMachineProps.html)|User provided props for the sfn.StateMachine.|
|
|
110
|
-
|createCloudWatchAlarms|`boolean`|Whether to create recommended CloudWatch alarms|
|
|
111
|
-
|logGroupProps?|[`logs.LogGroupProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroupProps.html)|User provided props to override the default props for for the CloudWatchLogs LogGroup.|
|
|
112
|
-
|stateMachineEnvironmentVariableName?|`string`|Optional Name for the Lambda function environment variable set to the ARN of the state machine. Default: STATE_MACHINE_ARN |
|
|
113
|
-
|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 an Interface Endpoint will be created in the VPC for Amazon Step Functions. 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.|
|
|
114
|
-
|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.|
|
|
115
|
-
|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`.|
|
|
116
|
-
|
|
117
|
-
## Pattern Properties
|
|
118
|
-
|
|
119
|
-
| **Name** | **Type** | **Description** |
|
|
120
|
-
|:-------------|:----------------|-----------------|
|
|
121
|
-
|lambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Returns an instance of the Lambda function created by the pattern.|
|
|
122
|
-
|stateMachine|[`sfn.StateMachine`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.StateMachine.html)|Returns an instance of StateMachine created by the construct.|
|
|
123
|
-
|stateMachineLogGroup|[`logs.ILogGroup`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.ILogGroup.html)|Returns an instance of the ILogGroup created by the construct for StateMachine|
|
|
124
|
-
|cloudwatchAlarms?|[`cloudwatch.Alarm[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.Alarm.html)|Returns a list of alarms created by the construct.|
|
|
125
|
-
|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.|
|
|
126
|
-
|
|
127
|
-
## Default settings
|
|
128
|
-
|
|
129
|
-
Out of the box implementation of the Construct without any override will set the following defaults:
|
|
130
|
-
|
|
131
|
-
### AWS Lambda Function
|
|
132
|
-
|
|
133
|
-
* Configure limited privilege access IAM role for Lambda function
|
|
134
|
-
* Enable reusing connections with Keep-Alive for NodeJs Lambda function
|
|
135
|
-
* Enable X-Ray Tracing
|
|
136
|
-
* Set Environment Variables
|
|
137
|
-
|
|
138
|
-
* (default) STATE_MACHINE_ARN
|
|
139
|
-
* AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
|
|
140
|
-
|
|
141
|
-
### AWS Step Functions
|
|
142
|
-
|
|
143
|
-
* Enable CloudWatch logging for API Gateway
|
|
144
|
-
* Deploy best practices CloudWatch Alarms for the Step Functions
|
|
145
|
-
|
|
146
|
-
## Architecture
|
|
147
|
-
|
|
148
|
-

|
|
149
|
-
|
|
150
|
-
---
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
© Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
Binary file
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: aws-solutions-constructs.aws-lambda-stepfunctions
|
|
3
|
-
Version: 2.85.2
|
|
4
|
-
Summary: CDK constructs for defining an interaction between an AWS Lambda function and an AWS Step Function.
|
|
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.core==2.85.2
|
|
23
|
-
Requires-Dist: constructs<11.0.0,>=10.0.0
|
|
24
|
-
Requires-Dist: jsii<2.0.0,>=1.111.0
|
|
25
|
-
Requires-Dist: publication>=0.0.3
|
|
26
|
-
Requires-Dist: typeguard<4.3.0,>=2.13.3
|
|
27
|
-
|
|
28
|
-
# aws-lambda-stepfunctions module
|
|
29
|
-
|
|
30
|
-
<!--BEGIN STABILITY BANNER-->---
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-

|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
<!--END STABILITY BANNER-->
|
|
37
|
-
|
|
38
|
-
| **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
|
|
39
|
-
|:-------------|:-------------|
|
|
40
|
-
|
|
41
|
-
<div style="height:8px"></div>
|
|
42
|
-
|
|
43
|
-
| **Language** | **Package** |
|
|
44
|
-
|:-------------|-----------------|
|
|
45
|
-
| Python|`aws_solutions_constructs.aws_lambda_stepfunctions`|
|
|
46
|
-
| Typescript|`@aws-solutions-constructs/aws-lambda-stepfunctions`|
|
|
47
|
-
| Java|`software.amazon.awsconstructs.services.lambdastepfunctions`|
|
|
48
|
-
|
|
49
|
-
## Overview
|
|
50
|
-
|
|
51
|
-
This AWS Solutions Construct implements an AWS Lambda function connected to an AWS Step Functions.
|
|
52
|
-
|
|
53
|
-
Here is a minimal deployable pattern definition:
|
|
54
|
-
|
|
55
|
-
Typescript
|
|
56
|
-
|
|
57
|
-
```python
|
|
58
|
-
import { Construct } from 'constructs';
|
|
59
|
-
import { Stack, StackProps } from 'aws-cdk-lib';
|
|
60
|
-
import { LambdaToStepfunctions } from '@aws-solutions-constructs/aws-lambda-stepfunctions';
|
|
61
|
-
import * as stepfunctions from 'aws-cdk-lib/aws-stepfunctions';
|
|
62
|
-
import * as lambda from 'aws-cdk-lib/aws-lambda';
|
|
63
|
-
|
|
64
|
-
const startState = new stepfunctions.Pass(this, 'StartState');
|
|
65
|
-
|
|
66
|
-
new LambdaToStepfunctions(this, 'LambdaToStepfunctionsPattern', {
|
|
67
|
-
lambdaFunctionProps: {
|
|
68
|
-
runtime: lambda.Runtime.NODEJS_20_X,
|
|
69
|
-
handler: 'index.handler',
|
|
70
|
-
code: lambda.Code.fromAsset(`lambda`)
|
|
71
|
-
},
|
|
72
|
-
stateMachineProps: {
|
|
73
|
-
definition: startState
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
Python
|
|
79
|
-
|
|
80
|
-
```python
|
|
81
|
-
from aws_solutions_constructs.aws_lambda_stepfunctions import LambdaToStepfunctions
|
|
82
|
-
from aws_cdk import (
|
|
83
|
-
aws_lambda as _lambda,
|
|
84
|
-
aws_stepfunctions as stepfunctions,
|
|
85
|
-
Stack
|
|
86
|
-
)
|
|
87
|
-
from constructs import Construct
|
|
88
|
-
|
|
89
|
-
start_state = stepfunctions.Pass(self, 'start_state')
|
|
90
|
-
|
|
91
|
-
LambdaToStepfunctions(
|
|
92
|
-
self, 'test-lambda-stepfunctions-stack',
|
|
93
|
-
lambda_function_props=_lambda.FunctionProps(
|
|
94
|
-
code=_lambda.Code.from_asset('lambda'),
|
|
95
|
-
runtime=_lambda.Runtime.PYTHON_3_11,
|
|
96
|
-
handler='index.handler'
|
|
97
|
-
),
|
|
98
|
-
state_machine_props=stepfunctions.StateMachineProps(
|
|
99
|
-
definition=start_state)
|
|
100
|
-
)
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
Java
|
|
104
|
-
|
|
105
|
-
```java
|
|
106
|
-
import software.constructs.Construct;
|
|
107
|
-
|
|
108
|
-
import software.amazon.awscdk.Stack;
|
|
109
|
-
import software.amazon.awscdk.StackProps;
|
|
110
|
-
import software.amazon.awscdk.services.lambda.*;
|
|
111
|
-
import software.amazon.awscdk.services.lambda.Runtime;
|
|
112
|
-
import software.amazon.awscdk.services.stepfunctions.*;
|
|
113
|
-
import software.amazon.awsconstructs.services.lambdastepfunctions.*;
|
|
114
|
-
|
|
115
|
-
final Pass startState = new Pass(this, "StartState");
|
|
116
|
-
|
|
117
|
-
new LambdaToStepfunctions(this, "test-lambda-stepfunctions-stack",
|
|
118
|
-
new LambdaToStepfunctionsProps.Builder()
|
|
119
|
-
.lambdaFunctionProps(new FunctionProps.Builder()
|
|
120
|
-
.runtime(Runtime.NODEJS_20_X)
|
|
121
|
-
.code(Code.fromAsset("lambda"))
|
|
122
|
-
.handler("index.handler")
|
|
123
|
-
.build())
|
|
124
|
-
.stateMachineProps(new StateMachineProps.Builder()
|
|
125
|
-
.definition(startState)
|
|
126
|
-
.build())
|
|
127
|
-
.build());
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
## Pattern Construct Props
|
|
131
|
-
|
|
132
|
-
| **Name** | **Type** | **Description** |
|
|
133
|
-
|:-------------|:----------------|-----------------|
|
|
134
|
-
|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.|
|
|
135
|
-
|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.|
|
|
136
|
-
|stateMachineProps|[`sfn.StateMachineProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.StateMachineProps.html)|User provided props for the sfn.StateMachine.|
|
|
137
|
-
|createCloudWatchAlarms|`boolean`|Whether to create recommended CloudWatch alarms|
|
|
138
|
-
|logGroupProps?|[`logs.LogGroupProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroupProps.html)|User provided props to override the default props for for the CloudWatchLogs LogGroup.|
|
|
139
|
-
|stateMachineEnvironmentVariableName?|`string`|Optional Name for the Lambda function environment variable set to the ARN of the state machine. Default: STATE_MACHINE_ARN |
|
|
140
|
-
|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 an Interface Endpoint will be created in the VPC for Amazon Step Functions. 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.|
|
|
141
|
-
|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.|
|
|
142
|
-
|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`.|
|
|
143
|
-
|
|
144
|
-
## Pattern Properties
|
|
145
|
-
|
|
146
|
-
| **Name** | **Type** | **Description** |
|
|
147
|
-
|:-------------|:----------------|-----------------|
|
|
148
|
-
|lambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Returns an instance of the Lambda function created by the pattern.|
|
|
149
|
-
|stateMachine|[`sfn.StateMachine`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.StateMachine.html)|Returns an instance of StateMachine created by the construct.|
|
|
150
|
-
|stateMachineLogGroup|[`logs.ILogGroup`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.ILogGroup.html)|Returns an instance of the ILogGroup created by the construct for StateMachine|
|
|
151
|
-
|cloudwatchAlarms?|[`cloudwatch.Alarm[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.Alarm.html)|Returns a list of alarms created by the construct.|
|
|
152
|
-
|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.|
|
|
153
|
-
|
|
154
|
-
## Default settings
|
|
155
|
-
|
|
156
|
-
Out of the box implementation of the Construct without any override will set the following defaults:
|
|
157
|
-
|
|
158
|
-
### AWS Lambda Function
|
|
159
|
-
|
|
160
|
-
* Configure limited privilege access IAM role for Lambda function
|
|
161
|
-
* Enable reusing connections with Keep-Alive for NodeJs Lambda function
|
|
162
|
-
* Enable X-Ray Tracing
|
|
163
|
-
* Set Environment Variables
|
|
164
|
-
|
|
165
|
-
* (default) STATE_MACHINE_ARN
|
|
166
|
-
* AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
|
|
167
|
-
|
|
168
|
-
### AWS Step Functions
|
|
169
|
-
|
|
170
|
-
* Enable CloudWatch logging for API Gateway
|
|
171
|
-
* Deploy best practices CloudWatch Alarms for the Step Functions
|
|
172
|
-
|
|
173
|
-
## Architecture
|
|
174
|
-
|
|
175
|
-

|
|
176
|
-
|
|
177
|
-
---
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
© Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|