Skip to content

Commit

Permalink
Update to version v1.57.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hnishar committed Aug 7, 2020
1 parent 773bbdf commit 50d3e9c
Show file tree
Hide file tree
Showing 61 changed files with 2,096 additions and 619 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.57.0] - 2020-08-07

### Changed
- Upgraded all patterns to CDK v1.57.0
- Use `s3.IBucket` type instead of `s3.Bucket` for `existingBucketObj` construct props ([#33](https://github.com/awslabs/aws-solutions-constructs/issues/33))

## [1.56.0] - 2020-08-05

### Changed
Expand Down
2 changes: 1 addition & 1 deletion source/lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"./patterns/@aws-solutions-constructs/*"
],
"rejectCycles": "true",
"version": "1.56.0"
"version": "1.57.0"
}
2 changes: 1 addition & 1 deletion source/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aws-solutions-constructs",
"version": "1.56.0",
"version": "1.57.0",
"description": "AWS Solutions Constructs Library",
"repository": {
"type": "git",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws-solutions-constructs/aws-apigateway-dynamodb",
"version": "1.56.0",
"version": "1.57.0",
"description": "CDK Constructs for AWS API Gateway and Amazon DynamoDB integration.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down Expand Up @@ -53,16 +53,16 @@
}
},
"dependencies": {
"@aws-cdk/core": "~1.56.0",
"@aws-cdk/aws-apigateway": "~1.56.0",
"@aws-cdk/aws-iam": "~1.56.0",
"@aws-cdk/aws-dynamodb": "~1.56.0",
"@aws-cdk/aws-logs": "~1.56.0",
"@aws-solutions-constructs/core": "~1.56.0",
"@aws-cdk/core": "~1.57.0",
"@aws-cdk/aws-apigateway": "~1.57.0",
"@aws-cdk/aws-iam": "~1.57.0",
"@aws-cdk/aws-dynamodb": "~1.57.0",
"@aws-cdk/aws-logs": "~1.57.0",
"@aws-solutions-constructs/core": "~1.57.0",
"constructs": "^3.0.2"
},
"devDependencies": {
"@aws-cdk/assert": "~1.56.0",
"@aws-cdk/assert": "~1.57.0",
"@types/jest": "^24.0.23",
"@types/node": "^10.3.0"
},
Expand All @@ -72,12 +72,12 @@
]
},
"peerDependencies": {
"@aws-cdk/core": "~1.56.0",
"@aws-cdk/aws-apigateway": "~1.56.0",
"@aws-cdk/aws-iam": "~1.56.0",
"@aws-cdk/aws-dynamodb": "~1.56.0",
"@aws-solutions-constructs/core": "~1.56.0",
"@aws-cdk/core": "~1.57.0",
"@aws-cdk/aws-apigateway": "~1.57.0",
"@aws-cdk/aws-iam": "~1.57.0",
"@aws-cdk/aws-dynamodb": "~1.57.0",
"@aws-solutions-constructs/core": "~1.57.0",
"constructs": "^3.0.2",
"@aws-cdk/aws-logs": "~1.56.0"
"@aws-cdk/aws-logs": "~1.57.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws-solutions-constructs/aws-apigateway-lambda",
"version": "1.56.0",
"version": "1.57.0",
"description": "CDK constructs for defining an interaction between an API Gateway and a Lambda function.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down Expand Up @@ -53,16 +53,16 @@
}
},
"dependencies": {
"@aws-cdk/aws-apigateway": "~1.56.0",
"@aws-cdk/aws-lambda": "~1.56.0",
"@aws-cdk/aws-logs": "~1.56.0",
"@aws-cdk/core": "~1.56.0",
"@aws-cdk/aws-iam": "~1.56.0",
"@aws-solutions-constructs/core": "~1.56.0",
"@aws-cdk/aws-apigateway": "~1.57.0",
"@aws-cdk/aws-lambda": "~1.57.0",
"@aws-cdk/aws-logs": "~1.57.0",
"@aws-cdk/core": "~1.57.0",
"@aws-cdk/aws-iam": "~1.57.0",
"@aws-solutions-constructs/core": "~1.57.0",
"constructs": "^3.0.2"
},
"devDependencies": {
"@aws-cdk/assert": "~1.56.0",
"@aws-cdk/assert": "~1.57.0",
"@types/jest": "^24.0.23",
"@types/node": "^10.3.0"
},
Expand All @@ -72,12 +72,12 @@
]
},
"peerDependencies": {
"@aws-cdk/aws-apigateway": "~1.56.0",
"@aws-cdk/aws-lambda": "~1.56.0",
"@aws-cdk/aws-logs": "~1.56.0",
"@aws-cdk/core": "~1.56.0",
"@aws-solutions-constructs/core": "~1.56.0",
"@aws-cdk/aws-apigateway": "~1.57.0",
"@aws-cdk/aws-lambda": "~1.57.0",
"@aws-cdk/aws-logs": "~1.57.0",
"@aws-cdk/core": "~1.57.0",
"@aws-solutions-constructs/core": "~1.57.0",
"constructs": "^3.0.2",
"@aws-cdk/aws-iam": "~1.56.0"
"@aws-cdk/aws-iam": "~1.57.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws-solutions-constructs/aws-apigateway-sqs",
"version": "1.56.0",
"version": "1.57.0",
"description": "CDK constructs for defining an interaction between an AWS Lambda function and an Amazon S3 bucket.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down Expand Up @@ -53,17 +53,17 @@
}
},
"dependencies": {
"@aws-cdk/aws-apigateway": "~1.56.0",
"@aws-cdk/aws-sqs": "~1.56.0",
"@aws-cdk/aws-kms": "~1.56.0",
"@aws-cdk/aws-iam": "~1.56.0",
"@aws-cdk/aws-logs": "~1.56.0",
"@aws-cdk/core": "~1.56.0",
"@aws-solutions-constructs/core": "~1.56.0",
"@aws-cdk/aws-apigateway": "~1.57.0",
"@aws-cdk/aws-sqs": "~1.57.0",
"@aws-cdk/aws-kms": "~1.57.0",
"@aws-cdk/aws-iam": "~1.57.0",
"@aws-cdk/aws-logs": "~1.57.0",
"@aws-cdk/core": "~1.57.0",
"@aws-solutions-constructs/core": "~1.57.0",
"constructs": "^3.0.2"
},
"devDependencies": {
"@aws-cdk/assert": "~1.56.0",
"@aws-cdk/assert": "~1.57.0",
"@types/jest": "^24.0.23",
"@types/node": "^10.3.0"
},
Expand All @@ -73,13 +73,13 @@
]
},
"peerDependencies": {
"@aws-cdk/aws-apigateway": "~1.56.0",
"@aws-cdk/aws-sqs": "~1.56.0",
"@aws-cdk/aws-kms": "~1.56.0",
"@aws-cdk/aws-iam": "~1.56.0",
"@aws-cdk/core": "~1.56.0",
"@aws-solutions-constructs/core": "~1.56.0",
"@aws-cdk/aws-apigateway": "~1.57.0",
"@aws-cdk/aws-sqs": "~1.57.0",
"@aws-cdk/aws-kms": "~1.57.0",
"@aws-cdk/aws-iam": "~1.57.0",
"@aws-cdk/core": "~1.57.0",
"@aws-solutions-constructs/core": "~1.57.0",
"constructs": "^3.0.2",
"@aws-cdk/aws-logs": "~1.56.0"
"@aws-cdk/aws-logs": "~1.57.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws-solutions-constructs/aws-cloudfront-apigateway-lambda",
"version": "1.56.0",
"version": "1.57.0",
"description": "CDK Constructs for AWS Cloudfront to AWS API Gateway to AWS Lambda integration.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down Expand Up @@ -53,19 +53,19 @@
}
},
"dependencies": {
"@aws-cdk/core": "~1.56.0",
"@aws-cdk/aws-cloudfront": "~1.56.0",
"@aws-cdk/aws-apigateway": "~1.56.0",
"@aws-cdk/aws-lambda": "~1.56.0",
"@aws-cdk/aws-logs": "~1.56.0",
"@aws-cdk/aws-s3": "~1.56.0",
"@aws-cdk/aws-iam": "~1.56.0",
"@aws-solutions-constructs/aws-cloudfront-apigateway": "~1.56.0",
"@aws-solutions-constructs/core": "~1.56.0",
"@aws-cdk/core": "~1.57.0",
"@aws-cdk/aws-cloudfront": "~1.57.0",
"@aws-cdk/aws-apigateway": "~1.57.0",
"@aws-cdk/aws-lambda": "~1.57.0",
"@aws-cdk/aws-logs": "~1.57.0",
"@aws-cdk/aws-s3": "~1.57.0",
"@aws-cdk/aws-iam": "~1.57.0",
"@aws-solutions-constructs/aws-cloudfront-apigateway": "~1.57.0",
"@aws-solutions-constructs/core": "~1.57.0",
"constructs": "^3.0.2"
},
"devDependencies": {
"@aws-cdk/assert": "~1.56.0",
"@aws-cdk/assert": "~1.57.0",
"@types/jest": "^24.0.23",
"@types/node": "^10.3.0"
},
Expand All @@ -75,15 +75,15 @@
]
},
"peerDependencies": {
"@aws-cdk/core": "~1.56.0",
"@aws-cdk/aws-cloudfront": "~1.56.0",
"@aws-cdk/aws-apigateway": "~1.56.0",
"@aws-solutions-constructs/core": "~1.56.0",
"@aws-cdk/aws-lambda": "~1.56.0",
"@aws-cdk/aws-logs": "~1.56.0",
"@aws-solutions-constructs/aws-cloudfront-apigateway": "~1.56.0",
"@aws-cdk/core": "~1.57.0",
"@aws-cdk/aws-cloudfront": "~1.57.0",
"@aws-cdk/aws-apigateway": "~1.57.0",
"@aws-solutions-constructs/core": "~1.57.0",
"@aws-cdk/aws-lambda": "~1.57.0",
"@aws-cdk/aws-logs": "~1.57.0",
"@aws-solutions-constructs/aws-cloudfront-apigateway": "~1.57.0",
"constructs": "^3.0.2",
"@aws-cdk/aws-s3": "~1.56.0",
"@aws-cdk/aws-iam": "~1.56.0"
"@aws-cdk/aws-s3": "~1.57.0",
"@aws-cdk/aws-iam": "~1.57.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws-solutions-constructs/aws-cloudfront-apigateway",
"version": "1.56.0",
"version": "1.57.0",
"description": "CDK Constructs for AWS Cloudfront to AWS API Gateway integration.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down Expand Up @@ -53,17 +53,17 @@
}
},
"dependencies": {
"@aws-cdk/core": "~1.56.0",
"@aws-cdk/aws-cloudfront": "~1.56.0",
"@aws-cdk/aws-apigateway": "~1.56.0",
"@aws-cdk/aws-lambda": "~1.56.0",
"@aws-cdk/aws-logs": "~1.56.0",
"@aws-cdk/aws-s3": "~1.56.0",
"@aws-solutions-constructs/core": "~1.56.0",
"@aws-cdk/core": "~1.57.0",
"@aws-cdk/aws-cloudfront": "~1.57.0",
"@aws-cdk/aws-apigateway": "~1.57.0",
"@aws-cdk/aws-lambda": "~1.57.0",
"@aws-cdk/aws-logs": "~1.57.0",
"@aws-cdk/aws-s3": "~1.57.0",
"@aws-solutions-constructs/core": "~1.57.0",
"constructs": "^3.0.2"
},
"devDependencies": {
"@aws-cdk/assert": "~1.56.0",
"@aws-cdk/assert": "~1.57.0",
"@types/jest": "^24.0.23",
"@types/node": "^10.3.0"
},
Expand All @@ -73,13 +73,13 @@
]
},
"peerDependencies": {
"@aws-cdk/core": "~1.56.0",
"@aws-cdk/aws-cloudfront": "~1.56.0",
"@aws-cdk/aws-apigateway": "~1.56.0",
"@aws-solutions-constructs/core": "~1.56.0",
"@aws-cdk/aws-lambda": "~1.56.0",
"@aws-cdk/aws-logs": "~1.56.0",
"@aws-cdk/core": "~1.57.0",
"@aws-cdk/aws-cloudfront": "~1.57.0",
"@aws-cdk/aws-apigateway": "~1.57.0",
"@aws-solutions-constructs/core": "~1.57.0",
"@aws-cdk/aws-lambda": "~1.57.0",
"@aws-cdk/aws-logs": "~1.57.0",
"constructs": "^3.0.2",
"@aws-cdk/aws-s3": "~1.56.0"
"@aws-cdk/aws-s3": "~1.57.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ _Parameters_
|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|
|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.|
|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.|
|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.|
|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.|
|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.|

## Default settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class CloudFrontToS3 extends Construct {
public readonly cloudFrontWebDistribution: cloudfront.CloudFrontWebDistribution;
public readonly edgeLambdaFunctionVersion?: lambda.Version;
public readonly cloudFrontLoggingBucket?: s3.Bucket;
public readonly s3Bucket: s3.Bucket;
public readonly s3Bucket?: s3.Bucket;
public readonly s3LoggingBucket?: s3.Bucket;

/**
Expand All @@ -65,14 +65,19 @@ export class CloudFrontToS3 extends Construct {
*/
constructor(scope: Construct, id: string, props: CloudFrontToS3Props) {
super(scope, id);
let bucket: s3.Bucket;

[this.s3Bucket, this.s3LoggingBucket] = defaults.buildS3Bucket(this, {
existingBucketObj: props.existingBucketObj,
if (!props.existingBucketObj) {
[this.s3Bucket, this.s3LoggingBucket] = defaults.buildS3Bucket(this, {
bucketProps: props.bucketProps
});
});
bucket = this.s3Bucket;
} else {
bucket = props.existingBucketObj;
}

[this.cloudFrontWebDistribution, this.edgeLambdaFunctionVersion, this.cloudFrontLoggingBucket] =
defaults.CloudFrontDistributionForS3(this, this.s3Bucket,
defaults.CloudFrontDistributionForS3(this, bucket,
props.cloudFrontDistributionProps, props.insertHttpSecurityHeaders);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws-solutions-constructs/aws-cloudfront-s3",
"version": "1.56.0",
"version": "1.57.0",
"description": "CDK Constructs for AWS Cloudfront to AWS S3 integration.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down Expand Up @@ -53,15 +53,15 @@
}
},
"dependencies": {
"@aws-cdk/core": "~1.56.0",
"@aws-cdk/aws-cloudfront": "~1.56.0",
"@aws-cdk/aws-s3": "~1.56.0",
"@aws-cdk/aws-lambda": "~1.56.0",
"@aws-solutions-constructs/core": "~1.56.0",
"@aws-cdk/core": "~1.57.0",
"@aws-cdk/aws-cloudfront": "~1.57.0",
"@aws-cdk/aws-s3": "~1.57.0",
"@aws-cdk/aws-lambda": "~1.57.0",
"@aws-solutions-constructs/core": "~1.57.0",
"constructs": "^3.0.2"
},
"devDependencies": {
"@aws-cdk/assert": "~1.56.0",
"@aws-cdk/assert": "~1.57.0",
"@types/jest": "^24.0.23",
"@types/node": "^10.3.0"
},
Expand All @@ -71,11 +71,11 @@
]
},
"peerDependencies": {
"@aws-cdk/core": "~1.56.0",
"@aws-cdk/aws-cloudfront": "~1.56.0",
"@aws-cdk/aws-s3": "~1.56.0",
"@aws-solutions-constructs/core": "~1.56.0",
"@aws-cdk/core": "~1.57.0",
"@aws-cdk/aws-cloudfront": "~1.57.0",
"@aws-cdk/aws-s3": "~1.57.0",
"@aws-solutions-constructs/core": "~1.57.0",
"constructs": "^3.0.2",
"@aws-cdk/aws-lambda": "~1.56.0"
"@aws-cdk/aws-lambda": "~1.57.0"
}
}
Loading

0 comments on commit 50d3e9c

Please sign in to comment.