Skip to content

Commit

Permalink
chore(release): 2.19.0 (#19671)
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Apr 1, 2022
2 parents abc1c89 + a5759f3 commit e0d3e62
Show file tree
Hide file tree
Showing 119 changed files with 1,527 additions and 5,519 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.v2.alpha.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@

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.19.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.18.0-alpha.0...v2.19.0-alpha.0) (2022-03-30)
## [2.19.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.18.0-alpha.0...v2.19.0-alpha.0) (2022-03-31)


### Features

* **kinesisanalytics-flink:** Add metrics to Flink applications ([#19599](https://github.com/aws/aws-cdk/issues/19599)) ([dab6aca](https://github.com/aws/aws-cdk/commit/dab6aca5005c8d6d180aada699a4cebc2ef5aefa))

## [2.18.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.17.0-alpha.0...v2.18.0-alpha.0) (2022-03-28)

Expand Down
15 changes: 12 additions & 3 deletions CHANGELOG.v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +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.19.0](https://github.com/aws/aws-cdk/compare/v2.18.0...v2.19.0) (2022-03-30)
## [2.19.0](https://github.com/aws/aws-cdk/compare/v2.18.0...v2.19.0) (2022-03-31)


### Features

* add new integration test runner ([#19529](https://github.com/aws/aws-cdk/issues/19529)) ([e7f43d1](https://github.com/aws/aws-cdk/commit/e7f43d1a3bb52bbf589d7472c9a9b89e3c1cc8c1))
* **aws-ec2:** Enable/disable EC2 "Detailed Monitoring" ([#19437](https://github.com/aws/aws-cdk/issues/19437)) ([94f9d27](https://github.com/aws/aws-cdk/commit/94f9d27e626bced5fc68a6ebbd653fea21c6e21e))
* **core:** add size.isUnresolved ([#19569](https://github.com/aws/aws-cdk/issues/19569)) ([ed26731](https://github.com/aws/aws-cdk/commit/ed26731a0a6263482d76441fc06e9607963ac838))
* **ecs-patterns:** PlacementStrategy and PlacementConstraint for many patterns ([#19612](https://github.com/aws/aws-cdk/issues/19612)) ([0096e67](https://github.com/aws/aws-cdk/commit/0096e672e02123a2ae4e094ba9bb11af3aef20b2))
* **elbv2:** use `addAction()` on an imported application listener ([#19293](https://github.com/aws/aws-cdk/issues/19293)) ([18a6b0c](https://github.com/aws/aws-cdk/commit/18a6b0cecb5e8a419d09a1456953cb2f422a6d76)), closes [#10902](https://github.com/aws/aws-cdk/issues/10902)
* **lambda:** warn if you use `function.grantInvoke` while also using `currentVersion` ([#19464](https://github.com/aws/aws-cdk/issues/19464)) ([fd1fff9](https://github.com/aws/aws-cdk/commit/fd1fff904a70d18dc9c7863aefc03b3ee44c2863)), closes [#19273](https://github.com/aws/aws-cdk/issues/19273) [#19318](https://github.com/aws/aws-cdk/issues/19318)


### Bug Fixes

* **aws-cdk:** include nested stacks when building changesets ([#19494](https://github.com/aws/aws-cdk/issues/19494)) ([97cc8e2](https://github.com/aws/aws-cdk/commit/97cc8e29e155b222d553b1fe955a0302036feed5)), closes [#5722](https://github.com/aws/aws-cdk/issues/5722) [#17396](https://github.com/aws/aws-cdk/issues/17396) [#19224](https://github.com/aws/aws-cdk/issues/19224)
* **apigateway:** allow using GENERATE_IF_NEEDED for the physical name in LambdaRestApi ([#19638](https://github.com/aws/aws-cdk/issues/19638)) ([e817381](https://github.com/aws/aws-cdk/commit/e8173812aad5f482b1bfcc6737f63cfef0c4841c)), closes [#9374](https://github.com/aws/aws-cdk/issues/9374)
* **apigateway:** id in schema model maps to $id ([#15113](https://github.com/aws/aws-cdk/issues/15113)) ([ac5a345](https://github.com/aws/aws-cdk/commit/ac5a3458fe3687014166b20aefe30442867d162a)), closes [#14585](https://github.com/aws/aws-cdk/issues/14585)
* **aws-cognito:** Lambda::Permission of lambdaTrigger should have a SourceArn ([#19622](https://github.com/aws/aws-cdk/issues/19622)) ([c62eeb7](https://github.com/aws/aws-cdk/commit/c62eeb7162d85c8cb162f8c0ad4b93fb5bccf981)), closes [#19604](https://github.com/aws/aws-cdk/issues/19604)
* **docdb:** DB Instance ARN uses 'docdb' as the service component instead of 'rds' ([#19555](https://github.com/aws/aws-cdk/issues/19555)) ([6a63924](https://github.com/aws/aws-cdk/commit/6a63924c0b184342befd92903b8867e45b158252)), closes [#19554](https://github.com/aws/aws-cdk/issues/19554)
* **eks:** incorrect version of aws-node-termination-handler ([#19510](https://github.com/aws/aws-cdk/issues/19510)) ([9c712cc](https://github.com/aws/aws-cdk/commit/9c712cc457ccb80d7180fee67a101b76fc01d207))
* **elbv2:** unable to add multiple certificates to NLB ([#19289](https://github.com/aws/aws-cdk/issues/19289)) ([e8142e9](https://github.com/aws/aws-cdk/commit/e8142e944ac5fae9948e5c010fe475806b83c94b)), closes [#13490](https://github.com/aws/aws-cdk/issues/13490) [#8918](https://github.com/aws/aws-cdk/issues/8918) [#15328](https://github.com/aws/aws-cdk/issues/15328)
* **rds:** `SnapshotCredentials.fromSecret()` takes a `Secret`, not `ISecret` ([#19639](https://github.com/aws/aws-cdk/issues/19639)) ([a74d82e](https://github.com/aws/aws-cdk/commit/a74d82e667ba3cfbb3341392f7c641b0e29d47f0)), closes [#19409](https://github.com/aws/aws-cdk/issues/19409)


## [2.18.0](https://github.com/aws/aws-cdk/compare/v2.17.0...v2.18.0) (2022-03-28)

Expand Down
14 changes: 9 additions & 5 deletions allowed-breaking-changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,20 @@ strengthened:@aws-cdk/aws-stepfunctions-tasks.BatchSubmitJobProps
removed:@aws-cdk/aws-lambda-event-sources.ManagedKafkaEventSourceProps.cluster
strengthened:@aws-cdk/aws-lambda-event-sources.ManagedKafkaEventSourceProps

# Remove IO2 from autoscaling EbsDeviceVolumeType. This value is not supported
# Remove IO2 from autoscaling EbsDeviceVolumeType. This value is not supported
# at the moment and was not supported in the past.
removed:@aws-cdk/aws-autoscaling.EbsDeviceVolumeType.IO2

# Remove autoTerminationPolicy from stepfunctions-tasks EmrCreateClusterProps. This value is not supported by stepfunctions at the moment and was not supported in the past.
removed:@aws-cdk/aws-stepfunctions-tasks.EmrCreateCluster.AutoTerminationPolicyProperty
removed:@aws-cdk/aws-stepfunctions-tasks.EmrCreateClusterProps.autoTerminationPolicy

# Changed property securityGroupId to optional because either securityGroupId or
# Changed property securityGroupId to optional because either securityGroupId or
# securityGroupName is required. Therefore securityGroupId is no longer mandatory.
weakened:@aws-cdk/cloud-assembly-schema.SecurityGroupContextQuery

# refactor autoscaling lifecycle hook target bind() methods to make role optional by
# having bind() methods create the role if it isn't passed to them
# having bind() methods create the role if it isn't passed to them
incompatible-argument:@aws-cdk/aws-autoscaling-hooktargets.FunctionHook.bind
incompatible-argument:@aws-cdk/aws-autoscaling-hooktargets.QueueHook.bind
incompatible-argument:@aws-cdk/aws-autoscaling-hooktargets.TopicHook.bind
Expand All @@ -106,7 +106,7 @@ removed:@aws-cdk/aws-lambda-event-sources.ManagedKafkaEventSourceProps.maxRecord
removed:@aws-cdk/aws-lambda-event-sources.ManagedKafkaEventSourceProps.parallelizationFactor
removed:@aws-cdk/aws-lambda-event-sources.ManagedKafkaEventSourceProps.reportBatchItemFailures
removed:@aws-cdk/aws-lambda-event-sources.ManagedKafkaEventSourceProps.retryAttempts
removed:@aws-cdk/aws-lambda-event-sources.ManagedKafkaEventSourceProps.tumblingWindow
removed:@aws-cdk/aws-lambda-event-sources.ManagedKafkaEventSourceProps.tumblingWindow
removed:@aws-cdk/aws-lambda-event-sources.SelfManagedKafkaEventSourceProps.bisectBatchOnError
removed:@aws-cdk/aws-lambda-event-sources.SelfManagedKafkaEventSourceProps.maxRecordAge
removed:@aws-cdk/aws-lambda-event-sources.SelfManagedKafkaEventSourceProps.parallelizationFactor
Expand All @@ -125,4 +125,8 @@ changed-type:@aws-cdk/aws-elasticloadbalancingv2.NetworkLoadBalancer.vpc
# removed methods and properties related to event bridge notifications for S3 buckets as they are not yet supported (19 Jan 2022)
removed:@aws-cdk/aws-s3.Bucket.enableEventBridgeNotification
removed:@aws-cdk/aws-s3.BucketBase.enableEventBridgeNotification
removed:@aws-cdk/aws-s3.BucketProps.eventBridgeEnabled
removed:@aws-cdk/aws-s3.BucketProps.eventBridgeEnabled

# changed the type of RDS's SnapshotCredentials.secret from Secret to ISecret,
# shouldn't matter
changed-type:@aws-cdk/aws-rds.SnapshotCredentials.secret
9 changes: 6 additions & 3 deletions packages/@aws-cdk/aws-apigateway/lib/restapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,11 @@ export abstract class RestApiBase extends Resource implements IRestApi {
protected cloudWatchAccount?: CfnAccount;

constructor(scope: Construct, id: string, props: RestApiBaseProps = { }) {
super(scope, id);
this.restApiName = props.restApiName ?? id;
const restApiName = props.restApiName ?? id;
super(scope, id, {
physicalName: restApiName,
});
this.restApiName = restApiName;

Object.defineProperty(this, RESTAPI_SYMBOL, { value: true });
}
Expand Down Expand Up @@ -736,7 +739,7 @@ export class RestApi extends RestApiBase {
super(scope, id, props);

const resource = new CfnRestApi(this, 'Resource', {
name: this.restApiName,
name: this.physicalName,
description: props.description,
policy: props.policy,
failOnWarnings: props.failOnWarnings,
Expand Down
1 change: 0 additions & 1 deletion packages/@aws-cdk/aws-apigateway/lib/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ export class JsonSchemaMapper {
private static readonly SchemaPropsWithPrefix: { [key: string]: string } = {
schema: '$schema',
ref: '$ref',
id: '$id',
};
// The value indicates whether direct children should be key-mapped.
private static readonly SchemaPropsWithUserDefinedChildren: { [key: string]: boolean } = {
Expand Down
20 changes: 20 additions & 0 deletions packages/@aws-cdk/aws-apigateway/test/lambda-api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,24 @@ describe('lambda api', () => {
],
});
});

test('LambdaRestApi allows passing GENERATE_IF_NEEDED as the physical name', () => {
// GIVEN
const stack = new cdk.Stack();

// WHEN
new apigw.LambdaRestApi(stack, 'lambda-rest-api', {
handler: new lambda.Function(stack, 'handler', {
handler: 'index.handler',
code: lambda.Code.fromInline('boom'),
runtime: lambda.Runtime.NODEJS_10_X,
}),
restApiName: cdk.PhysicalName.GENERATE_IF_NEEDED,
});

// THEN
Template.fromStack(stack).hasResourceProperties('AWS::ApiGateway::RestApi', {
Name: Match.absent(),
});
});
});
15 changes: 14 additions & 1 deletion packages/@aws-cdk/aws-apigateway/test/util.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { JsonSchema, JsonSchemaType } from '../lib';
import { JsonSchema, JsonSchemaType, JsonSchemaVersion } from '../lib';
import { JsonSchemaMapper, parseAwsApiCall, parseMethodOptionsPath } from '../lib/util';

describe('util', () => {
Expand Down Expand Up @@ -136,5 +136,18 @@ describe('util', () => {
default: 'blue',
});
});

test('"id" maps to "id" when using DRAFT-04', () => {
const schema: JsonSchema = {
schema: JsonSchemaVersion.DRAFT4,
id: 'http://json-schema.org/draft-04/schema#',
};

const actual = JsonSchemaMapper.toCfnJsonSchema(schema);
expect(actual).toEqual({
$schema: 'http://json-schema.org/draft-04/schema#',
id: 'http://json-schema.org/draft-04/schema#',
});
});
});
});
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-cognito/lib/user-pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ export class UserPool extends UserPoolBase {
const capitalize = name.charAt(0).toUpperCase() + name.slice(1);
fn.addPermission(`${capitalize}Cognito`, {
principal: new ServicePrincipal('cognito-idp.amazonaws.com'),
sourceArn: this.userPoolArn,
sourceArn: Lazy.string({ produce: () => this.userPoolArn }),
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,13 @@
"Arn"
]
},
"Principal": "cognito-idp.amazonaws.com"
"Principal": "cognito-idp.amazonaws.com",
"SourceArn": {
"Fn::GetAtt": [
"pool056F3F7E",
"Arn"
]
}
}
},
"keyFEDD6EC0": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,13 @@
"Arn"
]
},
"Principal": "cognito-idp.amazonaws.com"
"Principal": "cognito-idp.amazonaws.com",
"SourceArn": {
"Fn::GetAtt": [
"myuserpool01998219",
"Arn"
]
}
}
},
"customMessageServiceRoleB4AE7F17": {
Expand Down Expand Up @@ -125,7 +131,13 @@
"Arn"
]
},
"Principal": "cognito-idp.amazonaws.com"
"Principal": "cognito-idp.amazonaws.com",
"SourceArn": {
"Fn::GetAtt": [
"myuserpool01998219",
"Arn"
]
}
}
},
"defineAuthChallengeServiceRole9E2D15DF": {
Expand Down Expand Up @@ -189,7 +201,13 @@
"Arn"
]
},
"Principal": "cognito-idp.amazonaws.com"
"Principal": "cognito-idp.amazonaws.com",
"SourceArn": {
"Fn::GetAtt": [
"myuserpool01998219",
"Arn"
]
}
}
},
"postAuthenticationServiceRole5B3B242A": {
Expand Down Expand Up @@ -253,7 +271,13 @@
"Arn"
]
},
"Principal": "cognito-idp.amazonaws.com"
"Principal": "cognito-idp.amazonaws.com",
"SourceArn": {
"Fn::GetAtt": [
"myuserpool01998219",
"Arn"
]
}
}
},
"postConfirmationServiceRole864BE5F9": {
Expand Down Expand Up @@ -317,7 +341,13 @@
"Arn"
]
},
"Principal": "cognito-idp.amazonaws.com"
"Principal": "cognito-idp.amazonaws.com",
"SourceArn": {
"Fn::GetAtt": [
"myuserpool01998219",
"Arn"
]
}
}
},
"preAuthenticationServiceRole9712F4D8": {
Expand Down Expand Up @@ -381,7 +411,13 @@
"Arn"
]
},
"Principal": "cognito-idp.amazonaws.com"
"Principal": "cognito-idp.amazonaws.com",
"SourceArn": {
"Fn::GetAtt": [
"myuserpool01998219",
"Arn"
]
}
}
},
"preSignUpServiceRole0A7E91EB": {
Expand Down Expand Up @@ -445,7 +481,13 @@
"Arn"
]
},
"Principal": "cognito-idp.amazonaws.com"
"Principal": "cognito-idp.amazonaws.com",
"SourceArn": {
"Fn::GetAtt": [
"myuserpool01998219",
"Arn"
]
}
}
},
"preTokenGenerationServiceRole430C3D14": {
Expand Down Expand Up @@ -509,7 +551,13 @@
"Arn"
]
},
"Principal": "cognito-idp.amazonaws.com"
"Principal": "cognito-idp.amazonaws.com",
"SourceArn": {
"Fn::GetAtt": [
"myuserpool01998219",
"Arn"
]
}
}
},
"userMigrationServiceRole091766B0": {
Expand Down Expand Up @@ -573,7 +621,13 @@
"Arn"
]
},
"Principal": "cognito-idp.amazonaws.com"
"Principal": "cognito-idp.amazonaws.com",
"SourceArn": {
"Fn::GetAtt": [
"myuserpool01998219",
"Arn"
]
}
}
},
"verifyAuthChallengeResponseServiceRole7077884C": {
Expand Down Expand Up @@ -637,7 +691,13 @@
"Arn"
]
},
"Principal": "cognito-idp.amazonaws.com"
"Principal": "cognito-idp.amazonaws.com",
"SourceArn": {
"Fn::GetAtt": [
"myuserpool01998219",
"Arn"
]
}
}
},
"myuserpoolsmsRole0E16FDD9": {
Expand Down
10 changes: 7 additions & 3 deletions packages/@aws-cdk/aws-cognito/test/user-pool.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ describe('User Pool', () => {
const fn = fooFunction(stack, 'preSignUp');

// WHEN
new UserPool(stack, 'Pool', {
const pool = new UserPool(stack, 'Pool', {
lambdaTriggers: {
preSignUp: fn,
},
Expand All @@ -351,6 +351,7 @@ describe('User Pool', () => {
Action: 'lambda:InvokeFunction',
FunctionName: stack.resolve(fn.functionArn),
Principal: 'cognito-idp.amazonaws.com',
SourceArn: stack.resolve(pool.userPoolArn),
});
});

Expand All @@ -362,7 +363,7 @@ describe('User Pool', () => {
const smsFn = fooFunction(stack, 'customSmsSender');

// WHEN
new UserPool(stack, 'Pool', {
const pool = new UserPool(stack, 'Pool', {
customSenderKmsKey: kmsKey,
lambdaTriggers: {
customEmailSender: emailFn,
Expand All @@ -387,11 +388,13 @@ describe('User Pool', () => {
Action: 'lambda:InvokeFunction',
FunctionName: stack.resolve(emailFn.functionArn),
Principal: 'cognito-idp.amazonaws.com',
SourceArn: stack.resolve(pool.userPoolArn),
});
Template.fromStack(stack).hasResourceProperties('AWS::Lambda::Permission', {
Action: 'lambda:InvokeFunction',
FunctionName: stack.resolve(smsFn.functionArn),
Principal: 'cognito-idp.amazonaws.com',
SourceArn: stack.resolve(pool.userPoolArn),
});
});

Expand Down Expand Up @@ -479,6 +482,7 @@ describe('User Pool', () => {
Action: 'lambda:InvokeFunction',
FunctionName: stack.resolve(fn.functionArn),
Principal: 'cognito-idp.amazonaws.com',
SourceArn: stack.resolve(pool.userPoolArn),
});
});
});
Expand Down Expand Up @@ -1760,4 +1764,4 @@ function fooFunction(scope: Construct, name: string): lambda.IFunction {

function fooKey(scope: Construct, name: string): kms.Key {
return new kms.Key(scope, name);
}
}
Loading

0 comments on commit e0d3e62

Please sign in to comment.