Skip to content

Commit

Permalink
Merge pull request #970 from awslabs/bump/2.40.0
Browse files Browse the repository at this point in the history
chore(release): 2.40.0
  • Loading branch information
biffgaut authored Jun 3, 2023
2 parents 316fb15 + 4cd3f8f commit 6481bdd
Show file tree
Hide file tree
Showing 171 changed files with 8,065 additions and 1,192 deletions.
28 changes: 10 additions & 18 deletions .viperlightignore
Original file line number Diff line number Diff line change
Expand Up @@ -145,26 +145,18 @@ source/patterns/@aws-solutions-constructs/aws-alb-lambda/README.md:35
source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/alb-lambda.test.ts:27
source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/alb-lambda.test.ts:680
# These are references to the us-east-1 ELBV2 account (publicly known)
source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.deployPrivateApi.expected.json:196
source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.deployPrivateApiExistingZone.expected.json:911
source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.deployPublicApiNewAlb.expected.json:240
source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.privateApiNewResources.expected.json:199
source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.publicApiNewResources.expected.json:202
source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.twoTargets.expected.json:202
source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.privateApiExistingResources.expected.json:1067
source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.publicApiExistingResources.expected.json:1067
source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.deployPrivateApi.expected.json:235
source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.deployPrivateApiExistingZone.expected.json:904
source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.deployPublicApiNewAlb.expected.json:233
source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.privateApiNewResources.expected.json:238
source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.publicApiNewResources.expected.json:244
source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.twoTargets.expected.json:244
source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.privateApiExistingResources.expected.json:1132
source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.publicApiExistingResources.expected.json:1132
source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.all-new-two-targets.expected.json:1034
source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.all-new-public-http.expected.json:1007
source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.deployPrivateApi.expected.json:242
source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.deployPrivateApiExistingZone.expected.json:899
source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.all-new-public-http.expected.json:1062
source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.deployPublicApiNewAlb.expected.json:237
source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.privateApiNewResources.expected.json:245
source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.publicApiNewResources.expected.json:251
source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.twoTargets.expected.json:251
source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.privateApiExistingResources.expected.json:1139
source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.publicApiExistingResources.expected.json:1139
source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.all-new-two-targets.expected.json:1096
source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.all-new-public-http.expected.json:1069
source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.all-new-two-targets.expected.json:1089
source/patterns/@aws-solutions-constructs/aws-alb-fargate/README.md:79
source/patterns/@aws-solutions-constructs/aws-alb-lambda/README.md:85
source/patterns/@aws-solutions-constructs/aws-route53-alb/README.md:60
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

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.40.0](https://github.com/awslabs/aws-solutions-constructs/compare/v2.39.0...v2.40.0) (2023-06-03)


### Bug Fixes

* **s3 buckets:** do not remove lifecycle rules from log buckets ([#969](https://github.com/awslabs/aws-solutions-constructs/issues/969))

* **aws-alb-fargate:** change container used to launch integ tests ([#962](https://github.com/awslabs/aws-solutions-constructs/issues/962)) ([30ba7d9](https://github.com/awslabs/aws-solutions-constructs/commit/30ba7d94a3cdd3766c24af49dbf66e56053b7b41))

## [2.39.0](https://github.com/awslabs/aws-solutions-constructs/compare/v2.38.0...v2.39.0) (2023-04-23)

Built on CDK v2.76.0
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ The AWS Solutions Constructs library is an open-source extension of the AWS Clou

The patterns defined in AWS Solutions Constructs are high level, multi-service abstractions of AWS CDK constructs that have default configurations based on well-architected best practices. The library is organized into logical modules using object-oriented techniques to create each architectural pattern model.

The CDK is available in the following languages:
## CDK Versions

* JavaScript, TypeScript (Node.js ≥ 10.13.0)
* Python (Python ≥ 3.6)
* Java (Java ≥ 8 and Maven ≥ 3.5.4)
AWS Solutions Constructs and the AWS CDK are independent teams and have different release schedules. Each release of AWS Solutions Constructs is built against a specific version of the AWS CDK. The CHANGELOG.md file lists the CDK version associated with each AWS Solutions Constructs release. For instance, AWS Solutions Constructs v2.39.0 was built against AWS CDK v2.76.0. This means that to use AWS Solutions Constructs v2.39.0, your application must include AWS CDK v2.76.0 *or later*. You can continue to use the latest AWS CDK versions and upgrade the your AWS Solutions Constructs version when new releases become available.

## Modules

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.76.0';
const awsCdkLibVersion = '2.82.0';
const constructsVersion = '10.0.0';
const MODULE_EXEMPTIONS = new Set([
'@aws-cdk/cloudformation-diff',
Expand Down
46 changes: 46 additions & 0 deletions refresh-multiple-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# How to use this script
#
# This script will refresh integration tests for multiple
# Solutions Constructs sequentially and unattended. If you're
# doing a release and have to update many integration tests, this is
# for you.

# Open a docker build environment
# Run build-patterns.sh through at least the building of core, then you can ctrl-c
# List all the constructs whose integration tests you want to refresh in the
# export constructs list (you can delete the examples that are there)
# Run this script from the top level aws-solutions-constructs folder.
#
# Advanced use - if you have too many constructs to wait for, you can create
# another copy of this script to run concurrently with a different list of constructs
# 1) Remove the align-version.sh revert lines from this script and the copy
# 2) Remove source allow-partial-builds.sh line from the copy
# 3) Keep any dependencies together and in order
# (e.g. dynamodbstreams-lambda-elasticsearch must be built AFTER
# dynamodbstreams-lambda and lambda-elasticsearch)

export constructs="
aws-s3-lambda
aws-s3-sns
aws-s3-sqs
aws-s3-stepfunctions
aws-lambda-s3
aws-fargate-s3
aws-cloudfront-s3
"

# deployment_dir is top level aws-solutions-constructs
deployment_dir=$(cd $(dirname $0) && pwd)

source ./deployment/v2/allow-partial-builds.sh
for construct in $constructs; do

cd $deployment_dir/source/patterns/@aws-solutions-constructs/$construct
echo Running in $PWD
npm run jsii && npm run lint
cdk-integ
npm run build+lint+test
cd $deployment_dir/source/patterns/@aws-solutions-constructs
done
cd $deployment_dir
./deployment/v2/align-version.sh revert
6 changes: 6 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ sonar.javascript.lcov.reportPaths= \
source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/coverage/lcov.info, \
source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/coverage/lcov.info, \
source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/coverage/lcov.info, \
source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/coverage/lcov.info, \
source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/coverage/lcov.info, \
source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/coverage/lcov.info, \
source/patterns/@aws-solutions-constructs/aws-fargate-s3/coverage/lcov.info, \
source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/coverage/lcov.info, \
source/patterns/@aws-solutions-constructs/aws-fargate-sns/coverage/lcov.info, \
Expand All @@ -66,6 +69,8 @@ sonar.javascript.lcov.reportPaths= \
source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/coverage/lcov.info, \
source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/coverage/lcov.info, \
source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/coverage/lcov.info, \
source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/coverage/lcov.info, \
source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/coverage/lcov.info, \
source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/coverage/lcov.info, \
source/patterns/@aws-solutions-constructs/aws-lambda-s3/coverage/lcov.info, \
source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/coverage/lcov.info, \
Expand All @@ -78,6 +83,7 @@ sonar.javascript.lcov.reportPaths= \
source/patterns/@aws-solutions-constructs/aws-route53-alb/coverage/lcov.info, \
source/patterns/@aws-solutions-constructs/aws-route53-apigateway/coverage/lcov.info, \
source/patterns/@aws-solutions-constructs/aws-s3-lambda/coverage/lcov.info, \
source/patterns/@aws-solutions-constructs/aws-s3-sns/coverage/lcov.info, \
source/patterns/@aws-solutions-constructs/aws-s3-sqs/coverage/lcov.info, \
source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/coverage/lcov.info, \
source/patterns/@aws-solutions-constructs/aws-sns-lambda/coverage/lcov.info, \
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": "2.39.0"
"version": "2.40.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -177,16 +177,14 @@ export class AlbToFargate extends Construct {
});

// Set up the ALB
this.loadBalancer = defaults.ObtainAlb(
scope,
`${id}-lb`,
this.vpc,
props.publicApi,
props.existingLoadBalancerObj,
props.loadBalancerProps,
props.logAlbAccessLogs,
props.albLoggingBucketProps
);
this.loadBalancer = defaults.ObtainAlb(scope, `${id}-lb`, {
vpc: this.vpc,
publicApi: props.publicApi,
existingLoadBalancerObj: props.existingLoadBalancerObj,
loadBalancerProps: props.loadBalancerProps,
logAccessLogs: props.logAlbAccessLogs,
loggingBucketProps: props.albLoggingBucketProps
});

const newListener: boolean = this.loadBalancer.listeners.length === 0;

Expand All @@ -207,17 +205,15 @@ export class AlbToFargate extends Construct {
// CheckFargateProps confirms that the container is provided
this.container = props.existingContainerDefinitionObject!;
} else {
const createFargateServiceResponse = defaults.CreateFargateService(
scope,
id,
this.vpc,
props.clusterProps,
props.ecrRepositoryArn,
props.ecrImageVersion,
props.fargateTaskDefinitionProps,
props.containerDefinitionProps,
props.fargateServiceProps
);
const createFargateServiceResponse = defaults.CreateFargateService(scope, id, {
constructVpc: this.vpc,
clientClusterProps: props.clusterProps,
ecrRepositoryArn: props.ecrRepositoryArn,
ecrImageVersion: props.ecrImageVersion,
clientFargateTaskDefinitionProps: props.fargateTaskDefinitionProps,
clientContainerDefinitionProps: props.containerDefinitionProps,
clientFargateServiceProps: props.fargateServiceProps
});
this.service = createFargateServiceResponse.service;
this.container = createFargateServiceResponse.containerDefinition;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,10 @@ test('Test existing load balancer, vpc, service', () => {

const existingVpc = defaults.getTestVpc(stack);

const createFargateServiceResponse = defaults.CreateFargateService(stack,
'test',
existingVpc,
undefined,
defaults.fakeEcrRepoArn);
const createFargateServiceResponse = defaults.CreateFargateService(stack, 'test', {
constructVpc: existingVpc,
ecrRepositoryArn: defaults.fakeEcrRepoArn
});

const existingAlb = new elb.ApplicationLoadBalancer(stack, 'test-alb', {
vpc: existingVpc,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,6 @@
"Ref": "Vpc8378EB38"
},
"ResourceType": "VPC",
"TrafficType": "ALL",
"DeliverLogsPermissionArn": {
"Fn::GetAtt": [
"VpcFlowLogIAMRole6A475D41",
Expand All @@ -667,7 +666,8 @@
"Key": "Name",
"Value": "all-existing-private-http/Vpc"
}
]
],
"TrafficType": "ALL"
}
},
"VpcECRAPI9A3B6A2B": {
Expand Down Expand Up @@ -913,7 +913,7 @@
"ContainerDefinitions": [
{
"Essential": true,
"Image": "nginx",
"Image": "public.ecr.aws/m7z7i5e4/integration-test-image:latest",
"MemoryReservation": 512,
"Name": "test-container",
"PortMappings": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,15 @@ const stack = new Stack(app, defaults.generateIntegStackName(__filename), {
});
stack.templateOptions.description = 'Integration Test for private HTTPS API with existing VPC, LoadBalancer and Service';

const image = ecs.ContainerImage.fromRegistry('nginx');
// This is a minimal web server in our account that passes health checks
const image = ecs.ContainerImage.fromRegistry('public.ecr.aws/m7z7i5e4/integration-test-image:latest');

const testExistingVpc = defaults.getTestVpc(stack);

const createFargateServiceResponse = defaults.CreateFargateService(stack,
'test',
testExistingVpc,
undefined,
undefined,
undefined,
undefined,
{ image }, // contaainer definition props
);
const createFargateServiceResponse = defaults.CreateFargateService(stack, 'test', {
constructVpc: testExistingVpc,
clientContainerDefinitionProps: { image }, // contaainer definition props
});

const existingAlb = new elb.ApplicationLoadBalancer(stack, 'test-alb', {
vpc: testExistingVpc,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,6 @@
"Ref": "Vpc8378EB38"
},
"ResourceType": "VPC",
"TrafficType": "ALL",
"DeliverLogsPermissionArn": {
"Fn::GetAtt": [
"VpcFlowLogIAMRole6A475D41",
Expand All @@ -698,7 +697,8 @@
"Key": "Name",
"Value": "all-new-public-http/Vpc"
}
]
],
"TrafficType": "ALL"
}
},
"VpcECRAPI9A3B6A2B": {
Expand Down Expand Up @@ -1048,14 +1048,7 @@
]
},
{
"Action": [
"s3:PutObject",
"s3:PutObjectLegalHold",
"s3:PutObjectRetention",
"s3:PutObjectTagging",
"s3:PutObjectVersionTagging",
"s3:Abort*"
],
"Action": "s3:PutObject",
"Effect": "Allow",
"Principal": {
"AWS": {
Expand Down Expand Up @@ -1186,7 +1179,7 @@
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1"
},
"S3Key": "e57c1acaa363d7d2b81736776007a7091bc73dff4aeb8135627c4511a51e7dca.zip"
"S3Key": "40aa87cdf43c4095cec18bc443965f22ab2f8c1ace47e482a0ba4e35d83b0cc9.zip"
},
"Timeout": 900,
"MemorySize": 128,
Expand All @@ -1197,7 +1190,7 @@
"Arn"
]
},
"Runtime": "nodejs14.x",
"Runtime": "nodejs16.x",
"Description": {
"Fn::Join": [
"",
Expand Down Expand Up @@ -1375,7 +1368,7 @@
"ContainerDefinitions": [
{
"Essential": true,
"Image": "nginx",
"Image": "public.ecr.aws/m7z7i5e4/integration-test-image:latest",
"MemoryReservation": 512,
"Name": "test-construct-container",
"PortMappings": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ const stack = new Stack(app, generateIntegStackName(__filename), {
});
stack.templateOptions.description = 'Integration Test for public HTTP API with new VPC, LoadBalancer and Service';

const image = ecs.ContainerImage.fromRegistry('nginx');
// This is a minimal web server in our account that passes health checks
const image = ecs.ContainerImage.fromRegistry('public.ecr.aws/m7z7i5e4/integration-test-image:latest');

const testProps: AlbToFargateProps = {
publicApi: true,
Expand Down
Loading

0 comments on commit 6481bdd

Please sign in to comment.