Skip to content

Commit 2740df7

Browse files
committed
Update to version v1.61.0
1 parent d7e39df commit 2740df7

File tree

139 files changed

+3581
-634
lines changed

Some content is hidden

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

139 files changed

+3581
-634
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [1.61.0] - 2020-08-27
8+
9+
### Changed
10+
- Upgraded all patterns to CDK v1.61.0
11+
- [All *-lambda-* and *-apigateway-* patterns] Enable X-Ray tracing ([#36](https://github.com/awslabs/aws-solutions-constructs/issues/36))
12+
713
## [1.60.0] - 2020-08-24
814

915
### Changed

source/lerna.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
"./patterns/@aws-solutions-constructs/*"
77
],
88
"rejectCycles": "true",
9-
"version": "1.60.0"
9+
"version": "1.61.0"
1010
}

source/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aws-solutions-constructs",
3-
"version": "1.60.0",
3+
"version": "1.61.0",
44
"description": "AWS Solutions Constructs Library",
55
"repository": {
66
"type": "git",
@@ -23,10 +23,10 @@
2323
"eslint-plugin-license-header": "^0.2.0",
2424
"fs-extra": "^8.1.0",
2525
"jest": "^24.9.0",
26-
"jsii": "^1.7.0",
27-
"jsii-pacmak": "^1.7.0",
26+
"jsii": "^1.11.0",
27+
"jsii-pacmak": "^1.11.0",
2828
"tslint": "^5.20.1",
29-
"typescript": "~3.9.5"
29+
"typescript": "~3.9.7"
3030
},
3131
"devDependencies": {
3232
"lerna": "^3.22.1"

source/patterns/@aws-solutions-constructs/aws-apigateway-dynamodb/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ Out of the box implementation of the Construct without any override will set the
8181
* Enable CloudWatch logging for API Gateway
8282
* Configure least privilege access IAM role for API Gateway
8383
* Set the default authorizationType for all API methods to IAM
84+
* Enable X-Ray Tracing
8485

8586
### Amazon DynamoDB Table
8687
* Set the billing mode for DynamoDB Table to On-Demand (Pay per request)

source/patterns/@aws-solutions-constructs/aws-apigateway-dynamodb/package.json

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aws-solutions-constructs/aws-apigateway-dynamodb",
3-
"version": "1.60.0",
3+
"version": "1.61.0",
44
"description": "CDK Constructs for AWS API Gateway and Amazon DynamoDB integration.",
55
"main": "lib/index.js",
66
"types": "lib/index.d.ts",
@@ -53,16 +53,16 @@
5353
}
5454
},
5555
"dependencies": {
56-
"@aws-cdk/core": "~1.60.0",
57-
"@aws-cdk/aws-apigateway": "~1.60.0",
58-
"@aws-cdk/aws-iam": "~1.60.0",
59-
"@aws-cdk/aws-dynamodb": "~1.60.0",
60-
"@aws-cdk/aws-logs": "~1.60.0",
61-
"@aws-solutions-constructs/core": "~1.60.0",
62-
"constructs": "^3.0.2"
56+
"@aws-cdk/core": "~1.61.0",
57+
"@aws-cdk/aws-apigateway": "~1.61.0",
58+
"@aws-cdk/aws-iam": "~1.61.0",
59+
"@aws-cdk/aws-dynamodb": "~1.61.0",
60+
"@aws-cdk/aws-logs": "~1.61.0",
61+
"@aws-solutions-constructs/core": "~1.61.0",
62+
"constructs": "^3.0.4"
6363
},
6464
"devDependencies": {
65-
"@aws-cdk/assert": "~1.60.0",
65+
"@aws-cdk/assert": "~1.61.0",
6666
"@types/jest": "^24.0.23",
6767
"@types/node": "^10.3.0"
6868
},
@@ -72,12 +72,12 @@
7272
]
7373
},
7474
"peerDependencies": {
75-
"@aws-cdk/core": "~1.60.0",
76-
"@aws-cdk/aws-apigateway": "~1.60.0",
77-
"@aws-cdk/aws-iam": "~1.60.0",
78-
"@aws-cdk/aws-dynamodb": "~1.60.0",
79-
"@aws-solutions-constructs/core": "~1.60.0",
80-
"constructs": "^3.0.2",
81-
"@aws-cdk/aws-logs": "~1.60.0"
75+
"@aws-cdk/core": "~1.61.0",
76+
"@aws-cdk/aws-apigateway": "~1.61.0",
77+
"@aws-cdk/aws-iam": "~1.61.0",
78+
"@aws-cdk/aws-dynamodb": "~1.61.0",
79+
"@aws-solutions-constructs/core": "~1.61.0",
80+
"constructs": "^3.0.4",
81+
"@aws-cdk/aws-logs": "~1.61.0"
8282
}
8383
}

source/patterns/@aws-solutions-constructs/aws-apigateway-dynamodb/test/__snapshots__/apigateway-dynamodb.test.js.snap

+1
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ Object {
191191
"Ref": "testapigatewaydynamodbdefaultRestApi9102FDF9",
192192
},
193193
"StageName": "prod",
194+
"TracingEnabled": true,
194195
},
195196
"Type": "AWS::ApiGateway::Stage",
196197
},

source/patterns/@aws-solutions-constructs/aws-apigateway-dynamodb/test/integ.apigateway-dynamodb-CRUD.expected.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@
9595
"ResourcePath": "/*"
9696
}
9797
],
98-
"StageName": "prod"
98+
"StageName": "prod",
99+
"TracingEnabled": true
99100
}
100101
},
101102
"testapigatewaydynamodbRestApiid78018D34": {

source/patterns/@aws-solutions-constructs/aws-apigateway-dynamodb/test/integ.no-arguments.expected.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@
9292
"ResourcePath": "/*"
9393
}
9494
],
95-
"StageName": "prod"
95+
"StageName": "prod",
96+
"TracingEnabled": true
9697
}
9798
},
9899
"testapigatewaydynamodbdefaultRestApiidFD6A9E91": {

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

+2
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,12 @@ Out of the box implementation of the Construct without any override will set the
7979
* Enable CloudWatch logging for API Gateway
8080
* Configure least privilege access IAM role for API Gateway
8181
* Set the default authorizationType for all API methods to IAM
82+
* Enable X-Ray Tracing
8283

8384
### AWS Lambda Function
8485
* Configure least privilege access IAM role for Lambda function
8586
* Enable reusing connections with Keep-Alive for NodeJs Lambda function
87+
* Enable X-Ray Tracing
8688

8789
## Architecture
8890
![Architecture Diagram](architecture.png)

source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/package.json

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aws-solutions-constructs/aws-apigateway-lambda",
3-
"version": "1.60.0",
3+
"version": "1.61.0",
44
"description": "CDK constructs for defining an interaction between an API Gateway and a Lambda function.",
55
"main": "lib/index.js",
66
"types": "lib/index.d.ts",
@@ -53,16 +53,16 @@
5353
}
5454
},
5555
"dependencies": {
56-
"@aws-cdk/aws-apigateway": "~1.60.0",
57-
"@aws-cdk/aws-lambda": "~1.60.0",
58-
"@aws-cdk/aws-logs": "~1.60.0",
59-
"@aws-cdk/core": "~1.60.0",
60-
"@aws-cdk/aws-iam": "~1.60.0",
61-
"@aws-solutions-constructs/core": "~1.60.0",
62-
"constructs": "^3.0.2"
56+
"@aws-cdk/aws-apigateway": "~1.61.0",
57+
"@aws-cdk/aws-lambda": "~1.61.0",
58+
"@aws-cdk/aws-logs": "~1.61.0",
59+
"@aws-cdk/core": "~1.61.0",
60+
"@aws-cdk/aws-iam": "~1.61.0",
61+
"@aws-solutions-constructs/core": "~1.61.0",
62+
"constructs": "^3.0.4"
6363
},
6464
"devDependencies": {
65-
"@aws-cdk/assert": "~1.60.0",
65+
"@aws-cdk/assert": "~1.61.0",
6666
"@types/jest": "^24.0.23",
6767
"@types/node": "^10.3.0"
6868
},
@@ -72,12 +72,12 @@
7272
]
7373
},
7474
"peerDependencies": {
75-
"@aws-cdk/aws-apigateway": "~1.60.0",
76-
"@aws-cdk/aws-lambda": "~1.60.0",
77-
"@aws-cdk/aws-logs": "~1.60.0",
78-
"@aws-cdk/core": "~1.60.0",
79-
"@aws-solutions-constructs/core": "~1.60.0",
80-
"constructs": "^3.0.2",
81-
"@aws-cdk/aws-iam": "~1.60.0"
75+
"@aws-cdk/aws-apigateway": "~1.61.0",
76+
"@aws-cdk/aws-lambda": "~1.61.0",
77+
"@aws-cdk/aws-logs": "~1.61.0",
78+
"@aws-cdk/core": "~1.61.0",
79+
"@aws-solutions-constructs/core": "~1.61.0",
80+
"constructs": "^3.0.4",
81+
"@aws-cdk/aws-iam": "~1.61.0"
8282
}
8383
}

source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/__snapshots__/test.apigateway-lambda.test.js.snap

+118
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ Object {
375375
"Ref": "testapigatewaylambdaLambdaRestApiE957E944",
376376
},
377377
"StageName": "prod",
378+
"TracingEnabled": true,
378379
},
379380
"Type": "AWS::ApiGateway::Stage",
380381
},
@@ -594,6 +595,7 @@ Object {
594595
},
595596
"testapigatewaylambdaLambdaFunction18FF222F": Object {
596597
"DependsOn": Array [
598+
"testapigatewaylambdaLambdaFunctionServiceRoleDefaultPolicyA5D0BE32",
597599
"testapigatewaylambdaLambdaFunctionServiceRole5CD2E9F7",
598600
],
599601
"Metadata": Object {
@@ -658,6 +660,9 @@ Object {
658660
],
659661
},
660662
"Runtime": "nodejs10.x",
663+
"TracingConfig": Object {
664+
"Mode": "Active",
665+
},
661666
},
662667
"Type": "AWS::Lambda::Function",
663668
},
@@ -712,6 +717,40 @@ Object {
712717
},
713718
"Type": "AWS::IAM::Role",
714719
},
720+
"testapigatewaylambdaLambdaFunctionServiceRoleDefaultPolicyA5D0BE32": Object {
721+
"Metadata": Object {
722+
"cfn_nag": Object {
723+
"rules_to_suppress": Array [
724+
Object {
725+
"id": "W12",
726+
"reason": "Lambda needs the following minimum required permissions to send trace data to X-Ray.",
727+
},
728+
],
729+
},
730+
},
731+
"Properties": Object {
732+
"PolicyDocument": Object {
733+
"Statement": Array [
734+
Object {
735+
"Action": Array [
736+
"xray:PutTraceSegments",
737+
"xray:PutTelemetryRecords",
738+
],
739+
"Effect": "Allow",
740+
"Resource": "*",
741+
},
742+
],
743+
"Version": "2012-10-17",
744+
},
745+
"PolicyName": "testapigatewaylambdaLambdaFunctionServiceRoleDefaultPolicyA5D0BE32",
746+
"Roles": Array [
747+
Object {
748+
"Ref": "testapigatewaylambdaLambdaFunctionServiceRole5CD2E9F7",
749+
},
750+
],
751+
},
752+
"Type": "AWS::IAM::Policy",
753+
},
715754
"testapigatewaylambdaLambdaRestApiANY1FACA749": Object {
716755
"Properties": Object {
717756
"AuthorizationType": "AWS_IAM",
@@ -952,6 +991,7 @@ Object {
952991
"Ref": "testapigatewaylambdaLambdaRestApiE957E944",
953992
},
954993
"StageName": "prod",
994+
"TracingEnabled": true,
955995
},
956996
"Type": "AWS::ApiGateway::Stage",
957997
},
@@ -1197,6 +1237,7 @@ Object {
11971237
},
11981238
"pattern1LambdaFunction4AE2BC2A": Object {
11991239
"DependsOn": Array [
1240+
"pattern1LambdaFunctionServiceRoleDefaultPolicy3DAB9197",
12001241
"pattern1LambdaFunctionServiceRoleEEE9B913",
12011242
],
12021243
"Metadata": Object {
@@ -1261,9 +1302,46 @@ Object {
12611302
],
12621303
},
12631304
"Runtime": "nodejs10.x",
1305+
"TracingConfig": Object {
1306+
"Mode": "Active",
1307+
},
12641308
},
12651309
"Type": "AWS::Lambda::Function",
12661310
},
1311+
"pattern1LambdaFunctionServiceRoleDefaultPolicy3DAB9197": Object {
1312+
"Metadata": Object {
1313+
"cfn_nag": Object {
1314+
"rules_to_suppress": Array [
1315+
Object {
1316+
"id": "W12",
1317+
"reason": "Lambda needs the following minimum required permissions to send trace data to X-Ray.",
1318+
},
1319+
],
1320+
},
1321+
},
1322+
"Properties": Object {
1323+
"PolicyDocument": Object {
1324+
"Statement": Array [
1325+
Object {
1326+
"Action": Array [
1327+
"xray:PutTraceSegments",
1328+
"xray:PutTelemetryRecords",
1329+
],
1330+
"Effect": "Allow",
1331+
"Resource": "*",
1332+
},
1333+
],
1334+
"Version": "2012-10-17",
1335+
},
1336+
"PolicyName": "pattern1LambdaFunctionServiceRoleDefaultPolicy3DAB9197",
1337+
"Roles": Array [
1338+
Object {
1339+
"Ref": "pattern1LambdaFunctionServiceRoleEEE9B913",
1340+
},
1341+
],
1342+
},
1343+
"Type": "AWS::IAM::Policy",
1344+
},
12671345
"pattern1LambdaFunctionServiceRoleEEE9B913": Object {
12681346
"Properties": Object {
12691347
"AssumeRolePolicyDocument": Object {
@@ -1566,6 +1644,7 @@ Object {
15661644
"Ref": "pattern1LambdaRestApi6083801A",
15671645
},
15681646
"StageName": "prod",
1647+
"TracingEnabled": true,
15691648
},
15701649
"Type": "AWS::ApiGateway::Stage",
15711650
},
@@ -1725,6 +1804,7 @@ Object {
17251804
},
17261805
"pattern2LambdaFunction20E7E90C": Object {
17271806
"DependsOn": Array [
1807+
"pattern2LambdaFunctionServiceRoleDefaultPolicyB413F001",
17281808
"pattern2LambdaFunctionServiceRoleF8D0D0F1",
17291809
],
17301810
"Metadata": Object {
@@ -1789,9 +1869,46 @@ Object {
17891869
],
17901870
},
17911871
"Runtime": "nodejs10.x",
1872+
"TracingConfig": Object {
1873+
"Mode": "Active",
1874+
},
17921875
},
17931876
"Type": "AWS::Lambda::Function",
17941877
},
1878+
"pattern2LambdaFunctionServiceRoleDefaultPolicyB413F001": Object {
1879+
"Metadata": Object {
1880+
"cfn_nag": Object {
1881+
"rules_to_suppress": Array [
1882+
Object {
1883+
"id": "W12",
1884+
"reason": "Lambda needs the following minimum required permissions to send trace data to X-Ray.",
1885+
},
1886+
],
1887+
},
1888+
},
1889+
"Properties": Object {
1890+
"PolicyDocument": Object {
1891+
"Statement": Array [
1892+
Object {
1893+
"Action": Array [
1894+
"xray:PutTraceSegments",
1895+
"xray:PutTelemetryRecords",
1896+
],
1897+
"Effect": "Allow",
1898+
"Resource": "*",
1899+
},
1900+
],
1901+
"Version": "2012-10-17",
1902+
},
1903+
"PolicyName": "pattern2LambdaFunctionServiceRoleDefaultPolicyB413F001",
1904+
"Roles": Array [
1905+
Object {
1906+
"Ref": "pattern2LambdaFunctionServiceRoleF8D0D0F1",
1907+
},
1908+
],
1909+
},
1910+
"Type": "AWS::IAM::Policy",
1911+
},
17951912
"pattern2LambdaFunctionServiceRoleF8D0D0F1": Object {
17961913
"Properties": Object {
17971914
"AssumeRolePolicyDocument": Object {
@@ -2094,6 +2211,7 @@ Object {
20942211
"Ref": "pattern2LambdaRestApi7106C394",
20952212
},
20962213
"StageName": "prod",
2214+
"TracingEnabled": true,
20972215
},
20982216
"Type": "AWS::ApiGateway::Stage",
20992217
},

0 commit comments

Comments
 (0)