Skip to content

Commit 09e12a6

Browse files
authored
chore(release): 1.58.0
chore(release): 1.58.0
2 parents 2ccfc50 + 0d91531 commit 09e12a6

File tree

144 files changed

+3281
-939
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+3281
-939
lines changed

.github/workflows/issue-label-assign.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
{"keywords":["[@aws-cdk/aws-ecr]","[aws-ecr]","[ecr]"],"labels":["@aws-cdk/aws-ecr"],"assignees":["MrArnoldPalmer"]},
7373
{"keywords":["[@aws-cdk/aws-ecr-assets]","[aws-ecr-assets]","[ecr-assets]","[ecr assets]","[ecrassets]"],"labels":["@aws-cdk/aws-ecr-assets"],"assignees":["eladb"]},
7474
{"keywords":["[@aws-cdk/aws-efs]","[aws-efs]","[efs]"],"labels":["@aws-cdk/aws-efs"],"assignees":["rix0rrr"]},
75-
{"keywords":["[@aws-cdk/aws-eks]","[aws-eks]","[eks]"],"labels":["@aws-cdk/aws-eks"],"assignees":["eladb"]},
75+
{"keywords":["[@aws-cdk/aws-eks]","[aws-eks]","[eks]"],"labels":["@aws-cdk/aws-eks"],"assignees":["iliapolo"]},
7676
{"keywords":["[@aws-cdk/aws-elasticache]","[aws-elasticache]","[elasticache]","[elastic cache]","[elastic-cache]"],"labels":["@aws-cdk/aws-elasticache"],"assignees":["iliapolo"]},
7777
{"keywords":["[@aws-cdk/aws-elasticbeanstalk]","[aws-elasticbeanstalk]","[elasticbeanstalk]","[elastic beanstalk]","[elastic-beanstalk]"],"labels":["@aws-cdk/aws-elasticbeanstalk"],"assignees":["skinny85"]},
7878
{"keywords":["[@aws-cdk/aws-elasticloadbalancing]","[aws-elasticloadbalancing]","[elasticloadbalancing]","[elastic loadbalancing]","[elastic-loadbalancing]","[elb]"],"labels":["@aws-cdk/aws-elasticloadbalancing"],"assignees":["rix0rrr"]},

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,5 @@ yarn-error.log
4040
# Parcel default cache directory
4141
.parcel-cache
4242

43+
# Cloud9
44+
.c9

.mergify.yml

+27-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pull_request_rules:
2121
conditions:
2222
- base!=release
2323
- -title~=(WIP|wip)
24-
- -label~=(blocked|do-not-merge|no-squash)
24+
- -label~=(blocked|do-not-merge|no-squash|two-approvers)
2525
- -merged
2626
- -closed
2727
- author!=dependabot[bot]
@@ -32,7 +32,32 @@ pull_request_rules:
3232
- status-success~=AWS CodeBuild us-east-1
3333
#- status-success=Semantic Pull Request
3434
- status-success=mandatory-changes
35-
- name: automatic merge
35+
- name: automatic merge (2+ approvers)
36+
actions:
37+
comment:
38+
message: Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to [allow changes to be pushed to your fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork)).
39+
merge:
40+
strict: smart
41+
method: squash
42+
strict_method: merge
43+
commit_message: title+body
44+
delete_head_branch: {}
45+
conditions:
46+
- base!=release
47+
- -title~=(WIP|wip)
48+
- label~=two-approvers
49+
- -label~=(blocked|do-not-merge|no-squash)
50+
- -merged
51+
- -closed
52+
- author!=dependabot[bot]
53+
- author!=dependabot-preview[bot]
54+
- "#approved-reviews-by>=2"
55+
- -approved-reviews-by~=author
56+
- "#changes-requested-reviews-by=0"
57+
- status-success~=AWS CodeBuild us-east-1
58+
#- status-success=Semantic Pull Request
59+
- status-success=mandatory-changes
60+
- name: automatic merge (no-squash)
3661
actions:
3762
comment:
3863
message: Thank you for contributing! Your pull request will be updated from master and then merged automatically without squashing (do not update manually, and be sure to [allow changes to be pushed to your fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork)).

CHANGELOG.md

+34
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,40 @@
22

33
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.
44

5+
## [1.58.0](https://github.com/aws/aws-cdk/compare/v1.57.0...v1.58.0) (2020-08-12)
6+
7+
8+
### Features
9+
10+
* **cloudwatch:** alarm status widget ([#9456](https://github.com/aws/aws-cdk/issues/9456)) ([41940d3](https://github.com/aws/aws-cdk/commit/41940d3cfad289cbaed8ff60a21c6c9fa9aad532))
11+
* **cognito:** better control sms role creation ([#9513](https://github.com/aws/aws-cdk/issues/9513)) ([a772fe8](https://github.com/aws/aws-cdk/commit/a772fe84784e62843ef724a9158fc8cda848c5c9)), closes [#6943](https://github.com/aws/aws-cdk/issues/6943)
12+
* **core:** deprecate "Construct.node" in favor of "Construct.construct" ([#9557](https://github.com/aws/aws-cdk/issues/9557)) ([aa4c5b7](https://github.com/aws/aws-cdk/commit/aa4c5b7df3a4880638361026ec0f6a77b7476b40)), closes [/github.com/aws/aws-cdk-rfcs/blob/master/text/0192-remove-constructs-compat.md#10](https://github.com/aws//github.com/aws/aws-cdk-rfcs/blob/master/text/0192-remove-constructs-compat.md/issues/10)
13+
* **core:** local bundling provider ([#9564](https://github.com/aws/aws-cdk/issues/9564)) ([3da0aa9](https://github.com/aws/aws-cdk/commit/3da0aa99d16e908a39f43f463ac2889dd232c611))
14+
* **core:** new annotations api ([#9563](https://github.com/aws/aws-cdk/issues/9563)) ([ae9ed62](https://github.com/aws/aws-cdk/commit/ae9ed6208dc81a7a38f4b9626c7c30f1811f97a9)), closes [/github.com/aws/aws-cdk-rfcs/blob/master/text/0192-remove-constructs-compat.md#09](https://github.com/aws/aws-cdk-rfcs/blob/master/text/0192-remove-constructs-compat.md#09-logging-logging-api-changes)
15+
* **core:** new APIs for Aspects and Tags ([#9558](https://github.com/aws/aws-cdk/issues/9558)) ([a311428](https://github.com/aws/aws-cdk/commit/a311428d6013a1486585979a010f4105b0e0f97a)), closes [/github.com/aws/aws-cdk-rfcs/blob/master/text/0192-remove-constructs-compat.md#02](https://github.com/aws/aws-cdk-rfcs/blob/master/text/0192-remove-constructs-compat.md#02-aspects-changes-in-aspects-api)
16+
* **ecs:** Option to encrypt lifecycle hook SNS Topic ([#9343](https://github.com/aws/aws-cdk/issues/9343)) ([38aad67](https://github.com/aws/aws-cdk/commit/38aad67c5d2db21cfb3660c1574f7fedde9860dc))
17+
* **events:** use existing Role when running ECS Task ([#8145](https://github.com/aws/aws-cdk/issues/8145)) ([aad951a](https://github.com/aws/aws-cdk/commit/aad951ae5355391463d9af2a49cd890f8d78f2d0)), closes [#7859](https://github.com/aws/aws-cdk/issues/7859)
18+
* **global-accelerator:** referencing Global Accelerator security group ([#9358](https://github.com/aws/aws-cdk/issues/9358)) ([1fe9684](https://github.com/aws/aws-cdk/commit/1fe9684ea6b2dcaac1d97b64edfd4ef87cc65c0f))
19+
* **iam:** validate policies for missing resources/principals ([#9269](https://github.com/aws/aws-cdk/issues/9269)) ([60d01b1](https://github.com/aws/aws-cdk/commit/60d01b132b0e76224f7aae6b6caad5d13e7a816b)), closes [#7615](https://github.com/aws/aws-cdk/issues/7615)
20+
* **lambda:** autoscaling for lambda aliases ([#8883](https://github.com/aws/aws-cdk/issues/8883)) ([d9d9b90](https://github.com/aws/aws-cdk/commit/d9d9b908ca149b189f0e1bde7df0d75afd5b26ff))
21+
* **readme:** include partitions.io cdk board in "getting help" ([#9541](https://github.com/aws/aws-cdk/issues/9541)) ([f098014](https://github.com/aws/aws-cdk/commit/f098014e0e9e49b2cc6a30922b8b0545e9c45e5e))
22+
* "stack relative exports" flag ([#9604](https://github.com/aws/aws-cdk/issues/9604)) ([398f872](https://github.com/aws/aws-cdk/commit/398f8720fac6ae7eb663a36c87c1f8f11aa89045))
23+
* **secretsmanager:** Specify secret value at creation ([#9594](https://github.com/aws/aws-cdk/issues/9594)) ([07fedff](https://github.com/aws/aws-cdk/commit/07fedffadf3900d754b5df5a24cc84622299ede4)), closes [#5810](https://github.com/aws/aws-cdk/issues/5810)
24+
25+
26+
### Bug Fixes
27+
28+
* **cfn-include:** allowedValues aren't included when specified by a parameter ([#9532](https://github.com/aws/aws-cdk/issues/9532)) ([e7dc82f](https://github.com/aws/aws-cdk/commit/e7dc82f04d83a7c85131e11e258f3ab031e61eda))
29+
* **codedeploy:** ServerDeploymentGroup takes AutoScalingGroup instead of IAutoScalingGroup ([#9252](https://github.com/aws/aws-cdk/issues/9252)) ([9ff55ae](https://github.com/aws/aws-cdk/commit/9ff55aeeed49d89bf13b2baf9025a1f4e038aa43)), closes [#9175](https://github.com/aws/aws-cdk/issues/9175)
30+
* **docdb:** `autoMinorVersionUpgrade` property was not set to `true` by default as stated in the docstring ([#9505](https://github.com/aws/aws-cdk/issues/9505)) ([e878f9c](https://github.com/aws/aws-cdk/commit/e878f9c5fd503615a4d65a3f866e80cff001a309))
31+
* **ec2:** Volume grants have an overly complicated API ([#9115](https://github.com/aws/aws-cdk/issues/9115)) ([74e8391](https://github.com/aws/aws-cdk/commit/74e839189b2e9b028e6b9944884bf8fe73de2429)), closes [#9114](https://github.com/aws/aws-cdk/issues/9114)
32+
* **efs:** LifecyclePolicy of AFTER_7_DAYS is not applied ([#9475](https://github.com/aws/aws-cdk/issues/9475)) ([f78c346](https://github.com/aws/aws-cdk/commit/f78c3469522006d38078db6effc4556d44da9747)), closes [#9474](https://github.com/aws/aws-cdk/issues/9474)
33+
* **eks:** clusters in a FAILED state are not detected ([#9553](https://github.com/aws/aws-cdk/issues/9553)) ([d651948](https://github.com/aws/aws-cdk/commit/d651948b4b4ef43fedbaba69905e860fd595513d))
34+
* **eks:** private endpoint access doesn't work with `Vpc.fromLookup` ([#9544](https://github.com/aws/aws-cdk/issues/9544)) ([dd0f4cb](https://github.com/aws/aws-cdk/commit/dd0f4cb55bd9d7a95ccc9691ba33dab658d60e97)), closes [#9542](https://github.com/aws/aws-cdk/issues/9542) [#5383](https://github.com/aws/aws-cdk/issues/5383)
35+
* **lambda:** cannot create lambda in public subnets ([#9468](https://github.com/aws/aws-cdk/issues/9468)) ([b46fdc9](https://github.com/aws/aws-cdk/commit/b46fdc92d3c3cee269bfa7785fa78679aa781880))
36+
* **pipelines:** CodeBuild images have (too) old Node version ([#9446](https://github.com/aws/aws-cdk/issues/9446)) ([bd45f34](https://github.com/aws/aws-cdk/commit/bd45f3419e24d6a9d9989a0efeacf2233866100b)), closes [#9070](https://github.com/aws/aws-cdk/issues/9070)
37+
* **pipelines:** manual approval of changeset uses wrong ordering ([#9508](https://github.com/aws/aws-cdk/issues/9508)) ([5c01da8](https://github.com/aws/aws-cdk/commit/5c01da8d82f77e0241890101258aace2dac1902d)), closes [#9101](https://github.com/aws/aws-cdk/issues/9101) [#9101](https://github.com/aws/aws-cdk/issues/9101)
38+
539
## [1.57.0](https://github.com/aws/aws-cdk/compare/v1.56.0...v1.57.0) (2020-08-07)
640

741

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ You may also find help on these community resources:
126126
and tag it with `aws-cdk`
127127
* Come join the AWS CDK community on [Gitter](https://gitter.im/awslabs/aws-cdk)
128128
* Talk in the CDK channel of the [AWS Developers Slack workspace](https://awsdevelopers.slack.com) (invite required)
129+
* Check out the [partitions.io board](https://partitions.io/cdk)
129130

130131
### Roadmap
131132

allowed-breaking-changes.txt

+3
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ removed:@aws-cdk/cdk-assets-schema.FileDestination
1919
removed:@aws-cdk/cdk-assets-schema.FileSource
2020
removed:@aws-cdk/cdk-assets-schema.ManifestFile
2121
removed:@aws-cdk/cdk-assets-schema.FileAssetPackaging
22+
23+
changed-type:@aws-cdk/aws-codedeploy.IServerDeploymentGroup.autoScalingGroups
24+
changed-type:@aws-cdk/aws-codedeploy.ServerDeploymentGroup.autoScalingGroups

lerna.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
"tools/*"
1111
],
1212
"rejectCycles": "true",
13-
"version": "1.57.0"
13+
"version": "1.58.0"
1414
}

packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.expected.json

-46
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,5 @@
11
{
22
"Resources": {
3-
"PoolsmsRoleC3352CE6": {
4-
"Type": "AWS::IAM::Role",
5-
"Properties": {
6-
"AssumeRolePolicyDocument": {
7-
"Statement": [
8-
{
9-
"Action": "sts:AssumeRole",
10-
"Condition": {
11-
"StringEquals": {
12-
"sts:ExternalId": "awsappsyncintegPool5D14B05B"
13-
}
14-
},
15-
"Effect": "Allow",
16-
"Principal": {
17-
"Service": "cognito-idp.amazonaws.com"
18-
}
19-
}
20-
],
21-
"Version": "2012-10-17"
22-
},
23-
"Policies": [
24-
{
25-
"PolicyDocument": {
26-
"Statement": [
27-
{
28-
"Action": "sns:Publish",
29-
"Effect": "Allow",
30-
"Resource": "*"
31-
}
32-
],
33-
"Version": "2012-10-17"
34-
},
35-
"PolicyName": "sns-publish"
36-
}
37-
]
38-
}
39-
},
403
"PoolD3F588B8": {
414
"Type": "AWS::Cognito::UserPool",
425
"Properties": {
@@ -57,15 +20,6 @@
5720
},
5821
"EmailVerificationMessage": "The verification code to your new account is {####}",
5922
"EmailVerificationSubject": "Verify your new account",
60-
"SmsConfiguration": {
61-
"ExternalId": "awsappsyncintegPool5D14B05B",
62-
"SnsCallerArn": {
63-
"Fn::GetAtt": [
64-
"PoolsmsRoleC3352CE6",
65-
"Arn"
66-
]
67-
}
68-
},
6923
"SmsVerificationMessage": "The verification code to your new account is {####}",
7024
"UserPoolName": "myPool",
7125
"VerificationMessageTemplate": {

packages/@aws-cdk/aws-appsync/test/integ.graphql.expected.json

-46
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,5 @@
11
{
22
"Resources": {
3-
"PoolsmsRoleC3352CE6": {
4-
"Type": "AWS::IAM::Role",
5-
"Properties": {
6-
"AssumeRolePolicyDocument": {
7-
"Statement": [
8-
{
9-
"Action": "sts:AssumeRole",
10-
"Condition": {
11-
"StringEquals": {
12-
"sts:ExternalId": "awsappsyncintegPool5D14B05B"
13-
}
14-
},
15-
"Effect": "Allow",
16-
"Principal": {
17-
"Service": "cognito-idp.amazonaws.com"
18-
}
19-
}
20-
],
21-
"Version": "2012-10-17"
22-
},
23-
"Policies": [
24-
{
25-
"PolicyDocument": {
26-
"Statement": [
27-
{
28-
"Action": "sns:Publish",
29-
"Effect": "Allow",
30-
"Resource": "*"
31-
}
32-
],
33-
"Version": "2012-10-17"
34-
},
35-
"PolicyName": "sns-publish"
36-
}
37-
]
38-
}
39-
},
403
"PoolD3F588B8": {
414
"Type": "AWS::Cognito::UserPool",
425
"Properties": {
@@ -57,15 +20,6 @@
5720
},
5821
"EmailVerificationMessage": "The verification code to your new account is {####}",
5922
"EmailVerificationSubject": "Verify your new account",
60-
"SmsConfiguration": {
61-
"ExternalId": "awsappsyncintegPool5D14B05B",
62-
"SnsCallerArn": {
63-
"Fn::GetAtt": [
64-
"PoolsmsRoleC3352CE6",
65-
"Arn"
66-
]
67-
}
68-
},
6923
"SmsVerificationMessage": "The verification code to your new account is {####}",
7024
"UserPoolName": "myPool",
7125
"VerificationMessageTemplate": {

packages/@aws-cdk/aws-autoscaling-hooktargets/lib/lambda-hook.ts

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as autoscaling from '@aws-cdk/aws-autoscaling';
2+
import * as kms from '@aws-cdk/aws-kms';
23
import * as lambda from '@aws-cdk/aws-lambda';
34
import * as sns from '@aws-cdk/aws-sns';
45
import * as subs from '@aws-cdk/aws-sns-subscriptions';
@@ -11,11 +12,22 @@ import { TopicHook } from './topic-hook';
1112
* Internally creates a Topic to make the connection.
1213
*/
1314
export class FunctionHook implements autoscaling.ILifecycleHookTarget {
14-
constructor(private readonly fn: lambda.IFunction) {
15+
/**
16+
* @param fn Function to invoke in response to a lifecycle event
17+
* @param encryptionKey If provided, this key is used to encrypt the contents of the SNS topic.
18+
*/
19+
constructor(private readonly fn: lambda.IFunction, private readonly encryptionKey?: kms.IKey) {
1520
}
1621

1722
public bind(scope: Construct, lifecycleHook: autoscaling.ILifecycleHook): autoscaling.LifecycleHookTargetConfig {
18-
const topic = new sns.Topic(scope, 'Topic');
23+
const topic = new sns.Topic(scope, 'Topic', {
24+
masterKey: this.encryptionKey,
25+
});
26+
// Per: https://docs.aws.amazon.com/sns/latest/dg/sns-key-management.html#sns-what-permissions-for-sse
27+
// Topic's grantPublish() is in a base class that does not know there is a kms key, and so does not
28+
// grant appropriate permissions to the kms key. We do that here to ensure the correct permissions
29+
// are in place.
30+
this.encryptionKey?.grant(lifecycleHook.role, 'kms:Decrypt', 'kms:GenerateDataKey');
1931
topic.addSubscription(new subs.LambdaSubscription(this.fn));
2032
return new TopicHook(topic).bind(scope, lifecycleHook);
2133
}

packages/@aws-cdk/aws-autoscaling-hooktargets/package.json

+2
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
"dependencies": {
7070
"@aws-cdk/aws-autoscaling": "0.0.0",
7171
"@aws-cdk/aws-iam": "0.0.0",
72+
"@aws-cdk/aws-kms": "0.0.0",
7273
"@aws-cdk/aws-lambda": "0.0.0",
7374
"@aws-cdk/aws-sns": "0.0.0",
7475
"@aws-cdk/aws-sns-subscriptions": "0.0.0",
@@ -80,6 +81,7 @@
8081
"peerDependencies": {
8182
"@aws-cdk/aws-autoscaling": "0.0.0",
8283
"@aws-cdk/aws-iam": "0.0.0",
84+
"@aws-cdk/aws-kms": "0.0.0",
8385
"@aws-cdk/aws-lambda": "0.0.0",
8486
"@aws-cdk/aws-sns": "0.0.0",
8587
"@aws-cdk/aws-sns-subscriptions": "0.0.0",

packages/@aws-cdk/aws-autoscaling-hooktargets/test/hooks.test.ts

+46
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
import '@aws-cdk/assert/jest';
2+
import { arrayWith } from '@aws-cdk/assert';
23
import * as autoscaling from '@aws-cdk/aws-autoscaling';
34
import * as ec2 from '@aws-cdk/aws-ec2';
5+
import * as kms from '@aws-cdk/aws-kms';
46
import * as lambda from '@aws-cdk/aws-lambda';
57
import * as sns from '@aws-cdk/aws-sns';
68
import * as sqs from '@aws-cdk/aws-sqs';
79
import { Stack } from '@aws-cdk/core';
810
import * as hooks from '../lib';
911

12+
1013
describe('given an AutoScalingGroup', () => {
1114
let stack: Stack;
1215
let asg: autoscaling.AutoScalingGroup;
@@ -77,4 +80,47 @@ describe('given an AutoScalingGroup', () => {
7780
Endpoint: { 'Fn::GetAtt': [ 'Fn9270CBC0', 'Arn' ] },
7881
});
7982
});
83+
84+
test('can use Lambda function as hook target with encrypted SNS', () => {
85+
// GIVEN
86+
const key = new kms.Key(stack, 'key');
87+
const fn = new lambda.Function(stack, 'Fn', {
88+
code: lambda.Code.fromInline('foo'),
89+
runtime: lambda.Runtime.NODEJS_10_X,
90+
handler: 'index.index',
91+
});
92+
93+
// WHEN
94+
asg.addLifecycleHook('Trans', {
95+
lifecycleTransition: autoscaling.LifecycleTransition.INSTANCE_LAUNCHING,
96+
notificationTarget: new hooks.FunctionHook(fn, key),
97+
});
98+
99+
// THEN
100+
expect(stack).toHaveResourceLike('AWS::SNS::Topic', {
101+
KmsMasterKeyId: {
102+
Ref: 'keyFEDD6EC0',
103+
},
104+
});
105+
expect(stack).toHaveResourceLike('AWS::IAM::Policy', {
106+
PolicyDocument: {
107+
Statement: arrayWith(
108+
{
109+
Effect: 'Allow',
110+
Action: [
111+
'kms:Decrypt',
112+
'kms:GenerateDataKey',
113+
],
114+
Resource: {
115+
'Fn::GetAtt': [
116+
'keyFEDD6EC0',
117+
'Arn',
118+
],
119+
},
120+
},
121+
),
122+
},
123+
});
124+
});
125+
80126
});

0 commit comments

Comments
 (0)