Skip to content

Commit 50d3e9c

Browse files
committed
Update to version v1.57.0
1 parent 773bbdf commit 50d3e9c

File tree

61 files changed

+2096
-619
lines changed

Some content is hidden

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

61 files changed

+2096
-619
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
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.57.0] - 2020-08-07
8+
9+
### Changed
10+
- Upgraded all patterns to CDK v1.57.0
11+
- Use `s3.IBucket` type instead of `s3.Bucket` for `existingBucketObj` construct props ([#33](https://github.com/awslabs/aws-solutions-constructs/issues/33))
12+
713
## [1.56.0] - 2020-08-05
814

915
### Changed

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.56.0"
9+
"version": "1.57.0"
1010
}

source/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aws-solutions-constructs",
3-
"version": "1.56.0",
3+
"version": "1.57.0",
44
"description": "AWS Solutions Constructs Library",
55
"repository": {
66
"type": "git",

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aws-solutions-constructs/aws-apigateway-dynamodb",
3-
"version": "1.56.0",
3+
"version": "1.57.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.56.0",
57-
"@aws-cdk/aws-apigateway": "~1.56.0",
58-
"@aws-cdk/aws-iam": "~1.56.0",
59-
"@aws-cdk/aws-dynamodb": "~1.56.0",
60-
"@aws-cdk/aws-logs": "~1.56.0",
61-
"@aws-solutions-constructs/core": "~1.56.0",
56+
"@aws-cdk/core": "~1.57.0",
57+
"@aws-cdk/aws-apigateway": "~1.57.0",
58+
"@aws-cdk/aws-iam": "~1.57.0",
59+
"@aws-cdk/aws-dynamodb": "~1.57.0",
60+
"@aws-cdk/aws-logs": "~1.57.0",
61+
"@aws-solutions-constructs/core": "~1.57.0",
6262
"constructs": "^3.0.2"
6363
},
6464
"devDependencies": {
65-
"@aws-cdk/assert": "~1.56.0",
65+
"@aws-cdk/assert": "~1.57.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.56.0",
76-
"@aws-cdk/aws-apigateway": "~1.56.0",
77-
"@aws-cdk/aws-iam": "~1.56.0",
78-
"@aws-cdk/aws-dynamodb": "~1.56.0",
79-
"@aws-solutions-constructs/core": "~1.56.0",
75+
"@aws-cdk/core": "~1.57.0",
76+
"@aws-cdk/aws-apigateway": "~1.57.0",
77+
"@aws-cdk/aws-iam": "~1.57.0",
78+
"@aws-cdk/aws-dynamodb": "~1.57.0",
79+
"@aws-solutions-constructs/core": "~1.57.0",
8080
"constructs": "^3.0.2",
81-
"@aws-cdk/aws-logs": "~1.56.0"
81+
"@aws-cdk/aws-logs": "~1.57.0"
8282
}
8383
}

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aws-solutions-constructs/aws-apigateway-lambda",
3-
"version": "1.56.0",
3+
"version": "1.57.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.56.0",
57-
"@aws-cdk/aws-lambda": "~1.56.0",
58-
"@aws-cdk/aws-logs": "~1.56.0",
59-
"@aws-cdk/core": "~1.56.0",
60-
"@aws-cdk/aws-iam": "~1.56.0",
61-
"@aws-solutions-constructs/core": "~1.56.0",
56+
"@aws-cdk/aws-apigateway": "~1.57.0",
57+
"@aws-cdk/aws-lambda": "~1.57.0",
58+
"@aws-cdk/aws-logs": "~1.57.0",
59+
"@aws-cdk/core": "~1.57.0",
60+
"@aws-cdk/aws-iam": "~1.57.0",
61+
"@aws-solutions-constructs/core": "~1.57.0",
6262
"constructs": "^3.0.2"
6363
},
6464
"devDependencies": {
65-
"@aws-cdk/assert": "~1.56.0",
65+
"@aws-cdk/assert": "~1.57.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.56.0",
76-
"@aws-cdk/aws-lambda": "~1.56.0",
77-
"@aws-cdk/aws-logs": "~1.56.0",
78-
"@aws-cdk/core": "~1.56.0",
79-
"@aws-solutions-constructs/core": "~1.56.0",
75+
"@aws-cdk/aws-apigateway": "~1.57.0",
76+
"@aws-cdk/aws-lambda": "~1.57.0",
77+
"@aws-cdk/aws-logs": "~1.57.0",
78+
"@aws-cdk/core": "~1.57.0",
79+
"@aws-solutions-constructs/core": "~1.57.0",
8080
"constructs": "^3.0.2",
81-
"@aws-cdk/aws-iam": "~1.56.0"
81+
"@aws-cdk/aws-iam": "~1.57.0"
8282
}
8383
}

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

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aws-solutions-constructs/aws-apigateway-sqs",
3-
"version": "1.56.0",
3+
"version": "1.57.0",
44
"description": "CDK constructs for defining an interaction between an AWS Lambda function and an Amazon S3 bucket.",
55
"main": "lib/index.js",
66
"types": "lib/index.d.ts",
@@ -53,17 +53,17 @@
5353
}
5454
},
5555
"dependencies": {
56-
"@aws-cdk/aws-apigateway": "~1.56.0",
57-
"@aws-cdk/aws-sqs": "~1.56.0",
58-
"@aws-cdk/aws-kms": "~1.56.0",
59-
"@aws-cdk/aws-iam": "~1.56.0",
60-
"@aws-cdk/aws-logs": "~1.56.0",
61-
"@aws-cdk/core": "~1.56.0",
62-
"@aws-solutions-constructs/core": "~1.56.0",
56+
"@aws-cdk/aws-apigateway": "~1.57.0",
57+
"@aws-cdk/aws-sqs": "~1.57.0",
58+
"@aws-cdk/aws-kms": "~1.57.0",
59+
"@aws-cdk/aws-iam": "~1.57.0",
60+
"@aws-cdk/aws-logs": "~1.57.0",
61+
"@aws-cdk/core": "~1.57.0",
62+
"@aws-solutions-constructs/core": "~1.57.0",
6363
"constructs": "^3.0.2"
6464
},
6565
"devDependencies": {
66-
"@aws-cdk/assert": "~1.56.0",
66+
"@aws-cdk/assert": "~1.57.0",
6767
"@types/jest": "^24.0.23",
6868
"@types/node": "^10.3.0"
6969
},
@@ -73,13 +73,13 @@
7373
]
7474
},
7575
"peerDependencies": {
76-
"@aws-cdk/aws-apigateway": "~1.56.0",
77-
"@aws-cdk/aws-sqs": "~1.56.0",
78-
"@aws-cdk/aws-kms": "~1.56.0",
79-
"@aws-cdk/aws-iam": "~1.56.0",
80-
"@aws-cdk/core": "~1.56.0",
81-
"@aws-solutions-constructs/core": "~1.56.0",
76+
"@aws-cdk/aws-apigateway": "~1.57.0",
77+
"@aws-cdk/aws-sqs": "~1.57.0",
78+
"@aws-cdk/aws-kms": "~1.57.0",
79+
"@aws-cdk/aws-iam": "~1.57.0",
80+
"@aws-cdk/core": "~1.57.0",
81+
"@aws-solutions-constructs/core": "~1.57.0",
8282
"constructs": "^3.0.2",
83-
"@aws-cdk/aws-logs": "~1.56.0"
83+
"@aws-cdk/aws-logs": "~1.57.0"
8484
}
8585
}

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

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aws-solutions-constructs/aws-cloudfront-apigateway-lambda",
3-
"version": "1.56.0",
3+
"version": "1.57.0",
44
"description": "CDK Constructs for AWS Cloudfront to AWS API Gateway to AWS Lambda integration.",
55
"main": "lib/index.js",
66
"types": "lib/index.d.ts",
@@ -53,19 +53,19 @@
5353
}
5454
},
5555
"dependencies": {
56-
"@aws-cdk/core": "~1.56.0",
57-
"@aws-cdk/aws-cloudfront": "~1.56.0",
58-
"@aws-cdk/aws-apigateway": "~1.56.0",
59-
"@aws-cdk/aws-lambda": "~1.56.0",
60-
"@aws-cdk/aws-logs": "~1.56.0",
61-
"@aws-cdk/aws-s3": "~1.56.0",
62-
"@aws-cdk/aws-iam": "~1.56.0",
63-
"@aws-solutions-constructs/aws-cloudfront-apigateway": "~1.56.0",
64-
"@aws-solutions-constructs/core": "~1.56.0",
56+
"@aws-cdk/core": "~1.57.0",
57+
"@aws-cdk/aws-cloudfront": "~1.57.0",
58+
"@aws-cdk/aws-apigateway": "~1.57.0",
59+
"@aws-cdk/aws-lambda": "~1.57.0",
60+
"@aws-cdk/aws-logs": "~1.57.0",
61+
"@aws-cdk/aws-s3": "~1.57.0",
62+
"@aws-cdk/aws-iam": "~1.57.0",
63+
"@aws-solutions-constructs/aws-cloudfront-apigateway": "~1.57.0",
64+
"@aws-solutions-constructs/core": "~1.57.0",
6565
"constructs": "^3.0.2"
6666
},
6767
"devDependencies": {
68-
"@aws-cdk/assert": "~1.56.0",
68+
"@aws-cdk/assert": "~1.57.0",
6969
"@types/jest": "^24.0.23",
7070
"@types/node": "^10.3.0"
7171
},
@@ -75,15 +75,15 @@
7575
]
7676
},
7777
"peerDependencies": {
78-
"@aws-cdk/core": "~1.56.0",
79-
"@aws-cdk/aws-cloudfront": "~1.56.0",
80-
"@aws-cdk/aws-apigateway": "~1.56.0",
81-
"@aws-solutions-constructs/core": "~1.56.0",
82-
"@aws-cdk/aws-lambda": "~1.56.0",
83-
"@aws-cdk/aws-logs": "~1.56.0",
84-
"@aws-solutions-constructs/aws-cloudfront-apigateway": "~1.56.0",
78+
"@aws-cdk/core": "~1.57.0",
79+
"@aws-cdk/aws-cloudfront": "~1.57.0",
80+
"@aws-cdk/aws-apigateway": "~1.57.0",
81+
"@aws-solutions-constructs/core": "~1.57.0",
82+
"@aws-cdk/aws-lambda": "~1.57.0",
83+
"@aws-cdk/aws-logs": "~1.57.0",
84+
"@aws-solutions-constructs/aws-cloudfront-apigateway": "~1.57.0",
8585
"constructs": "^3.0.2",
86-
"@aws-cdk/aws-s3": "~1.56.0",
87-
"@aws-cdk/aws-iam": "~1.56.0"
86+
"@aws-cdk/aws-s3": "~1.57.0",
87+
"@aws-cdk/aws-iam": "~1.57.0"
8888
}
8989
}

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

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aws-solutions-constructs/aws-cloudfront-apigateway",
3-
"version": "1.56.0",
3+
"version": "1.57.0",
44
"description": "CDK Constructs for AWS Cloudfront to AWS API Gateway integration.",
55
"main": "lib/index.js",
66
"types": "lib/index.d.ts",
@@ -53,17 +53,17 @@
5353
}
5454
},
5555
"dependencies": {
56-
"@aws-cdk/core": "~1.56.0",
57-
"@aws-cdk/aws-cloudfront": "~1.56.0",
58-
"@aws-cdk/aws-apigateway": "~1.56.0",
59-
"@aws-cdk/aws-lambda": "~1.56.0",
60-
"@aws-cdk/aws-logs": "~1.56.0",
61-
"@aws-cdk/aws-s3": "~1.56.0",
62-
"@aws-solutions-constructs/core": "~1.56.0",
56+
"@aws-cdk/core": "~1.57.0",
57+
"@aws-cdk/aws-cloudfront": "~1.57.0",
58+
"@aws-cdk/aws-apigateway": "~1.57.0",
59+
"@aws-cdk/aws-lambda": "~1.57.0",
60+
"@aws-cdk/aws-logs": "~1.57.0",
61+
"@aws-cdk/aws-s3": "~1.57.0",
62+
"@aws-solutions-constructs/core": "~1.57.0",
6363
"constructs": "^3.0.2"
6464
},
6565
"devDependencies": {
66-
"@aws-cdk/assert": "~1.56.0",
66+
"@aws-cdk/assert": "~1.57.0",
6767
"@types/jest": "^24.0.23",
6868
"@types/node": "^10.3.0"
6969
},
@@ -73,13 +73,13 @@
7373
]
7474
},
7575
"peerDependencies": {
76-
"@aws-cdk/core": "~1.56.0",
77-
"@aws-cdk/aws-cloudfront": "~1.56.0",
78-
"@aws-cdk/aws-apigateway": "~1.56.0",
79-
"@aws-solutions-constructs/core": "~1.56.0",
80-
"@aws-cdk/aws-lambda": "~1.56.0",
81-
"@aws-cdk/aws-logs": "~1.56.0",
76+
"@aws-cdk/core": "~1.57.0",
77+
"@aws-cdk/aws-cloudfront": "~1.57.0",
78+
"@aws-cdk/aws-apigateway": "~1.57.0",
79+
"@aws-solutions-constructs/core": "~1.57.0",
80+
"@aws-cdk/aws-lambda": "~1.57.0",
81+
"@aws-cdk/aws-logs": "~1.57.0",
8282
"constructs": "^3.0.2",
83-
"@aws-cdk/aws-s3": "~1.56.0"
83+
"@aws-cdk/aws-s3": "~1.57.0"
8484
}
8585
}

source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ _Parameters_
6161
|cloudFrontWebDistribution|[`cloudfront.CloudFrontWebDistribution`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-cloudfront.CloudFrontWebDistribution.html)|Returns an instance of cloudfront.CloudFrontWebDistribution created by the construct|
6262
|edgeLambdaFunctionVersion|[`lambda.Version`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.Version.html)|Returns an instance of the edge Lambda function version created by the pattern.|
6363
|cloudFrontLoggingBucket|[`s3.Bucket`](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-s3-readme.html)|Returns an instance of the logging bucket for CloudFront WebDistribution.|
64-
|s3Bucket|[`s3.Bucket`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.Bucket.html)|Returns an instance of s3.Bucket created by the construct.|
64+
|s3Bucket?|[`s3.Bucket`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.Bucket.html)|Returns an instance of s3.Bucket created by the construct.|
6565
|s3LoggingBucket?|[`s3.Bucket`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.Bucket.html)|Returns an instance of s3.Bucket created by the construct as the logging bucket for the primary bucket.|
6666

6767
## Default settings

source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/lib/index.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class CloudFrontToS3 extends Construct {
5252
public readonly cloudFrontWebDistribution: cloudfront.CloudFrontWebDistribution;
5353
public readonly edgeLambdaFunctionVersion?: lambda.Version;
5454
public readonly cloudFrontLoggingBucket?: s3.Bucket;
55-
public readonly s3Bucket: s3.Bucket;
55+
public readonly s3Bucket?: s3.Bucket;
5656
public readonly s3LoggingBucket?: s3.Bucket;
5757

5858
/**
@@ -65,14 +65,19 @@ export class CloudFrontToS3 extends Construct {
6565
*/
6666
constructor(scope: Construct, id: string, props: CloudFrontToS3Props) {
6767
super(scope, id);
68+
let bucket: s3.Bucket;
6869

69-
[this.s3Bucket, this.s3LoggingBucket] = defaults.buildS3Bucket(this, {
70-
existingBucketObj: props.existingBucketObj,
70+
if (!props.existingBucketObj) {
71+
[this.s3Bucket, this.s3LoggingBucket] = defaults.buildS3Bucket(this, {
7172
bucketProps: props.bucketProps
72-
});
73+
});
74+
bucket = this.s3Bucket;
75+
} else {
76+
bucket = props.existingBucketObj;
77+
}
7378

7479
[this.cloudFrontWebDistribution, this.edgeLambdaFunctionVersion, this.cloudFrontLoggingBucket] =
75-
defaults.CloudFrontDistributionForS3(this, this.s3Bucket,
80+
defaults.CloudFrontDistributionForS3(this, bucket,
7681
props.cloudFrontDistributionProps, props.insertHttpSecurityHeaders);
7782
}
7883
}

0 commit comments

Comments
 (0)