Skip to content
This repository was archived by the owner on Sep 25, 2024. It is now read-only.

Commit a70cfee

Browse files
committed
release version 1.0.2
1 parent 6aa209c commit a70cfee

File tree

43 files changed

+469
-279
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+469
-279
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616
### Added
1717

1818
- Allow s3 domain name without region in the Content Security Policy for pre-signed url
19+
20+
## [1.0.2] - 2022-10-05
21+
22+
### Changed
23+
- Upgrade `aws-cdk-lib` and `@aws-cdk/aws-lambda-python-alpha` to 2.41.0 to fix python bundling issue
24+
- Remove IAM role self-assuming code due to IAM service behavior change ([Issue 11](https://github.com/aws-solutions/automated-data-analytics-on-aws/issues/11))
25+
- Fix Lambda policy size limit growing when creating data products
26+
- Fix custom transform validation issue
27+
- Fix security vulnerabilities found by yarn audit and Dependabot
28+
- Misc documentation fixes
29+

THIRDPARTY_LICENSES.txt

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7828,9 +7828,27 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
78287828

78297829
-----
78307830

7831-
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:
7831+
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:
78327832

7833-
Copyright 2010-2016 Mike Bostock
7833+
Copyright 2010-2022 Mike Bostock
7834+
7835+
Permission to use, copy, modify, and/or distribute this software for any purpose
7836+
with or without fee is hereby granted, provided that the above copyright notice
7837+
and this permission notice appear in all copies.
7838+
7839+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
7840+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
7841+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
7842+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
7843+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
7844+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
7845+
THIS SOFTWARE.
7846+
7847+
-----
7848+
7849+
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:
7850+
7851+
Copyright 2010-2015 Mike Bostock
78347852
All rights reserved.
78357853

78367854
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.
78607878

78617879
-----
78627880

7863-
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:
7881+
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:
78647882

7865-
Copyright 2010-2015 Mike Bostock
7883+
Copyright 2010-2016 Mike Bostock
78667884
All rights reserved.
78677885

78687886
Redistribution and use in source and binary forms, with or without modification,
@@ -11314,6 +11332,32 @@ THE SOFTWARE.
1131411332

1131511333
-----
1131611334

11335+
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), git@github.com:IonicaBizau/protocols.git (protocols). This software contains the following license and notice below:
11336+
11337+
The MIT License (MIT)
11338+
11339+
Copyright (c) 2015-22 Ionică Bizău <bizauionica@gmail.com> (https://ionicabizau.net)
11340+
11341+
Permission is hereby granted, free of charge, to any person obtaining a copy
11342+
of this software and associated documentation files (the "Software"), to deal
11343+
in the Software without restriction, including without limitation the rights
11344+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11345+
copies of the Software, and to permit persons to whom the Software is
11346+
furnished to do so, subject to the following conditions:
11347+
11348+
The above copyright notice and this permission notice shall be included in all
11349+
copies or substantial portions of the Software.
11350+
11351+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11352+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
11353+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
11354+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
11355+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
11356+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
11357+
SOFTWARE.
11358+
11359+
-----
11360+
1131711361
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:
1131811362

1131911363
Copyright (c) 2013-2019 Ivan Nikulin (ifaaan@gmail.com, https://github.com/inikulin)

source/package.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
"name": "ada",
33
"title": "Automated Data Analytics on AWS",
44
"description": "Automated Data Analytics on AWS simplifies the management and analysis of data, providing an end-to-end platform used for ingesting, transforming, governing, and querying datasets through a standalone user interface",
5-
"version": "1.0.1",
5+
"version": "1.0.2",
66
"author": "Amazon Web Services",
77
"awsSolutionId": "SO0190",
8-
"awsSolutionVersion": "v1.0.1",
8+
"awsSolutionVersion": "v1.0.2",
99
"private": true,
1010
"license": "Apache-2.0",
1111
"engines": {
@@ -48,15 +48,15 @@
4848
"*.{ts,tsx}": "eslint --cache --fix --quiet"
4949
},
5050
"dependencies": {
51-
"aws-cdk-lib": "^2.33.0",
51+
"aws-cdk-lib": "^2.41.0",
5252
"constructs": "^10.1.54",
5353
"@aws-cdk/aws-apigatewayv2-alpha": "^2.33.0-alpha.0",
5454
"@aws-cdk/aws-apigatewayv2-authorizers-alpha": "^2.33.0-alpha.0",
5555
"@aws-cdk/aws-apigatewayv2-integrations-alpha": "^2.33.0-alpha.0",
5656
"@aws-cdk/aws-glue-alpha": "^2.33.0-alpha.0",
5757
"@aws-cdk/aws-kinesisfirehose-alpha": "^2.33.0-alpha.0",
5858
"@aws-cdk/aws-kinesisfirehose-destinations-alpha": "^2.33.0-alpha.0",
59-
"@aws-cdk/aws-lambda-python-alpha": "^2.33.0-alpha.0",
59+
"@aws-cdk/aws-lambda-python-alpha": "^2.41.0-alpha.0",
6060
"find-up": "^6.0.0",
6161
"json5": "^2.2.0",
6262
"lodash": "^4.17.21",
@@ -84,7 +84,7 @@
8484
"@typescript-eslint/eslint-plugin": "^4.31.0",
8585
"@typescript-eslint/parser": "^4.31.0",
8686
"@aws-cdk/cloudformation-diff": "^2.33.0",
87-
"aws-cdk": "^2.33.0",
87+
"aws-cdk": "^2.41.0",
8888
"aws-sdk": "^2.1181.0",
8989
"babel-eslint": "^10.0.3",
9090
"copyfiles": "^2.4.1",
@@ -135,21 +135,23 @@
135135
"resolutions": {
136136
"**/prismjs": ">=1.27.0",
137137
"**/minimist": ">=1.2.6",
138-
"vm2": "^3.9.6",
138+
"vm2": "^3.9.11",
139139
"**/react-table": "^7.7.0",
140140
"**/@types/react-table": "^7.7.8",
141141
"lerna/**/trim-newlines": "^3.0.1",
142142
"lerna/**/normalize-url": "^4.5.1",
143143
"lerna/**/tar": "^6.1.9",
144144
"lerna/**/json-schema": "^0.4.0",
145+
"lerna/**/parse-url": "^8.1.0",
145146
"**/ansi-regex": "^5.0.1",
146147
"@pact-foundation/**/tar": "^6.1.9",
147148
"**/dynamodb-local/**/tar": "^4.4.18",
148149
"**/react-scripts/**/browserslist": "^4.16.5",
149150
"**/react-scripts/**/glob-parent": "^5.1.2",
150151
"**/node-fetch": "^2.6.7",
151152
"**/follow-redirects": "^1.14.8",
152-
"**/nth-check": "^2.0.1"
153+
"**/nth-check": "^2.0.1",
154+
"d3-color":"^3.1.0"
153155
},
154156
"workspaces": {
155157
"packages": [

source/packages/@ada/api/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
"@types/node": "*",
2929
"@types/node-fetch": "^2.5.7",
3030
"@types/pluralize": "^0.0.29",
31-
"aws-cdk": "^2.33.0",
32-
"aws-cdk-lib": "^2.33.0",
31+
"aws-cdk": "^2.41.0",
32+
"aws-cdk-lib": "^2.41.0",
3333
"constructs": "^10.1.54",
3434
"btoa": "^1.2.1",
3535
"es6-promise": "^4.2.4",

source/packages/@ada/api/spec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ info:
44
of data, providing an end-to-end platform used for ingesting, transforming, governing,
55
and querying datasets through a standalone user interface
66
title: Automated Data Analytics on AWS API
7-
version: 1.0.1
7+
version: 1.0.2
88
servers:
99
- url: https://{apigId}.execute-api.{region}.amazonaws.com/{stage}
1010
variables:

source/packages/@ada/cdk-core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
},
1515
"dependencies": {
1616
"@ada/common": "*",
17-
"aws-cdk-lib": "^2.33.0",
17+
"aws-cdk-lib": "^2.41.0",
1818
"constructs": "^10.1.54",
1919
"truncate-middle": "^1.0.6"
2020
},
2121
"devDependencies": {
2222
"@types/truncate-middle": "^1.0.1",
23-
"aws-cdk": "^2.33.0",
23+
"aws-cdk": "^2.41.0",
2424
"aws-sdk": "^2.1181.0",
2525
"cross-env": "^7.0.2",
2626
"module-alias": "^2.2.2",

source/packages/@ada/infra/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"@ada/transforms": "*",
7272
"@aws-sdk/util-arn-parser": "^3.55.0",
7373
"await-spawn": "^4.0.2",
74-
"aws-cdk-lib": "^2.33.0",
74+
"aws-cdk-lib": "^2.41.0",
7575
"aws-lambda-router": "0.11.0",
7676
"aws-xray-sdk": "^3.3.6",
7777
"aws4": "1.11.0",
@@ -107,7 +107,7 @@
107107
"@types/string-hash": "^1.1.1",
108108
"@types/uglify-js": "^3.13.1",
109109
"@types/verror": "^1.10.5",
110-
"aws-cdk": "^2.33.0",
110+
"aws-cdk": "^2.41.0",
111111
"aws-sdk": "^2.1181.0",
112112
"cdk-assets": "^2.33.0",
113113
"cross-env": "^7.0.2",

source/packages/@ada/infra/src/common/constructs/api/federated-api/base.ts

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
/*! Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
SPDX-License-Identifier: Apache-2.0 */
3+
import * as iam from 'aws-cdk-lib/aws-iam'
34
import { ApiDeployStack } from './deployment';
45
import { ApiError } from '../common';
5-
import { Aspects, Duration } from 'aws-cdk-lib';
6+
import { Aspects, Duration, RemovalPolicy } from 'aws-cdk-lib';
67
import {
78
AuthorizationType,
9+
CfnAccount,
10+
CfnRestApi,
811
Cors,
912
RequestAuthorizer,
1013
Resource,
1114
ResourceOptions,
1215
ResponseType,
1316
RestApi,
14-
RestApiProps,
17+
RestApiProps
1518
} from 'aws-cdk-lib/aws-apigateway';
1619
import { Bucket } from '../../../constructs/s3/bucket';
1720
import { Construct } from 'constructs';
@@ -115,8 +118,12 @@ export class BaseRestApi extends RestApi implements IDecoratedRestApi {
115118
// https://docs.aws.amazon.com/cdk/api/latest/docs/aws-apigateway-readme.html#breaking-up-methods-and-resources-across-stacks
116119
deploy: false,
117120
deployOptions: undefined,
121+
cloudWatchRole: false
118122
});
119123

124+
// configure destroyable CfnAccount and APIGateway CloudWatchRole
125+
this.configureCloudWatchRole((this.node.defaultChild) as CfnRestApi)
126+
120127
const rootStack = getRootStack(this);
121128

122129
// create api reference at root stack level to decouople services and deployment
@@ -181,6 +188,20 @@ export class BaseRestApi extends RestApi implements IDecoratedRestApi {
181188
return this.decoratedRoot.addResource(pathPart, options);
182189
}
183190

191+
protected configureCloudWatchRole(apiResource: CfnRestApi): void {
192+
const role = new iam.Role(this, 'CloudWatchRole', {
193+
assumedBy: new iam.ServicePrincipal('apigateway.amazonaws.com'),
194+
managedPolicies: [iam.ManagedPolicy.fromAwsManagedPolicyName('service-role/AmazonAPIGatewayPushToCloudWatchLogs')],
195+
});
196+
role.applyRemovalPolicy(RemovalPolicy.DESTROY);
197+
198+
this.cloudWatchAccount = new CfnAccount(this, 'Account', {
199+
cloudWatchRoleArn: role.roleArn,
200+
});
201+
this.cloudWatchAccount.applyRemovalPolicy(RemovalPolicy.DESTROY);
202+
this.cloudWatchAccount.node.addDependency(apiResource);
203+
}
204+
184205
protected decorateResource(resource: Resource): IDecoratedResource {
185206
return DecoratedResource(this, resource);
186207
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*! Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
SPDX-License-Identifier: Apache-2.0 */
3+
4+
import * as events from 'aws-cdk-lib/aws-events';
5+
import * as lambda from 'aws-cdk-lib/aws-lambda';
6+
import { TargetBaseProps, bindBaseTargetConfig } from 'aws-cdk-lib/aws-events-targets';
7+
8+
/**
9+
* Customize the Lambda Event Target
10+
*/
11+
interface LambdaFunctionProps extends TargetBaseProps {
12+
/**
13+
* The event to send to the Lambda
14+
*
15+
* This will be the payload sent to the Lambda Function.
16+
*
17+
* @default the entire EventBridge event
18+
*/
19+
readonly event?: events.RuleTargetInput;
20+
}
21+
22+
/**
23+
* Use an AWS Lambda function as an event rule target.
24+
* Modification of LambdaFunction from 'aws-events-targets' to not add a permission on
25+
* the target lambda function for every Data Product created, in order to not overload
26+
* the lambda policy size limit of the target Lambda Function.
27+
*/
28+
export class EventLambdaTargetFunction implements events.IRuleTarget {
29+
// eslint-disable-next-line no-empty-function
30+
constructor(private readonly handler: lambda.IFunction, private readonly props: LambdaFunctionProps = {}) {
31+
}
32+
33+
/**
34+
* Returns a RuleTarget that can be used to trigger this Lambda as a
35+
* result from an EventBridge event.
36+
*/
37+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
38+
public bind(rule: events.IRule, _id?: string): events.RuleTargetConfig {
39+
return {
40+
...bindBaseTargetConfig(this.props),
41+
arn: this.handler.functionArn,
42+
input: this.props.event,
43+
targetResource: this.handler,
44+
};
45+
}
46+
}

source/packages/@ada/infra/src/nested-stacks/__snapshots__/cognito-auth-stack.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`stack snapshots 1`] = `
44
Object {
5-
"Description": "(SO0190-CognitoAuth) - Automated Data Analytics on AWS. Version v1.0.1",
5+
"Description": "(SO0190-CognitoAuth) - Automated Data Analytics on AWS. Version v1.0.2",
66
"Outputs": Object {
77
"AdaCognitoAuthUserPoolBD7CD0F7Arn": Object {
88
"Value": Object {

0 commit comments

Comments
 (0)