This repository has been archived by the owner on Sep 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Hu Jin
committed
Oct 14, 2022
1 parent
6aa209c
commit a70cfee
Showing
43 changed files
with
469 additions
and
279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7828,9 +7828,27 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
|
||
----- | ||
|
||
The following software may be included in this product: d3-color, d3-interpolate, d3-time. A copy of the source code may be downloaded from https://github.com/d3/d3-color.git (d3-color), https://github.com/d3/d3-interpolate.git (d3-interpolate), https://github.com/d3/d3-time.git (d3-time). This software contains the following license and notice below: | ||
The following software may be included in this product: d3-color. A copy of the source code may be downloaded from https://github.com/d3/d3-color.git. This software contains the following license and notice below: | ||
|
||
Copyright 2010-2016 Mike Bostock | ||
Copyright 2010-2022 Mike Bostock | ||
|
||
Permission to use, copy, modify, and/or distribute this software for any purpose | ||
with or without fee is hereby granted, provided that the above copyright notice | ||
and this permission notice appear in all copies. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND | ||
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS | ||
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER | ||
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF | ||
THIS SOFTWARE. | ||
|
||
----- | ||
|
||
The following software may be included in this product: d3-format, d3-scale, d3-shape. A copy of the source code may be downloaded from https://github.com/d3/d3-format.git (d3-format), https://github.com/d3/d3-scale.git (d3-scale), https://github.com/d3/d3-shape.git (d3-shape). This software contains the following license and notice below: | ||
|
||
Copyright 2010-2015 Mike Bostock | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without modification, | ||
|
@@ -7860,9 +7878,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
|
||
----- | ||
|
||
The following software may be included in this product: d3-format, d3-scale, d3-shape. A copy of the source code may be downloaded from https://github.com/d3/d3-format.git (d3-format), https://github.com/d3/d3-scale.git (d3-scale), https://github.com/d3/d3-shape.git (d3-shape). This software contains the following license and notice below: | ||
The following software may be included in this product: d3-interpolate, d3-time. A copy of the source code may be downloaded from https://github.com/d3/d3-interpolate.git (d3-interpolate), https://github.com/d3/d3-time.git (d3-time). This software contains the following license and notice below: | ||
|
||
Copyright 2010-2015 Mike Bostock | ||
Copyright 2010-2016 Mike Bostock | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without modification, | ||
|
@@ -11314,6 +11332,32 @@ THE SOFTWARE. | |
|
||
----- | ||
|
||
The following software may be included in this product: parse-path, parse-url, protocols. A copy of the source code may be downloaded from git+https://github.com/IonicaBizau/parse-path.git (parse-path), git+https://github.com/IonicaBizau/parse-url.git (parse-url), [email protected]:IonicaBizau/protocols.git (protocols). This software contains the following license and notice below: | ||
|
||
The MIT License (MIT) | ||
|
||
Copyright (c) 2015-22 Ionică Bizău <[email protected]> (https://ionicabizau.net) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
||
----- | ||
|
||
The following software may be included in this product: parse5. A copy of the source code may be downloaded from git://github.com/inikulin/parse5.git. This software contains the following license and notice below: | ||
|
||
Copyright (c) 2013-2019 Ivan Nikulin ([email protected], https://github.com/inikulin) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
source/packages/@ada/infra/src/common/constructs/lambda/lambda-event-target.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/*! Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
SPDX-License-Identifier: Apache-2.0 */ | ||
|
||
import * as events from 'aws-cdk-lib/aws-events'; | ||
import * as lambda from 'aws-cdk-lib/aws-lambda'; | ||
import { TargetBaseProps, bindBaseTargetConfig } from 'aws-cdk-lib/aws-events-targets'; | ||
|
||
/** | ||
* Customize the Lambda Event Target | ||
*/ | ||
interface LambdaFunctionProps extends TargetBaseProps { | ||
/** | ||
* The event to send to the Lambda | ||
* | ||
* This will be the payload sent to the Lambda Function. | ||
* | ||
* @default the entire EventBridge event | ||
*/ | ||
readonly event?: events.RuleTargetInput; | ||
} | ||
|
||
/** | ||
* Use an AWS Lambda function as an event rule target. | ||
* Modification of LambdaFunction from 'aws-events-targets' to not add a permission on | ||
* the target lambda function for every Data Product created, in order to not overload | ||
* the lambda policy size limit of the target Lambda Function. | ||
*/ | ||
export class EventLambdaTargetFunction implements events.IRuleTarget { | ||
// eslint-disable-next-line no-empty-function | ||
constructor(private readonly handler: lambda.IFunction, private readonly props: LambdaFunctionProps = {}) { | ||
} | ||
|
||
/** | ||
* Returns a RuleTarget that can be used to trigger this Lambda as a | ||
* result from an EventBridge event. | ||
*/ | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
public bind(rule: events.IRule, _id?: string): events.RuleTargetConfig { | ||
return { | ||
...bindBaseTargetConfig(this.props), | ||
arn: this.handler.functionArn, | ||
input: this.props.event, | ||
targetResource: this.handler, | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.