Skip to content

Commit

Permalink
chore(release): 1.42.0 (#8229)
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored May 27, 2020
2 parents 9e071d2 + 96a0893 commit 3b64241
Show file tree
Hide file tree
Showing 134 changed files with 6,184 additions and 473 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ falling prey to the [X/Y problem][2]!

- **CDK CLI Version:** <!-- Output of `cdk version` -->
- **Module Version:** <!-- Version of the module in question -->
- **Node.js Version:** <!-- Version of Node.js (run the command `node -v`) -->
- **OS:** <!-- [all | Windows 10 | OSX Mojave | Ubuntu | etc... ] -->
- **Language:** <!-- [all | TypeScript | Java | Python ] etc... ] -->

Expand Down
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,50 @@

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.42.0](https://github.com/aws/aws-cdk/compare/v1.41.0...v1.42.0) (2020-05-27)


### ⚠ BREAKING CHANGES

* **cloudtrail:** API signatures of `addS3EventSelectors` and
`addLambdaEventSelectors` have changed. Their parameters are now
strongly typed to accept `IBucket` and `IFunction` respectively.
* **cloudtrail:** `addS3EventSelectors` and `addLambdaEventSelectors`
can no longer be used to configure all S3 data events or all Lambda data
events. Two new APIs `logAllS3DataEvents()` and
`logAllLambdaDataEvents()` have been introduced to achieve this.
* **cloudtrail:** The property `snsTopic` is now of the type `ITopic`.

### Features

* **cfnspec:** cloudformation spec v14.4.0 ([#8195](https://github.com/aws/aws-cdk/issues/8195)) ([99e7330](https://github.com/aws/aws-cdk/commit/99e7330fc5fc140964c47d8c6dbaee2b46b382e1))
* **cloudtrail:** create cloudwatch event without needing to create a Trail ([#8076](https://github.com/aws/aws-cdk/issues/8076)) ([0567a23](https://github.com/aws/aws-cdk/commit/0567a2360ac713e3171c9a82767611174dadb6c6)), closes [#6716](https://github.com/aws/aws-cdk/issues/6716)
* **cloudtrail:** user specified log group ([#8079](https://github.com/aws/aws-cdk/issues/8079)) ([0a3785b](https://github.com/aws/aws-cdk/commit/0a3785b7626633fcbdf26ab793c70f2bc017314b)), closes [#6162](https://github.com/aws/aws-cdk/issues/6162)
* **codeguruprofiler:** ProfilingGroup ([#7895](https://github.com/aws/aws-cdk/issues/7895)) ([995088a](https://github.com/aws/aws-cdk/commit/995088abb00d9c75adbb65845998a8328bb5ba14))
* **codepipeline:** use a special bootstrapless synthesizer for cross-region support Stacks ([#8091](https://github.com/aws/aws-cdk/issues/8091)) ([575f1db](https://github.com/aws/aws-cdk/commit/575f1db0474327c61c4ac626608c9f443ce231d2)), closes [#8082](https://github.com/aws/aws-cdk/issues/8082)
* **cognito:** user pool - case sensitivity for sign in ([460394f](https://github.com/aws/aws-cdk/commit/460394f3dc4737cee80504d6c8ef106ecc3b67d5)), closes [#7988](https://github.com/aws/aws-cdk/issues/7988) [#7235](https://github.com/aws/aws-cdk/issues/7235)
* **core:** CfnJson enables intrinsics in hash keys ([#8099](https://github.com/aws/aws-cdk/issues/8099)) ([195cd40](https://github.com/aws/aws-cdk/commit/195cd405d9f0869875de2ec78661aee3af2c7c7d)), closes [#8084](https://github.com/aws/aws-cdk/issues/8084)
* **eks:** improve security using IRSA conditions ([#8084](https://github.com/aws/aws-cdk/issues/8084)) ([35a01a0](https://github.com/aws/aws-cdk/commit/35a01a079af40da291007da08af6690c9a81c101))
* **elbv2:** Supports new types of listener rule conditions ([#7848](https://github.com/aws/aws-cdk/issues/7848)) ([3d30ffa](https://github.com/aws/aws-cdk/commit/3d30ffa38c51ae26686287e993af445ea3067766)), closes [#3888](https://github.com/aws/aws-cdk/issues/3888)
* **secretsmanager:** adds grantWrite to Secret ([#7858](https://github.com/aws/aws-cdk/issues/7858)) ([3fed84b](https://github.com/aws/aws-cdk/commit/3fed84ba9eec3f53c662966e366aa629209b7bf5))
* **sns:** add support for subscription DLQ in SNS ([383cdb8](https://github.com/aws/aws-cdk/commit/383cdb86effeafdf5d0767ed379b16b3d78a933b))
* **stepfunctions:** new service integration classes for Lambda, SNS, and SQS ([#7946](https://github.com/aws/aws-cdk/issues/7946)) ([c038848](https://github.com/aws/aws-cdk/commit/c0388483524832ca7863de4ee9c472b8ab39de8e)), closes [#6715](https://github.com/aws/aws-cdk/issues/6715) [#6489](https://github.com/aws/aws-cdk/issues/6489)
* **stepfunctions:** support paths in Pass state ([#8070](https://github.com/aws/aws-cdk/issues/8070)) ([86eac6a](https://github.com/aws/aws-cdk/commit/86eac6af074bf78a921c52d613eca0dd4a514a49)), closes [#7181](https://github.com/aws/aws-cdk/issues/7181)
* **stepfunctions-tasks:** task for starting a job run in AWS Glue ([#8143](https://github.com/aws/aws-cdk/issues/8143)) ([a721e67](https://github.com/aws/aws-cdk/commit/a721e670cdc9888cd67ef1a24021004e18bfd23c))


### Bug Fixes

* **apigateway:** contextAccountId in AccessLogField incorrectly resolves to requestId ([7b89e80](https://github.com/aws/aws-cdk/commit/7b89e805c716fa73d41cc97fcb728634e7a59136)), closes [#7952](https://github.com/aws/aws-cdk/issues/7952) [#7951](https://github.com/aws/aws-cdk/issues/7951)
* **autoscaling:** add noDevice as a volume type ([#7253](https://github.com/aws/aws-cdk/issues/7253)) ([751958b](https://github.com/aws/aws-cdk/commit/751958b69225fdfc52622781c618f5a77f881fb6)), closes [#7242](https://github.com/aws/aws-cdk/issues/7242)
* **aws-eks:** kubectlEnabled: false conflicts with addNodegroup ([#8119](https://github.com/aws/aws-cdk/issues/8119)) ([8610889](https://github.com/aws/aws-cdk/commit/86108890a51443dc06ec6325038c7b19cbdaee76)), closes [#7993](https://github.com/aws/aws-cdk/issues/7993)
* **cli:** paper cuts ([#8164](https://github.com/aws/aws-cdk/issues/8164)) ([af2ea60](https://github.com/aws/aws-cdk/commit/af2ea60e7ae4aaab17ddd10a9142e1809b4c8246))
* **dynamodb:** the maximum number of nonKeyAttributes is 100, not 20 ([#8186](https://github.com/aws/aws-cdk/issues/8186)) ([0393528](https://github.com/aws/aws-cdk/commit/03935280f1addef392c9b4460737cce8bb2eb8c9)), closes [#8095](https://github.com/aws/aws-cdk/issues/8095)
* **eks:** unable to add multiple service accounts ([#8122](https://github.com/aws/aws-cdk/issues/8122)) ([524440c](https://github.com/aws/aws-cdk/commit/524440c5454d15276c92581a08d4ee7cad1790eb))
* **events:** cannot use the same target account for 2 cross-account event sources ([#8068](https://github.com/aws/aws-cdk/issues/8068)) ([395c07c](https://github.com/aws/aws-cdk/commit/395c07c0cac7739743fc71d71fddd8880b608ead)), closes [#8010](https://github.com/aws/aws-cdk/issues/8010)
* **lambda-nodejs:** build fails on Windows ([#8140](https://github.com/aws/aws-cdk/issues/8140)) ([04490b1](https://github.com/aws/aws-cdk/commit/04490b134a05ec34523541a3ca282ba8957a7964)), closes [#8107](https://github.com/aws/aws-cdk/issues/8107)
* **cloudtrail:** better typed event selector apis ([#8097](https://github.com/aws/aws-cdk/issues/8097)) ([0028778](https://github.com/aws/aws-cdk/commit/0028778c0f00f2faa8dad25345cd17f311fad5da))

## [1.41.0](https://github.com/aws/aws-cdk/compare/v1.40.0...v1.41.0) (2020-05-21)


Expand Down
12 changes: 10 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ you need to have the following SDKs and tools locally:
- We recommend using a version in [Active LTS](https://nodejs.org/en/about/releases/)
- ⚠️ versions `13.0.0` to `13.6.0` are not supported due to compatibility issues with our dependencies.
- [Yarn >= 1.19.1](https://yarnpkg.com/lang/en/docs/install)
- [Java OpenJDK 8](http://openjdk.java.net/install/)
- [Java OpenJDK 8](https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/downloads-list.html)
- [Apache Maven](http://maven.apache.org/install.html)
- [.NET Core SDK 3.1](https://www.microsoft.com/net/download)
- [Python 3.6.5](https://www.python.org/downloads/release/python-365/)
- [Ruby 2.5.1](https://www.ruby-lang.org/en/news/2018/03/28/ruby-2-5-1-released/)
Expand All @@ -91,6 +92,13 @@ $ yarn install
$ yarn build
```

If you get compiler errors when building, a common cause is globally installed tools like tslint and typescript. Try uninstalling them.

```
npm uninstall -g tslint
npm uninstall -g typescript
```

Alternatively, the [Full Docker build](#full-docker-build) workflow can be used so
that you don't have to worry about installing all those tools on your local machine
and instead only depend on having a working Docker install.
Expand Down Expand Up @@ -197,7 +205,7 @@ Examples:

### Step 4: Commit

Create a commit with the proposed change changes:
Create a commit with the proposed changes:

* Commit title and message (and PR title and description) must adhere to [conventionalcommits](https://www.conventionalcommits.org).
* The title must begin with `feat(module): title`, `fix(module): title`, `refactor(module): title` or
Expand Down
59 changes: 1 addition & 58 deletions allowed-breaking-changes.txt
Original file line number Diff line number Diff line change
@@ -1,58 +1 @@
incompatible-argument:@aws-cdk/aws-ecs.Ec2TaskDefinition.<initializer>
incompatible-argument:@aws-cdk/aws-ecs.Ec2TaskDefinition.addVolume
incompatible-argument:@aws-cdk/aws-ecs.FargateTaskDefinition.<initializer>
incompatible-argument:@aws-cdk/aws-ecs.FargateTaskDefinition.addVolume
incompatible-argument:@aws-cdk/aws-ecs.TaskDefinition.<initializer>
incompatible-argument:@aws-cdk/aws-ecs.TaskDefinition.addVolume
change-return-type:@aws-cdk/core.Fn.getAtt
new-argument:@aws-cdk/aws-iam.ManagedPolicy.<initializer>
new-argument:@aws-cdk/aws-iam.ManagedPolicy.<initializer>
removed:@aws-cdk/aws-apigateway.AwsIntegration.props
removed:@aws-cdk/aws-apigateway.HttpIntegration.props
removed:@aws-cdk/aws-apigateway.Integration.props
removed:@aws-cdk/aws-apigateway.LambdaIntegration.props
removed:@aws-cdk/aws-apigateway.MockIntegration.props
removed:@aws-cdk/aws-ecs-patterns.ScheduledEc2TaskDefinitionOptions.schedule
removed:@aws-cdk/aws-ecs-patterns.ScheduledEc2TaskDefinitionOptions.cluster
removed:@aws-cdk/aws-ecs-patterns.ScheduledEc2TaskDefinitionOptions.desiredTaskCount
removed:@aws-cdk/aws-ecs-patterns.ScheduledEc2TaskDefinitionOptions.vpc
removed:@aws-cdk/aws-ecs-patterns.ScheduledFargateTaskDefinitionOptions.schedule
removed:@aws-cdk/aws-ecs-patterns.ScheduledFargateTaskDefinitionOptions.cluster
removed:@aws-cdk/aws-ecs-patterns.ScheduledFargateTaskDefinitionOptions.desiredTaskCount
removed:@aws-cdk/aws-ecs-patterns.ScheduledFargateTaskDefinitionOptions.vpc
incompatible-argument:@aws-cdk/aws-lambda.Function.<initializer>
incompatible-argument:@aws-cdk/aws-lambda.SingletonFunction.<initializer>
incompatible-argument:@aws-cdk/aws-lambda.Function.addEnvironment
changed-type:@aws-cdk/aws-dynamodb.Table.tableStreamArn
incompatible-argument:@aws-cdk/aws-apigateway.LambdaRestApi.addModel
incompatible-argument:@aws-cdk/aws-apigateway.Model.<initializer>
incompatible-argument:@aws-cdk/aws-apigateway.RestApi.addModel
incompatible-argument:@aws-cdk/aws-apigateway.ProxyResource.addProxy
incompatible-argument:@aws-cdk/aws-apigateway.Resource.addProxy
incompatible-argument:@aws-cdk/aws-apigateway.ResourceBase.addProxy
incompatible-argument:@aws-cdk/aws-apigateway.IResource.addProxy
incompatible-argument:@aws-cdk/aws-apigateway.RequestAuthorizer.<initializer>
incompatible-argument:@aws-cdk/aws-servicediscovery.Service.fromServiceAttributes
removed:@aws-cdk/core.ConstructNode.addReference
removed:@aws-cdk/core.ConstructNode.references
removed:@aws-cdk/core.OutgoingReference
change-return-type:@aws-cdk/aws-lambda-destinations.EventBridgeDestination.bind
change-return-type:@aws-cdk/aws-lambda-destinations.LambdaDestination.bind
change-return-type:@aws-cdk/aws-lambda-destinations.SnsDestination.bind
change-return-type:@aws-cdk/aws-lambda-destinations.SqsDestination.bind
removed:@aws-cdk/cdk-assets-schema.DockerImageDestination.imageUri
incompatible-argument:@aws-cdk/aws-iam.FederatedPrincipal.<initializer>
incompatible-argument:@aws-cdk/aws-iam.PolicyStatement.addCondition
incompatible-argument:@aws-cdk/aws-iam.PolicyStatement.addConditions
incompatible-argument:@aws-cdk/aws-iam.PolicyStatement.addFederatedPrincipal
incompatible-argument:@aws-cdk/aws-iam.PrincipalPolicyFragment.<initializer>
changed-type:@aws-cdk/aws-iam.FederatedPrincipal.conditions
changed-type:@aws-cdk/aws-iam.PrincipalPolicyFragment.conditions
changed-type:@aws-cdk/aws-iam.PrincipalWithConditions.conditions
removed:@aws-cdk/cdk-assets-schema.Placeholders
# Following two are because we're turning: properties: {string=>any} into a union of typed interfaces
# Needs to be removed after next release.
incompatible-argument:@aws-cdk/cloud-assembly-schema.Manifest.save
change-return-type:@aws-cdk/cloud-assembly-schema.Manifest.load
removed:@aws-cdk/core.DefaultStackSynthesizer.DEFAULT_DEPLOY_ACTION_ROLE_ARN
removed:@aws-cdk/core.DefaultStackSynthesizerProps.deployActionRoleArn

2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"tools/*"
],
"rejectCycles": "true",
"version": "1.41.0"
"version": "1.42.0"
}
8 changes: 4 additions & 4 deletions packages/@aws-cdk/aws-backup/lib/resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ export class BackupResource {
/**
* A DynamoDB table
*/
public static fromDynamoDbTable(table: dynamodb.Table) {
public static fromDynamoDbTable(table: dynamodb.ITable) {
return BackupResource.fromArn(table.tableArn);
}

/**
* An EC2 instance
*/
public static fromEc2Instance(instance: ec2.Instance) {
public static fromEc2Instance(instance: ec2.IInstance) {
return BackupResource.fromArn(Stack.of(instance).formatArn({
service: 'ec2',
resource: 'instance',
Expand All @@ -82,7 +82,7 @@ export class BackupResource {
/**
* An EFS file system
*/
public static fromEfsFileSystem(fileSystem: efs.FileSystem) {
public static fromEfsFileSystem(fileSystem: efs.IFileSystem) {
return BackupResource.fromArn(Stack.of(fileSystem).formatArn({
service: 'elasticfilesystem',
resource: 'file-system',
Expand All @@ -93,7 +93,7 @@ export class BackupResource {
/**
* A RDS database instance
*/
public static fromRdsDatabaseInstance(instance: rds.DatabaseInstance) {
public static fromRdsDatabaseInstance(instance: rds.IDatabaseInstance) {
return BackupResource.fromArn(instance.instanceArn);
}

Expand Down
41 changes: 41 additions & 0 deletions packages/@aws-cdk/aws-backup/test/selection.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,3 +290,44 @@ test('fromEc2Instance', () => {
},
});
});

test('fromDynamoDbTable', () => {
// GIVEN
const newTable = new dynamodb.Table(stack, 'New', {
partitionKey: {
name: 'id',
type: dynamodb.AttributeType.STRING,
},
});
const existingTable = dynamodb.Table.fromTableArn(stack, 'Existing', 'arn:aws:dynamodb:eu-west-1:123456789012:table/existing');

// WHEN
plan.addSelection('Selection', {
resources: [
BackupResource.fromDynamoDbTable(newTable),
BackupResource.fromDynamoDbTable(existingTable),
],
});

// THEN
expect(stack).toHaveResource('AWS::Backup::BackupSelection', {
BackupSelection: {
IamRoleArn: {
'Fn::GetAtt': [
'PlanSelectionRole6D10F4B7',
'Arn',
],
},
Resources: [
{
'Fn::GetAtt': [
'New8A81B073',
'Arn',
],
},
'arn:aws:dynamodb:eu-west-1:123456789012:table/existing',
],
SelectionName: 'Selection',
},
});
});
17 changes: 9 additions & 8 deletions packages/@aws-cdk/aws-cloudtrail/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ const trail = new cloudtrail.Trail(this, 'CloudTrail', {
```

This creates the same setup as above - but also logs events to a created CloudWatch Log stream.
By default, the created log group has a retention period of 365 Days, but this is also configurable.
By default, the created log group has a retention period of 365 Days, but this is also configurable
via the `cloudWatchLogsRetention` property. If you would like to specify the log group explicitly,
use the `cloudwatchLogGroup` property.

For using CloudTrail event selector to log specific S3 events,
you can use the `CloudTrailProps` configuration object.
Expand All @@ -64,13 +66,12 @@ const trail = new cloudtrail.Trail(this, 'MyAmazingCloudTrail');

// Adds an event selector to the bucket magic-bucket.
// By default, this includes management events and all operations (Read + Write)
trail.addS3EventSelector(["arn:aws:s3:::magic-bucket/"]);
trail.logAllS3DataEvents();

// Adds an event selector to the bucket foo, with a specific configuration
trail.addS3EventSelector(["arn:aws:s3:::foo/"], {
includeManagementEvents: false,
readWriteType: ReadWriteType.ALL,
});
// Adds an event selector to the bucket foo
trail.addS3EventSelector([{
bucket: fooBucket // 'fooBucket' is of type s3.IBucket
}]);
```

For using CloudTrail event selector to log events about Lambda
Expand All @@ -88,7 +89,7 @@ const lambdaFunction = new lambda.Function(stack, 'AnAmazingFunction', {
});

// Add an event selector to log data events for all functions in the account.
trail.addLambdaEventSelector(["arn:aws:lambda"]);
trail.logAllLambdaDataEvents();

// Add an event selector to log data events for the provided Lambda functions.
trail.addLambdaEventSelector([lambdaFunction.functionArn]);
Expand Down
Loading

0 comments on commit 3b64241

Please sign in to comment.