Skip to content

Commit

Permalink
Merge pull request #530 from awslabs/bump/1.130.0
Browse files Browse the repository at this point in the history
chore(release): 1.130.0
  • Loading branch information
biffgaut authored Dec 15, 2021
2 parents e4c72c9 + 6d7bed7 commit 54109b0
Show file tree
Hide file tree
Showing 218 changed files with 613 additions and 594 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [1.130.0](https://github.com/awslabs/aws-solutions-constructs/compare/v2.0.0...v1.130.0) (2021-12-15)

* Upgraded all patterns to CDK v1.130.0
* Changed underlying CDK 2.0 release to R26

## [1.129.0](https://github.com/awslabs/aws-solutions-constructs/compare/v1.128.0...v1.129.0) (2021-11-28)

* Upgraded all patterns to CDK v1.129.0
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [2.0.0](https://github.com/awslabs/aws-solutions-constructs/compare/v2.0.0-rc.2...v2.0.0) (2021-12-02)

* Includes all funcionality of V1.129.0

### Features

* **aws-cloudfront-s3:** added logS3AccessLogs prop ([#506](https://github.com/awslabs/aws-solutions-constructs/issues/506)) ([6d3c7c9](https://github.com/awslabs/aws-solutions-constructs/commit/6d3c7c94dbe1398fc2eef16a7862704bb15a8bb9))
* **aws-events-rule-kinesisfirehose-s3:** added logS3AccessLogs and loggingBucketProps ([#492](https://github.com/awslabs/aws-solutions-constructs/issues/492)) ([0af95f5](https://github.com/awslabs/aws-solutions-constructs/commit/0af95f58c395f766d29d1ece791d0307621f63e6))
* **aws-iot-kinesisfirehose-s3:** added custom loggingBucketProps ([#480](https://github.com/awslabs/aws-solutions-constructs/issues/480)) ([76c0aa9](https://github.com/awslabs/aws-solutions-constructs/commit/76c0aa9ed4be859319a830d29be1a397b3322a43))
* **aws-kinesisfirehose-s3-and-kinesisanalytics:** added logS3AccessLogs and loggingBucketProps ([#490](https://github.com/awslabs/aws-solutions-constructs/issues/490)) ([3d8fec6](https://github.com/awslabs/aws-solutions-constructs/commit/3d8fec6632c76711ee26c323893ca5a7a58d917f))
* **aws-kinesisfirehose-s3:** added custom logging bucket props to kinesisfirehose-s3 ([#478](https://github.com/awslabs/aws-solutions-constructs/issues/478)) ([6fab3e5](https://github.com/awslabs/aws-solutions-constructs/commit/6fab3e50de4ef73d2e9f2dbde358d9d6f14e9831))
* **aws-kinesisstreams-gluejob:** encrypted bucket in existing job integ test ([#504](https://github.com/awslabs/aws-solutions-constructs/issues/504)) ([04d0642](https://github.com/awslabs/aws-solutions-constructs/commit/04d06424663b3f7cb5cc4ef6a9995f5eedce1721))
* **aws-kinesisstreams-kinesisfirehose-s3:** added loggingBucketProps and logS3AccessLogs ([#493](https://github.com/awslabs/aws-solutions-constructs/issues/493)) ([85b5f7a](https://github.com/awslabs/aws-solutions-constructs/commit/85b5f7ada3e197dcc83a1ad1bd9e23efedf9f63e))
* **aws-lambda-s3:** added logS3AccessLogs and updated tests ([#496](https://github.com/awslabs/aws-solutions-constructs/issues/496)) ([9922938](https://github.com/awslabs/aws-solutions-constructs/commit/992293810b92b3272e08e6b408c868243007049e))
* **aws-s3-sqs:** added logS3AccessLogs and S3BucketInterface ([#499](https://github.com/awslabs/aws-solutions-constructs/issues/499)) ([c8320bd](https://github.com/awslabs/aws-solutions-constructs/commit/c8320bdd9cc47e519556a40b2a2e7f163922edc7))
* **aws-s3-stepfunctions:** added logS3AccessLogs and S3BucketInterface ([#500](https://github.com/awslabs/aws-solutions-constructs/issues/500)) ([d7d10f6](https://github.com/awslabs/aws-solutions-constructs/commit/d7d10f683e74276e1f737db8fbac434e0b48cd5e))


### Bug Fixes

* **Update reference from existingBucketInterface to existingBucketObj:** Update Documentation [#520](https://github.com/awslabs/aws-solutions-constructs/issues/520) ([0c030e8](https://github.com/awslabs/aws-solutions-constructs/commit/0c030e82a83ffffd61b0ede90b379e7903008ab8))

## [2.0.0-rc.2](https://github.com/awslabs/aws-solutions-constructs/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2021-11-02)

### Features
Expand Down
2 changes: 1 addition & 1 deletion deployment/v2/align-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const findVersion = process.argv[2];
const replaceVersion = process.argv[3];

// these versions need to be sourced from a config file
const awsCdkLibVersion = '2.0.0-rc.23';
const awsCdkLibVersion = '2.0.0-rc.26';
const constructsVersion = '10.0.0';
const MODULE_EXEMPTIONS = new Set([
'@aws-cdk/cloudformation-diff',
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.129.0"
"version": "1.130.0"
}
2 changes: 1 addition & 1 deletion source/lerna.v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"./patterns/@aws-solutions-constructs/*"
],
"rejectCycles": "true",
"version": "2.0.0-rc.2"
"version": "2.0.0"
}
4 changes: 2 additions & 2 deletions source/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"eslint-plugin-license-header": "^0.2.0",
"fs-extra": "^8.1.0",
"jest": "^26.6.0",
"jsii": "^1.11.0",
"jsii-pacmak": "^1.11.0",
"jsii": "1.47.0",
"jsii-pacmak": "1.47.0",
"tslint": "^5.20.1",
"typescript": "~3.9.7"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import * as lambda from "@aws-cdk/aws-lambda";
import { Construct } from "@aws-cdk/core";
import * as defaults from "@aws-solutions-constructs/core";
import { CfnListener, CfnTargetGroup } from "@aws-cdk/aws-elasticloadbalancingv2";
import { GetActiveListener } from "@aws-solutions-constructs/core";

export interface AlbToLambdaProps {
/**
Expand Down Expand Up @@ -199,56 +200,41 @@ export class AlbToLambda extends Construct {
vpc: this.vpc,
});

let newListener: boolean;
if (this.loadBalancer.listeners.length === 0) {
// This is a new listener, we need to create it along with the default target
const newTargetGroup = defaults.CreateLambdaTargetGroup(this,
`tg${this.loadBalancer.listeners.length + 1}`,
this.lambdaFunction,
props.targetProps);
newListener = true;
} else {
newListener = false;
}

// If there's no listener, then we add one here
if (newListener) {
this.listener = defaults.AddListener(
this,
this.loadBalancer,
newTargetGroup,
props.listenerProps
);
// Testing occasionally caused a TargetGroup not found error, this
// code ensures the Group will be complete before the Listener tries
// to access it.
const newListener = this.listener.node.defaultChild as CfnListener;
const cfnTargetGroup = newTargetGroup.node.defaultChild as CfnTargetGroup;
newListener.addDependsOn(cfnTargetGroup);
} else {
// We're adding a target to an existing listener. If this.loadBalancer.listeners.length
// is >0, then this.loadBalancer was set from existingLoadBalancer
this.listener = GetActiveListener(this.loadBalancer.listeners);
defaults.AddTarget(
this,
defaults.CreateLambdaTargetGroup(
this,
`tg${this.loadBalancer.listeners.length + 1}`,
this.lambdaFunction,
props.targetProps
),
this.listener,
props.ruleProps
);
}
}
}

function GetActiveListener(listeners: elb.ApplicationListener[]): elb.ApplicationListener {
let listener: elb.ApplicationListener;

if (listeners.length === 1 ) {
listener = listeners[0];
} else {
const correctListener = listeners.find(i => (i.node.children[0] as elb.CfnListener).protocol === "HTTPS");
if (correctListener) {
listener = correctListener;
} else {
// This line should be unreachable
throw new Error(`Two listeners in the ALB, but neither are HTTPS`);
const newTargetGroup = defaults.AddLambdaTarget(
this,
`tg${this.loadBalancer.listeners.length + 1}`,
this.listener,
this.lambdaFunction,
props.ruleProps,
props.targetProps);

// this.listener needs to be set on the construct.
// could be above: else { defaults.GetActiveListener }
// do we then move that funcionality back into the construct (not the function). If so do
// we leave it in AddNewTarget or just do it here and pass the listener?
if (newListener && this.listener) {
const levelOneListener = this.listener.node.defaultChild as CfnListener;
const cfnTargetGroup = newTargetGroup.node.defaultChild as CfnTargetGroup;
levelOneListener.addDependsOn(cfnTargetGroup);
}

}
return listener;
}
Original file line number Diff line number Diff line change
Expand Up @@ -1084,32 +1084,13 @@
}
}
},
"testonetg1tgDC5C1350": {
"Type": "AWS::ElasticLoadBalancingV2::TargetGroup",
"Properties": {
"Targets": [
{
"Id": {
"Fn::GetAtt": [
"LambdaFunctionBF21E41F",
"Arn"
]
}
}
],
"TargetType": "lambda"
},
"DependsOn": [
"LambdaFunctionInvokeServicePrincipalelasticloadbalancingamazonawscom842E1595"
]
},
"testonelistener5EBC4D40": {
"Type": "AWS::ElasticLoadBalancingV2::Listener",
"Properties": {
"DefaultActions": [
{
"TargetGroupArn": {
"Ref": "testonetg1tgDC5C1350"
"Ref": "testonetg2tg6459EC7C"
},
"Type": "forward"
}
Expand All @@ -1121,7 +1102,7 @@
"Protocol": "HTTP"
},
"DependsOn": [
"testonetg1tgDC5C1350"
"testonetg2tg6459EC7C"
],
"Metadata": {
"cfn_nag": {
Expand All @@ -1133,13 +1114,32 @@
]
}
}
},
"testonetg2tg6459EC7C": {
"Type": "AWS::ElasticLoadBalancingV2::TargetGroup",
"Properties": {
"Targets": [
{
"Id": {
"Fn::GetAtt": [
"LambdaFunctionBF21E41F",
"Arn"
]
}
}
],
"TargetType": "lambda"
},
"DependsOn": [
"LambdaFunctionInvokeServicePrincipalelasticloadbalancingamazonawscom842E1595"
]
}
},
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store."
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
}
},
"Rules": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -435,32 +435,13 @@
"Principal": "elasticloadbalancing.amazonaws.com"
}
},
"testonetg1tgDC5C1350": {
"Type": "AWS::ElasticLoadBalancingV2::TargetGroup",
"Properties": {
"Targets": [
{
"Id": {
"Fn::GetAtt": [
"testoneLambdaFunctionCC9B03E1",
"Arn"
]
}
}
],
"TargetType": "lambda"
},
"DependsOn": [
"testoneLambdaFunctionInvokeServicePrincipalelasticloadbalancingamazonawscom776E5E70"
]
},
"testonelistener5EBC4D40": {
"Type": "AWS::ElasticLoadBalancingV2::Listener",
"Properties": {
"DefaultActions": [
{
"TargetGroupArn": {
"Ref": "testonetg1tgDC5C1350"
"Ref": "testonetg2tg6459EC7C"
},
"Type": "forward"
}
Expand All @@ -472,7 +453,7 @@
"Protocol": "HTTP"
},
"DependsOn": [
"testonetg1tgDC5C1350"
"testonetg2tg6459EC7C"
],
"Metadata": {
"cfn_nag": {
Expand All @@ -485,6 +466,25 @@
}
}
},
"testonetg2tg6459EC7C": {
"Type": "AWS::ElasticLoadBalancingV2::TargetGroup",
"Properties": {
"Targets": [
{
"Id": {
"Fn::GetAtt": [
"testoneLambdaFunctionCC9B03E1",
"Arn"
]
}
}
],
"TargetType": "lambda"
},
"DependsOn": [
"testoneLambdaFunctionInvokeServicePrincipalelasticloadbalancingamazonawscom776E5E70"
]
},
"Vpc8378EB38": {
"Type": "AWS::EC2::VPC",
"Properties": {
Expand Down Expand Up @@ -762,7 +762,7 @@
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store."
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
}
},
"Rules": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1084,32 +1084,13 @@
}
}
},
"testonetg1tgDC5C1350": {
"Type": "AWS::ElasticLoadBalancingV2::TargetGroup",
"Properties": {
"Targets": [
{
"Id": {
"Fn::GetAtt": [
"LambdaFunctionBF21E41F",
"Arn"
]
}
}
],
"TargetType": "lambda"
},
"DependsOn": [
"LambdaFunctionInvokeServicePrincipalelasticloadbalancingamazonawscom842E1595"
]
},
"testonelistener5EBC4D40": {
"Type": "AWS::ElasticLoadBalancingV2::Listener",
"Properties": {
"DefaultActions": [
{
"TargetGroupArn": {
"Ref": "testonetg1tgDC5C1350"
"Ref": "testonetg2tg6459EC7C"
},
"Type": "forward"
}
Expand All @@ -1121,7 +1102,7 @@
"Protocol": "HTTP"
},
"DependsOn": [
"testonetg1tgDC5C1350"
"testonetg2tg6459EC7C"
],
"Metadata": {
"cfn_nag": {
Expand All @@ -1133,13 +1114,32 @@
]
}
}
},
"testonetg2tg6459EC7C": {
"Type": "AWS::ElasticLoadBalancingV2::TargetGroup",
"Properties": {
"Targets": [
{
"Id": {
"Fn::GetAtt": [
"LambdaFunctionBF21E41F",
"Arn"
]
}
}
],
"TargetType": "lambda"
},
"DependsOn": [
"LambdaFunctionInvokeServicePrincipalelasticloadbalancingamazonawscom842E1595"
]
}
},
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store."
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
}
},
"Rules": {
Expand Down
Loading

0 comments on commit 54109b0

Please sign in to comment.