Skip to content

Commit 0bda975

Browse files
authored
Merge pull request #358 from awslabs/bump/1.119.0
chore(release): 1.119.0
2 parents 81a102a + d03975e commit 0bda975

16 files changed

+1824
-5
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [1.119.0](https://github.com/awslabs/aws-solutions-constructs/compare/v1.118.0...v1.119.0) (2021-09-02)
6+
7+
### Changed
8+
9+
* Upgraded all patterns to CDK v1.119.0
10+
11+
### Features
12+
13+
* Added custom event bus support to aws-eventbridge-lambda [354](https://github.com/awslabs/aws-solutions-constructs/pull/354)
14+
15+
* **aws-eventbridge-lambda:** Support for custom EventBus ([#354](https://github.com/awslabs/aws-solutions-constructs/issues/354)) ([fd750a5](https://github.com/awslabs/aws-solutions-constructs/commit/fd750a5fc02f23728214bba5ca2909c99cc6adb4))
16+
517
## [1.118.0](https://github.com/awslabs/aws-solutions-constructs/compare/v1.117.0...v1.118.0) (2021-09-02)
618

719
### Changed
@@ -13,6 +25,8 @@ All notable changes to this project will be documented in this file. See [standa
1325
* Provide better error message when Queue and DLQ fifo settings don't match [#343](https://github.com/awslabs/aws-solutions-constructs/pull/343)
1426
* Convert SQS fifo: false to fifo: undefined automatically [#346](https://github.com/awslabs/aws-solutions-constructs/pull/346)
1527
* Added read and delete request template props to aws-apigateway-dynamodb [#347](https://github.com/awslabs/aws-solutions-constructs/pull/347)
28+
* Do not create cloudfront log bucket if logging is disabled on construct [#303](https://github.com/awslabs/aws-solutions-constructs/pull/303)
29+
* Add VPC support to aws-lambda-stepfunctions [#333](https://github.com/awslabs/aws-solutions-constructs/pull/333)
1630
* **cdk-v2:** Rearranging imports, removing deprecated APIs for CDK v2 release ([#350](https://github.com/awslabs/aws-solutions-constructs/issues/350)) ([0c8fba4](https://github.com/awslabs/aws-solutions-constructs/commit/0c8fba44001fedd549923ac16972b7779e1cdeaf))
1731

1832
## [1.117.0](https://github.com/awslabs/aws-solutions-constructs/compare/v1.116.0...v1.117.0) (2021-08-14)

source/lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
"./patterns/@aws-solutions-constructs/*"
77
],
88
"rejectCycles": "true",
9-
"version": "1.118.0"
9+
"version": "1.119.0"
1010
}

source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,15 @@ _Parameters_
6161
|:-------------|:----------------|-----------------|
6262
|existingLambdaObj?|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.Function.html)|Existing instance of Lambda Function object, providing both this and `lambdaFunctionProps` will cause an error.|
6363
|lambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.FunctionProps.html)|User provided props to override the default props for the Lambda function.|
64+
|existingEventBusInterface?|[`events.IEventBus`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-events.IEventBus.html)| Optional user-provided custom EventBus for construct to use. Providing both this and `eventBusProps` results an error.|
65+
|eventBusProps?|[`events.EventBusProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_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.|
6466
|eventRuleProps|[`events.RuleProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-events.RuleProps.html)|User provided eventRuleProps to override the defaults|
6567

6668
## Pattern Properties
6769

6870
| **Name** | **Type** | **Description** |
6971
|:-------------|:----------------|-----------------|
72+
|eventBus|[`events.IEventBus`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-events.IEventBus.html)|Returns the instance of events.IEventBus used by the construct|
7073
|eventsRule|[`events.Rule`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-events.Rule.html)|Returns an instance of events.Rule created by the construct|
7174
|lambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.Function.html)|Returns an instance of lambda.Function created by the construct|
7275

@@ -82,7 +85,7 @@ Out of the box implementation of the Construct without any override will set the
8285
* Enable reusing connections with Keep-Alive for NodeJs Lambda function
8386
* Enable X-Ray Tracing
8487
* Set Environment Variables
85-
* AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
88+
* AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
8689

8790
## Architecture
8891
![Architecture Diagram](architecture.png)

source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/lib/index.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,18 @@ export interface EventbridgeToLambdaProps {
3535
* @default - Default props are used
3636
*/
3737
readonly lambdaFunctionProps?: lambda.FunctionProps,
38+
/**
39+
* Existing instance of a custom EventBus.
40+
*
41+
* @default - None
42+
*/
43+
readonly existingEventBusInterface?: events.IEventBus,
44+
/**
45+
* A new custom EventBus is created with provided props.
46+
*
47+
* @default - None
48+
*/
49+
readonly eventBusProps?: events.EventBusProps,
3850
/**
3951
* User provided eventRuleProps to override the defaults
4052
*
@@ -45,6 +57,7 @@ export interface EventbridgeToLambdaProps {
4557

4658
export class EventbridgeToLambda extends Construct {
4759
public readonly lambdaFunction: lambda.Function;
60+
public readonly eventBus?: events.IEventBus;
4861
public readonly eventsRule: events.Rule;
4962

5063
/**
@@ -70,7 +83,13 @@ export class EventbridgeToLambda extends Construct {
7083
})
7184
};
7285

73-
const defaultEventsRuleProps = defaults.DefaultEventsRuleProps([lambdaFunc]);
86+
// build an event bus if existingEventBus is provided or eventBusProps are provided
87+
this.eventBus = defaults.buildEventBus(this, {
88+
existingEventBusInterface: props.existingEventBusInterface,
89+
eventBusProps: props.eventBusProps
90+
});
91+
92+
const defaultEventsRuleProps = defaults.DefaultEventsRuleProps([lambdaFunc], this.eventBus);
7493
const eventsRuleProps = overrideProps(defaultEventsRuleProps, props.eventRuleProps, true);
7594

7695
this.eventsRule = new events.Rule(this, 'EventsRule', eventsRuleProps);

0 commit comments

Comments
 (0)