aws-solutions-constructs.aws-eventbridge-lambda 2.85.1__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.
- aws_solutions_constructs_aws_eventbridge_lambda-2.85.3/PKG-INFO +28 -0
- aws_solutions_constructs_aws_eventbridge_lambda-2.85.3/README.md +1 -0
- {aws_solutions_constructs_aws_eventbridge_lambda-2.85.1 → aws_solutions_constructs_aws_eventbridge_lambda-2.85.3}/setup.py +3 -3
- {aws_solutions_constructs_aws_eventbridge_lambda-2.85.1 → aws_solutions_constructs_aws_eventbridge_lambda-2.85.3}/src/aws_solutions_constructs/aws_eventbridge_lambda/__init__.py +1 -142
- {aws_solutions_constructs_aws_eventbridge_lambda-2.85.1 → aws_solutions_constructs_aws_eventbridge_lambda-2.85.3}/src/aws_solutions_constructs/aws_eventbridge_lambda/_jsii/__init__.py +2 -2
- aws_solutions_constructs_aws_eventbridge_lambda-2.85.3/src/aws_solutions_constructs/aws_eventbridge_lambda/_jsii/aws-eventbridge-lambda@2.85.3.jsii.tgz +0 -0
- aws_solutions_constructs_aws_eventbridge_lambda-2.85.3/src/aws_solutions_constructs.aws_eventbridge_lambda.egg-info/PKG-INFO +28 -0
- {aws_solutions_constructs_aws_eventbridge_lambda-2.85.1 → aws_solutions_constructs_aws_eventbridge_lambda-2.85.3}/src/aws_solutions_constructs.aws_eventbridge_lambda.egg-info/SOURCES.txt +1 -1
- {aws_solutions_constructs_aws_eventbridge_lambda-2.85.1 → aws_solutions_constructs_aws_eventbridge_lambda-2.85.3}/src/aws_solutions_constructs.aws_eventbridge_lambda.egg-info/requires.txt +1 -1
- aws_solutions_constructs_aws_eventbridge_lambda-2.85.1/PKG-INFO +0 -169
- aws_solutions_constructs_aws_eventbridge_lambda-2.85.1/README.md +0 -142
- aws_solutions_constructs_aws_eventbridge_lambda-2.85.1/src/aws_solutions_constructs/aws_eventbridge_lambda/_jsii/aws-eventbridge-lambda@2.85.1.jsii.tgz +0 -0
- aws_solutions_constructs_aws_eventbridge_lambda-2.85.1/src/aws_solutions_constructs.aws_eventbridge_lambda.egg-info/PKG-INFO +0 -169
- {aws_solutions_constructs_aws_eventbridge_lambda-2.85.1 → aws_solutions_constructs_aws_eventbridge_lambda-2.85.3}/LICENSE +0 -0
- {aws_solutions_constructs_aws_eventbridge_lambda-2.85.1 → aws_solutions_constructs_aws_eventbridge_lambda-2.85.3}/MANIFEST.in +0 -0
- {aws_solutions_constructs_aws_eventbridge_lambda-2.85.1 → aws_solutions_constructs_aws_eventbridge_lambda-2.85.3}/pyproject.toml +0 -0
- {aws_solutions_constructs_aws_eventbridge_lambda-2.85.1 → aws_solutions_constructs_aws_eventbridge_lambda-2.85.3}/setup.cfg +0 -0
- {aws_solutions_constructs_aws_eventbridge_lambda-2.85.1 → aws_solutions_constructs_aws_eventbridge_lambda-2.85.3}/src/aws_solutions_constructs/aws_eventbridge_lambda/py.typed +0 -0
- {aws_solutions_constructs_aws_eventbridge_lambda-2.85.1 → aws_solutions_constructs_aws_eventbridge_lambda-2.85.3}/src/aws_solutions_constructs.aws_eventbridge_lambda.egg-info/dependency_links.txt +0 -0
- {aws_solutions_constructs_aws_eventbridge_lambda-2.85.1 → aws_solutions_constructs_aws_eventbridge_lambda-2.85.3}/src/aws_solutions_constructs.aws_eventbridge_lambda.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: aws-solutions-constructs.aws-eventbridge-lambda
|
|
3
|
+
Version: 2.85.3
|
|
4
|
+
Summary: CDK Constructs for deploying AWS Events Rule that inveokes AWS Lambda
|
|
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.3
|
|
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-eventbridge-lambda/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-eventbridge-lambda/README.adoc)
|
|
@@ -5,7 +5,7 @@ kwargs = json.loads(
|
|
|
5
5
|
"""
|
|
6
6
|
{
|
|
7
7
|
"name": "aws-solutions-constructs.aws-eventbridge-lambda",
|
|
8
|
-
"version": "2.85.
|
|
8
|
+
"version": "2.85.3",
|
|
9
9
|
"description": "CDK Constructs for deploying AWS Events Rule that inveokes AWS Lambda",
|
|
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_eventbridge_lambda._jsii": [
|
|
29
|
-
"aws-eventbridge-lambda@2.85.
|
|
29
|
+
"aws-eventbridge-lambda@2.85.3.jsii.tgz"
|
|
30
30
|
],
|
|
31
31
|
"aws_solutions_constructs.aws_eventbridge_lambda": [
|
|
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.3",
|
|
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,146 +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_eventbridge_lambda`|
|
|
20
|
-
| Typescript|`@aws-solutions-constructs/aws-eventbridge-lambda`|
|
|
21
|
-
| Java|`software.amazon.awsconstructs.services.eventbridgelambda`|
|
|
22
|
-
|
|
23
|
-
## Overview
|
|
24
|
-
|
|
25
|
-
This AWS Solutions Construct implements an AWS EventBridge rule and an AWS Lambda function.
|
|
26
|
-
|
|
27
|
-
Here is a minimal deployable pattern definition:
|
|
28
|
-
|
|
29
|
-
Typescript
|
|
30
|
-
|
|
31
|
-
```python
|
|
32
|
-
import { Construct } from 'constructs';
|
|
33
|
-
import { Stack, StackProps, Duration } from 'aws-cdk-lib';
|
|
34
|
-
import { EventbridgeToLambdaProps, EventbridgeToLambda } from '@aws-solutions-constructs/aws-eventbridge-lambda';
|
|
35
|
-
import * as lambda from 'aws-cdk-lib/aws-lambda';
|
|
36
|
-
import * as events from 'aws-cdk-lib/aws-events';
|
|
37
|
-
|
|
38
|
-
const constructProps: EventbridgeToLambdaProps = {
|
|
39
|
-
lambdaFunctionProps: {
|
|
40
|
-
code: lambda.Code.fromAsset(`lambda`),
|
|
41
|
-
runtime: lambda.Runtime.NODEJS_20_X,
|
|
42
|
-
handler: 'index.handler'
|
|
43
|
-
},
|
|
44
|
-
eventRuleProps: {
|
|
45
|
-
schedule: events.Schedule.rate(Duration.minutes(5))
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
new EventbridgeToLambda(this, 'test-eventbridge-lambda', constructProps);
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
Python
|
|
53
|
-
|
|
54
|
-
```python
|
|
55
|
-
from aws_solutions_constructs.aws_eventbridge_lambda import EventbridgeToLambda, EventbridgeToLambdaProps
|
|
56
|
-
from aws_cdk import (
|
|
57
|
-
aws_lambda as _lambda,
|
|
58
|
-
aws_events as events,
|
|
59
|
-
Duration,
|
|
60
|
-
Stack
|
|
61
|
-
)
|
|
62
|
-
from constructs import Construct
|
|
63
|
-
|
|
64
|
-
EventbridgeToLambda(self, 'test-eventbridge-lambda',
|
|
65
|
-
lambda_function_props=_lambda.FunctionProps(
|
|
66
|
-
code=_lambda.Code.from_asset('lambda'),
|
|
67
|
-
runtime=_lambda.Runtime.PYTHON_3_11,
|
|
68
|
-
handler='index.handler'
|
|
69
|
-
),
|
|
70
|
-
event_rule_props=events.RuleProps(
|
|
71
|
-
schedule=events.Schedule.rate(
|
|
72
|
-
Duration.minutes(5))
|
|
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.Duration;
|
|
84
|
-
import software.amazon.awscdk.services.events.*;
|
|
85
|
-
import software.amazon.awscdk.services.lambda.*;
|
|
86
|
-
import software.amazon.awscdk.services.lambda.Runtime;
|
|
87
|
-
import software.amazon.awsconstructs.services.eventbridgelambda.*;
|
|
88
|
-
|
|
89
|
-
new EventbridgeToLambda(this, "test-eventbridge-lambda",
|
|
90
|
-
new EventbridgeToLambdaProps.Builder()
|
|
91
|
-
.lambdaFunctionProps(new FunctionProps.Builder()
|
|
92
|
-
.runtime(Runtime.NODEJS_20_X)
|
|
93
|
-
.code(Code.fromAsset("lambda"))
|
|
94
|
-
.handler("index.handler")
|
|
95
|
-
.build())
|
|
96
|
-
.eventRuleProps(new RuleProps.Builder()
|
|
97
|
-
.schedule(Schedule.rate(Duration.minutes(5)))
|
|
98
|
-
.build())
|
|
99
|
-
.build());
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
## Pattern Construct Props
|
|
103
|
-
|
|
104
|
-
| **Name** | **Type** | **Description** |
|
|
105
|
-
|:-------------|:----------------|-----------------|
|
|
106
|
-
|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.|
|
|
107
|
-
|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.|
|
|
108
|
-
|existingEventBusInterface?|[`events.IEventBus`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.IEventBus.html)| Optional user-provided custom EventBus for construct to use. Providing both this and `eventBusProps` results an error.|
|
|
109
|
-
|eventBusProps?|[`events.EventBusProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.EventBusProps.html)|Optional user-provided properties to override the default properties when creating a custom EventBus. Setting this value to `{}` will create a custom EventBus using all default properties. If neither this nor `existingEventBusInterface` is provided the construct will use the `default` EventBus. Providing both this and `existingEventBusInterface` results an error.|
|
|
110
|
-
|eventRuleProps|[`events.RuleProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.RuleProps.html)|User provided eventRuleProps to override the defaults|
|
|
111
|
-
|
|
112
|
-
## Pattern Properties
|
|
113
|
-
|
|
114
|
-
| **Name** | **Type** | **Description** |
|
|
115
|
-
|:-------------|:----------------|-----------------|
|
|
116
|
-
|eventBus?|[`events.IEventBus`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.IEventBus.html)|Returns the instance of events.IEventBus used by the construct|
|
|
117
|
-
|eventsRule|[`events.Rule`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.Rule.html)|Returns an instance of events.Rule created by the construct|
|
|
118
|
-
|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|
|
|
119
|
-
|
|
120
|
-
## Default settings
|
|
121
|
-
|
|
122
|
-
Out of the box implementation of the Construct without any override will set the following defaults:
|
|
123
|
-
|
|
124
|
-
### Amazon EventBridge Rule
|
|
125
|
-
|
|
126
|
-
* Grant least privilege permissions to EventBridge rule to trigger the Lambda Function
|
|
127
|
-
|
|
128
|
-
### AWS Lambda Function
|
|
129
|
-
|
|
130
|
-
* Configure limited privilege access IAM role for Lambda function
|
|
131
|
-
* Enable reusing connections with Keep-Alive for NodeJs Lambda function
|
|
132
|
-
* Enable X-Ray Tracing
|
|
133
|
-
* Set Environment Variables
|
|
134
|
-
* AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
|
|
135
|
-
|
|
136
|
-
## Architecture
|
|
137
|
-
|
|
138
|
-

|
|
139
|
-
|
|
140
|
-
---
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
© 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-eventbridge-lambda/README.adoc)
|
|
144
3
|
'''
|
|
145
4
|
from pkgutil import extend_path
|
|
146
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-eventbridge-lambda",
|
|
37
|
-
"2.85.
|
|
37
|
+
"2.85.3",
|
|
38
38
|
__name__[0:-6],
|
|
39
|
-
"aws-eventbridge-lambda@2.85.
|
|
39
|
+
"aws-eventbridge-lambda@2.85.3.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-eventbridge-lambda
|
|
3
|
+
Version: 2.85.3
|
|
4
|
+
Summary: CDK Constructs for deploying AWS Events Rule that inveokes AWS Lambda
|
|
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.3
|
|
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-eventbridge-lambda/README.adoc)
|
|
@@ -11,4 +11,4 @@ src/aws_solutions_constructs.aws_eventbridge_lambda.egg-info/top_level.txt
|
|
|
11
11
|
src/aws_solutions_constructs/aws_eventbridge_lambda/__init__.py
|
|
12
12
|
src/aws_solutions_constructs/aws_eventbridge_lambda/py.typed
|
|
13
13
|
src/aws_solutions_constructs/aws_eventbridge_lambda/_jsii/__init__.py
|
|
14
|
-
src/aws_solutions_constructs/aws_eventbridge_lambda/_jsii/aws-eventbridge-lambda@2.85.
|
|
14
|
+
src/aws_solutions_constructs/aws_eventbridge_lambda/_jsii/aws-eventbridge-lambda@2.85.3.jsii.tgz
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: aws-solutions-constructs.aws-eventbridge-lambda
|
|
3
|
-
Version: 2.85.1
|
|
4
|
-
Summary: CDK Constructs for deploying AWS Events Rule that inveokes AWS Lambda
|
|
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.1
|
|
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-eventbridge-lambda 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_eventbridge_lambda`|
|
|
46
|
-
| Typescript|`@aws-solutions-constructs/aws-eventbridge-lambda`|
|
|
47
|
-
| Java|`software.amazon.awsconstructs.services.eventbridgelambda`|
|
|
48
|
-
|
|
49
|
-
## Overview
|
|
50
|
-
|
|
51
|
-
This AWS Solutions Construct implements an AWS EventBridge rule and an AWS Lambda function.
|
|
52
|
-
|
|
53
|
-
Here is a minimal deployable pattern definition:
|
|
54
|
-
|
|
55
|
-
Typescript
|
|
56
|
-
|
|
57
|
-
```python
|
|
58
|
-
import { Construct } from 'constructs';
|
|
59
|
-
import { Stack, StackProps, Duration } from 'aws-cdk-lib';
|
|
60
|
-
import { EventbridgeToLambdaProps, EventbridgeToLambda } from '@aws-solutions-constructs/aws-eventbridge-lambda';
|
|
61
|
-
import * as lambda from 'aws-cdk-lib/aws-lambda';
|
|
62
|
-
import * as events from 'aws-cdk-lib/aws-events';
|
|
63
|
-
|
|
64
|
-
const constructProps: EventbridgeToLambdaProps = {
|
|
65
|
-
lambdaFunctionProps: {
|
|
66
|
-
code: lambda.Code.fromAsset(`lambda`),
|
|
67
|
-
runtime: lambda.Runtime.NODEJS_20_X,
|
|
68
|
-
handler: 'index.handler'
|
|
69
|
-
},
|
|
70
|
-
eventRuleProps: {
|
|
71
|
-
schedule: events.Schedule.rate(Duration.minutes(5))
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
new EventbridgeToLambda(this, 'test-eventbridge-lambda', constructProps);
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
Python
|
|
79
|
-
|
|
80
|
-
```python
|
|
81
|
-
from aws_solutions_constructs.aws_eventbridge_lambda import EventbridgeToLambda, EventbridgeToLambdaProps
|
|
82
|
-
from aws_cdk import (
|
|
83
|
-
aws_lambda as _lambda,
|
|
84
|
-
aws_events as events,
|
|
85
|
-
Duration,
|
|
86
|
-
Stack
|
|
87
|
-
)
|
|
88
|
-
from constructs import Construct
|
|
89
|
-
|
|
90
|
-
EventbridgeToLambda(self, 'test-eventbridge-lambda',
|
|
91
|
-
lambda_function_props=_lambda.FunctionProps(
|
|
92
|
-
code=_lambda.Code.from_asset('lambda'),
|
|
93
|
-
runtime=_lambda.Runtime.PYTHON_3_11,
|
|
94
|
-
handler='index.handler'
|
|
95
|
-
),
|
|
96
|
-
event_rule_props=events.RuleProps(
|
|
97
|
-
schedule=events.Schedule.rate(
|
|
98
|
-
Duration.minutes(5))
|
|
99
|
-
))
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
Java
|
|
103
|
-
|
|
104
|
-
```java
|
|
105
|
-
import software.constructs.Construct;
|
|
106
|
-
|
|
107
|
-
import software.amazon.awscdk.Stack;
|
|
108
|
-
import software.amazon.awscdk.StackProps;
|
|
109
|
-
import software.amazon.awscdk.Duration;
|
|
110
|
-
import software.amazon.awscdk.services.events.*;
|
|
111
|
-
import software.amazon.awscdk.services.lambda.*;
|
|
112
|
-
import software.amazon.awscdk.services.lambda.Runtime;
|
|
113
|
-
import software.amazon.awsconstructs.services.eventbridgelambda.*;
|
|
114
|
-
|
|
115
|
-
new EventbridgeToLambda(this, "test-eventbridge-lambda",
|
|
116
|
-
new EventbridgeToLambdaProps.Builder()
|
|
117
|
-
.lambdaFunctionProps(new FunctionProps.Builder()
|
|
118
|
-
.runtime(Runtime.NODEJS_20_X)
|
|
119
|
-
.code(Code.fromAsset("lambda"))
|
|
120
|
-
.handler("index.handler")
|
|
121
|
-
.build())
|
|
122
|
-
.eventRuleProps(new RuleProps.Builder()
|
|
123
|
-
.schedule(Schedule.rate(Duration.minutes(5)))
|
|
124
|
-
.build())
|
|
125
|
-
.build());
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
## Pattern Construct Props
|
|
129
|
-
|
|
130
|
-
| **Name** | **Type** | **Description** |
|
|
131
|
-
|:-------------|:----------------|-----------------|
|
|
132
|
-
|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.|
|
|
133
|
-
|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.|
|
|
134
|
-
|existingEventBusInterface?|[`events.IEventBus`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.IEventBus.html)| Optional user-provided custom EventBus for construct to use. Providing both this and `eventBusProps` results an error.|
|
|
135
|
-
|eventBusProps?|[`events.EventBusProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.EventBusProps.html)|Optional user-provided properties to override the default properties when creating a custom EventBus. Setting this value to `{}` will create a custom EventBus using all default properties. If neither this nor `existingEventBusInterface` is provided the construct will use the `default` EventBus. Providing both this and `existingEventBusInterface` results an error.|
|
|
136
|
-
|eventRuleProps|[`events.RuleProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.RuleProps.html)|User provided eventRuleProps to override the defaults|
|
|
137
|
-
|
|
138
|
-
## Pattern Properties
|
|
139
|
-
|
|
140
|
-
| **Name** | **Type** | **Description** |
|
|
141
|
-
|:-------------|:----------------|-----------------|
|
|
142
|
-
|eventBus?|[`events.IEventBus`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.IEventBus.html)|Returns the instance of events.IEventBus used by the construct|
|
|
143
|
-
|eventsRule|[`events.Rule`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.Rule.html)|Returns an instance of events.Rule created by the construct|
|
|
144
|
-
|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|
|
|
145
|
-
|
|
146
|
-
## Default settings
|
|
147
|
-
|
|
148
|
-
Out of the box implementation of the Construct without any override will set the following defaults:
|
|
149
|
-
|
|
150
|
-
### Amazon EventBridge Rule
|
|
151
|
-
|
|
152
|
-
* Grant least privilege permissions to EventBridge rule to trigger the Lambda Function
|
|
153
|
-
|
|
154
|
-
### AWS Lambda Function
|
|
155
|
-
|
|
156
|
-
* Configure limited privilege access IAM role for Lambda function
|
|
157
|
-
* Enable reusing connections with Keep-Alive for NodeJs Lambda function
|
|
158
|
-
* Enable X-Ray Tracing
|
|
159
|
-
* Set Environment Variables
|
|
160
|
-
* AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
|
|
161
|
-
|
|
162
|
-
## Architecture
|
|
163
|
-
|
|
164
|
-

|
|
165
|
-
|
|
166
|
-
---
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
© Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
# aws-eventbridge-lambda 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_eventbridge_lambda`|
|
|
19
|
-
| Typescript|`@aws-solutions-constructs/aws-eventbridge-lambda`|
|
|
20
|
-
| Java|`software.amazon.awsconstructs.services.eventbridgelambda`|
|
|
21
|
-
|
|
22
|
-
## Overview
|
|
23
|
-
|
|
24
|
-
This AWS Solutions Construct implements an AWS EventBridge rule and an AWS Lambda function.
|
|
25
|
-
|
|
26
|
-
Here is a minimal deployable pattern definition:
|
|
27
|
-
|
|
28
|
-
Typescript
|
|
29
|
-
|
|
30
|
-
```python
|
|
31
|
-
import { Construct } from 'constructs';
|
|
32
|
-
import { Stack, StackProps, Duration } from 'aws-cdk-lib';
|
|
33
|
-
import { EventbridgeToLambdaProps, EventbridgeToLambda } from '@aws-solutions-constructs/aws-eventbridge-lambda';
|
|
34
|
-
import * as lambda from 'aws-cdk-lib/aws-lambda';
|
|
35
|
-
import * as events from 'aws-cdk-lib/aws-events';
|
|
36
|
-
|
|
37
|
-
const constructProps: EventbridgeToLambdaProps = {
|
|
38
|
-
lambdaFunctionProps: {
|
|
39
|
-
code: lambda.Code.fromAsset(`lambda`),
|
|
40
|
-
runtime: lambda.Runtime.NODEJS_20_X,
|
|
41
|
-
handler: 'index.handler'
|
|
42
|
-
},
|
|
43
|
-
eventRuleProps: {
|
|
44
|
-
schedule: events.Schedule.rate(Duration.minutes(5))
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
new EventbridgeToLambda(this, 'test-eventbridge-lambda', constructProps);
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Python
|
|
52
|
-
|
|
53
|
-
```python
|
|
54
|
-
from aws_solutions_constructs.aws_eventbridge_lambda import EventbridgeToLambda, EventbridgeToLambdaProps
|
|
55
|
-
from aws_cdk import (
|
|
56
|
-
aws_lambda as _lambda,
|
|
57
|
-
aws_events as events,
|
|
58
|
-
Duration,
|
|
59
|
-
Stack
|
|
60
|
-
)
|
|
61
|
-
from constructs import Construct
|
|
62
|
-
|
|
63
|
-
EventbridgeToLambda(self, 'test-eventbridge-lambda',
|
|
64
|
-
lambda_function_props=_lambda.FunctionProps(
|
|
65
|
-
code=_lambda.Code.from_asset('lambda'),
|
|
66
|
-
runtime=_lambda.Runtime.PYTHON_3_11,
|
|
67
|
-
handler='index.handler'
|
|
68
|
-
),
|
|
69
|
-
event_rule_props=events.RuleProps(
|
|
70
|
-
schedule=events.Schedule.rate(
|
|
71
|
-
Duration.minutes(5))
|
|
72
|
-
))
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
Java
|
|
76
|
-
|
|
77
|
-
```java
|
|
78
|
-
import software.constructs.Construct;
|
|
79
|
-
|
|
80
|
-
import software.amazon.awscdk.Stack;
|
|
81
|
-
import software.amazon.awscdk.StackProps;
|
|
82
|
-
import software.amazon.awscdk.Duration;
|
|
83
|
-
import software.amazon.awscdk.services.events.*;
|
|
84
|
-
import software.amazon.awscdk.services.lambda.*;
|
|
85
|
-
import software.amazon.awscdk.services.lambda.Runtime;
|
|
86
|
-
import software.amazon.awsconstructs.services.eventbridgelambda.*;
|
|
87
|
-
|
|
88
|
-
new EventbridgeToLambda(this, "test-eventbridge-lambda",
|
|
89
|
-
new EventbridgeToLambdaProps.Builder()
|
|
90
|
-
.lambdaFunctionProps(new FunctionProps.Builder()
|
|
91
|
-
.runtime(Runtime.NODEJS_20_X)
|
|
92
|
-
.code(Code.fromAsset("lambda"))
|
|
93
|
-
.handler("index.handler")
|
|
94
|
-
.build())
|
|
95
|
-
.eventRuleProps(new RuleProps.Builder()
|
|
96
|
-
.schedule(Schedule.rate(Duration.minutes(5)))
|
|
97
|
-
.build())
|
|
98
|
-
.build());
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
## Pattern Construct Props
|
|
102
|
-
|
|
103
|
-
| **Name** | **Type** | **Description** |
|
|
104
|
-
|:-------------|:----------------|-----------------|
|
|
105
|
-
|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.|
|
|
106
|
-
|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.|
|
|
107
|
-
|existingEventBusInterface?|[`events.IEventBus`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.IEventBus.html)| Optional user-provided custom EventBus for construct to use. Providing both this and `eventBusProps` results an error.|
|
|
108
|
-
|eventBusProps?|[`events.EventBusProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.EventBusProps.html)|Optional user-provided properties to override the default properties when creating a custom EventBus. Setting this value to `{}` will create a custom EventBus using all default properties. If neither this nor `existingEventBusInterface` is provided the construct will use the `default` EventBus. Providing both this and `existingEventBusInterface` results an error.|
|
|
109
|
-
|eventRuleProps|[`events.RuleProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.RuleProps.html)|User provided eventRuleProps to override the defaults|
|
|
110
|
-
|
|
111
|
-
## Pattern Properties
|
|
112
|
-
|
|
113
|
-
| **Name** | **Type** | **Description** |
|
|
114
|
-
|:-------------|:----------------|-----------------|
|
|
115
|
-
|eventBus?|[`events.IEventBus`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.IEventBus.html)|Returns the instance of events.IEventBus used by the construct|
|
|
116
|
-
|eventsRule|[`events.Rule`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.Rule.html)|Returns an instance of events.Rule created by the construct|
|
|
117
|
-
|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|
|
|
118
|
-
|
|
119
|
-
## Default settings
|
|
120
|
-
|
|
121
|
-
Out of the box implementation of the Construct without any override will set the following defaults:
|
|
122
|
-
|
|
123
|
-
### Amazon EventBridge Rule
|
|
124
|
-
|
|
125
|
-
* Grant least privilege permissions to EventBridge rule to trigger the Lambda Function
|
|
126
|
-
|
|
127
|
-
### AWS Lambda Function
|
|
128
|
-
|
|
129
|
-
* Configure limited privilege access IAM role for Lambda function
|
|
130
|
-
* Enable reusing connections with Keep-Alive for NodeJs Lambda function
|
|
131
|
-
* Enable X-Ray Tracing
|
|
132
|
-
* Set Environment Variables
|
|
133
|
-
* AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
|
|
134
|
-
|
|
135
|
-
## Architecture
|
|
136
|
-
|
|
137
|
-

|
|
138
|
-
|
|
139
|
-
---
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
© Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
Binary file
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: aws-solutions-constructs.aws-eventbridge-lambda
|
|
3
|
-
Version: 2.85.1
|
|
4
|
-
Summary: CDK Constructs for deploying AWS Events Rule that inveokes AWS Lambda
|
|
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.1
|
|
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-eventbridge-lambda 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_eventbridge_lambda`|
|
|
46
|
-
| Typescript|`@aws-solutions-constructs/aws-eventbridge-lambda`|
|
|
47
|
-
| Java|`software.amazon.awsconstructs.services.eventbridgelambda`|
|
|
48
|
-
|
|
49
|
-
## Overview
|
|
50
|
-
|
|
51
|
-
This AWS Solutions Construct implements an AWS EventBridge rule and an AWS Lambda function.
|
|
52
|
-
|
|
53
|
-
Here is a minimal deployable pattern definition:
|
|
54
|
-
|
|
55
|
-
Typescript
|
|
56
|
-
|
|
57
|
-
```python
|
|
58
|
-
import { Construct } from 'constructs';
|
|
59
|
-
import { Stack, StackProps, Duration } from 'aws-cdk-lib';
|
|
60
|
-
import { EventbridgeToLambdaProps, EventbridgeToLambda } from '@aws-solutions-constructs/aws-eventbridge-lambda';
|
|
61
|
-
import * as lambda from 'aws-cdk-lib/aws-lambda';
|
|
62
|
-
import * as events from 'aws-cdk-lib/aws-events';
|
|
63
|
-
|
|
64
|
-
const constructProps: EventbridgeToLambdaProps = {
|
|
65
|
-
lambdaFunctionProps: {
|
|
66
|
-
code: lambda.Code.fromAsset(`lambda`),
|
|
67
|
-
runtime: lambda.Runtime.NODEJS_20_X,
|
|
68
|
-
handler: 'index.handler'
|
|
69
|
-
},
|
|
70
|
-
eventRuleProps: {
|
|
71
|
-
schedule: events.Schedule.rate(Duration.minutes(5))
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
new EventbridgeToLambda(this, 'test-eventbridge-lambda', constructProps);
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
Python
|
|
79
|
-
|
|
80
|
-
```python
|
|
81
|
-
from aws_solutions_constructs.aws_eventbridge_lambda import EventbridgeToLambda, EventbridgeToLambdaProps
|
|
82
|
-
from aws_cdk import (
|
|
83
|
-
aws_lambda as _lambda,
|
|
84
|
-
aws_events as events,
|
|
85
|
-
Duration,
|
|
86
|
-
Stack
|
|
87
|
-
)
|
|
88
|
-
from constructs import Construct
|
|
89
|
-
|
|
90
|
-
EventbridgeToLambda(self, 'test-eventbridge-lambda',
|
|
91
|
-
lambda_function_props=_lambda.FunctionProps(
|
|
92
|
-
code=_lambda.Code.from_asset('lambda'),
|
|
93
|
-
runtime=_lambda.Runtime.PYTHON_3_11,
|
|
94
|
-
handler='index.handler'
|
|
95
|
-
),
|
|
96
|
-
event_rule_props=events.RuleProps(
|
|
97
|
-
schedule=events.Schedule.rate(
|
|
98
|
-
Duration.minutes(5))
|
|
99
|
-
))
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
Java
|
|
103
|
-
|
|
104
|
-
```java
|
|
105
|
-
import software.constructs.Construct;
|
|
106
|
-
|
|
107
|
-
import software.amazon.awscdk.Stack;
|
|
108
|
-
import software.amazon.awscdk.StackProps;
|
|
109
|
-
import software.amazon.awscdk.Duration;
|
|
110
|
-
import software.amazon.awscdk.services.events.*;
|
|
111
|
-
import software.amazon.awscdk.services.lambda.*;
|
|
112
|
-
import software.amazon.awscdk.services.lambda.Runtime;
|
|
113
|
-
import software.amazon.awsconstructs.services.eventbridgelambda.*;
|
|
114
|
-
|
|
115
|
-
new EventbridgeToLambda(this, "test-eventbridge-lambda",
|
|
116
|
-
new EventbridgeToLambdaProps.Builder()
|
|
117
|
-
.lambdaFunctionProps(new FunctionProps.Builder()
|
|
118
|
-
.runtime(Runtime.NODEJS_20_X)
|
|
119
|
-
.code(Code.fromAsset("lambda"))
|
|
120
|
-
.handler("index.handler")
|
|
121
|
-
.build())
|
|
122
|
-
.eventRuleProps(new RuleProps.Builder()
|
|
123
|
-
.schedule(Schedule.rate(Duration.minutes(5)))
|
|
124
|
-
.build())
|
|
125
|
-
.build());
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
## Pattern Construct Props
|
|
129
|
-
|
|
130
|
-
| **Name** | **Type** | **Description** |
|
|
131
|
-
|:-------------|:----------------|-----------------|
|
|
132
|
-
|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.|
|
|
133
|
-
|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.|
|
|
134
|
-
|existingEventBusInterface?|[`events.IEventBus`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.IEventBus.html)| Optional user-provided custom EventBus for construct to use. Providing both this and `eventBusProps` results an error.|
|
|
135
|
-
|eventBusProps?|[`events.EventBusProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.EventBusProps.html)|Optional user-provided properties to override the default properties when creating a custom EventBus. Setting this value to `{}` will create a custom EventBus using all default properties. If neither this nor `existingEventBusInterface` is provided the construct will use the `default` EventBus. Providing both this and `existingEventBusInterface` results an error.|
|
|
136
|
-
|eventRuleProps|[`events.RuleProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.RuleProps.html)|User provided eventRuleProps to override the defaults|
|
|
137
|
-
|
|
138
|
-
## Pattern Properties
|
|
139
|
-
|
|
140
|
-
| **Name** | **Type** | **Description** |
|
|
141
|
-
|:-------------|:----------------|-----------------|
|
|
142
|
-
|eventBus?|[`events.IEventBus`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.IEventBus.html)|Returns the instance of events.IEventBus used by the construct|
|
|
143
|
-
|eventsRule|[`events.Rule`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.Rule.html)|Returns an instance of events.Rule created by the construct|
|
|
144
|
-
|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|
|
|
145
|
-
|
|
146
|
-
## Default settings
|
|
147
|
-
|
|
148
|
-
Out of the box implementation of the Construct without any override will set the following defaults:
|
|
149
|
-
|
|
150
|
-
### Amazon EventBridge Rule
|
|
151
|
-
|
|
152
|
-
* Grant least privilege permissions to EventBridge rule to trigger the Lambda Function
|
|
153
|
-
|
|
154
|
-
### AWS Lambda Function
|
|
155
|
-
|
|
156
|
-
* Configure limited privilege access IAM role for Lambda function
|
|
157
|
-
* Enable reusing connections with Keep-Alive for NodeJs Lambda function
|
|
158
|
-
* Enable X-Ray Tracing
|
|
159
|
-
* Set Environment Variables
|
|
160
|
-
* AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
|
|
161
|
-
|
|
162
|
-
## Architecture
|
|
163
|
-
|
|
164
|
-

|
|
165
|
-
|
|
166
|
-
---
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
© 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
|