Skip to content

Commit

Permalink
Merge pull request aws#6973 from aws/bump/1.31.0
Browse files Browse the repository at this point in the history
chore(release): 1.31.0
  • Loading branch information
mergify[bot] authored Mar 24, 2020
2 parents 4f54ff7 + 73a6693 commit 8f3ac79
Show file tree
Hide file tree
Showing 238 changed files with 3,837 additions and 1,759 deletions.
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,34 @@

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.31.0](https://github.com/aws/aws-cdk/compare/v1.30.0...v1.31.0) (2020-03-24)


### ⚠ BREAKING CHANGES

* .NET Core v3.1 is required with JSII v1.1

### Features

* **cloud9:** Support Cloud9 EC2 Environment ([#6298](https://github.com/aws/aws-cdk/issues/6298)) ([f50b876](https://github.com/aws/aws-cdk/commit/f50b8769548c34a66cf05079d1ac721c83992840))
* **codepipeline:** add experimental support for the BitBucket source action ([#6756](https://github.com/aws/aws-cdk/issues/6756)) ([95bb1ad](https://github.com/aws/aws-cdk/commit/95bb1ad60e600007421acd6d160e0d7fb9bc0389)), closes [#6710](https://github.com/aws/aws-cdk/issues/6710)
* **eks:** KubernetesPatch ([#6753](https://github.com/aws/aws-cdk/issues/6753)) ([c7fab5b](https://github.com/aws/aws-cdk/commit/c7fab5b29aca518fb6e1c8f2868d915885fedf04)), closes [#6723](https://github.com/aws/aws-cdk/issues/6723)
* **events:** AWS Batch event target ([#6570](https://github.com/aws/aws-cdk/issues/6570)) ([73899a9](https://github.com/aws/aws-cdk/commit/73899a95ffe52c51ff77155fd654c2b4cdef7241))


### Bug Fixes

* **acm:** Allow tokens as a part of the hosted zone name ([#6685](https://github.com/aws/aws-cdk/issues/6685)) ([acfb6ef](https://github.com/aws/aws-cdk/commit/acfb6ef8b5f94c04206c3afc8d12bfaf87c1a650)), closes [#6133](https://github.com/aws/aws-cdk/issues/6133)
* **aws-ecs-patterns:** only create an A record if LB is public ([#6895](https://github.com/aws/aws-cdk/issues/6895)) ([f31f4e1](https://github.com/aws/aws-cdk/commit/f31f4e128d5f9dd8d673ac2a3c28d792d1427dda)), closes [#6702](https://github.com/aws/aws-cdk/issues/6702)
* **cdk-assets:** context path not honored by Docker asset build ([#6957](https://github.com/aws/aws-cdk/issues/6957)) ([1edd507](https://github.com/aws/aws-cdk/commit/1edd5076e8a5b4e2194c73e395d1712f74cd2ba1)), closes [#6954](https://github.com/aws/aws-cdk/issues/6954) [#6814](https://github.com/aws/aws-cdk/issues/6814)
* **cloudwatch:** unhelpful error when reusing metric IDs ([#6892](https://github.com/aws/aws-cdk/issues/6892)) ([60253a3](https://github.com/aws/aws-cdk/commit/60253a319d6f185cf807ca45dac4ce0be4ab5777))
* **cognito:** user pool - link style email verification fails to deploy ([#6938](https://github.com/aws/aws-cdk/issues/6938)) ([b5c60d5](https://github.com/aws/aws-cdk/commit/b5c60d50a6c4fb7e93185c5874a2651ba40d0247)), closes [#6811](https://github.com/aws/aws-cdk/issues/6811)
* **ec2:** spelling error in Instance's subnet selection logic. ([#6752](https://github.com/aws/aws-cdk/issues/6752)) ([564561a](https://github.com/aws/aws-cdk/commit/564561a5462b78bc29cd6d6968abe6b05a670df2))
* **iam:** immutable role cannot be used as a construct ([#6920](https://github.com/aws/aws-cdk/issues/6920)) ([56be032](https://github.com/aws/aws-cdk/commit/56be032149f3e698120f7653e36ef1fea565f952)), closes [#6885](https://github.com/aws/aws-cdk/issues/6885)


* .NET Core 3.1 is required with JSII v1.1 ([#6951](https://github.com/aws/aws-cdk/issues/6951)) ([24f12d6](https://github.com/aws/aws-cdk/commit/24f12d6931fc107cc959404516e5c33001c6f7f5))

## [1.30.0](https://github.com/aws/aws-cdk/compare/v1.29.0...v1.30.0) (2020-03-18)


Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The CDK is available in the following languages:
* JavaScript, TypeScript ([Node.js ≥ 10.3.0](https://nodejs.org/download/release/latest-v10.x/))
* Python ([Python ≥ 3.6](https://www.python.org/downloads/))
* Java ([Java ≥ 8](https://www.oracle.com/technetwork/java/javase/downloads/index.html) and [Maven ≥ 3.5.4](https://maven.apache.org/download.cgi))
* .NET ([.NET Core ≥ 3.0](https://dotnet.microsoft.com/download))
* .NET ([.NET Core ≥ 3.1](https://dotnet.microsoft.com/download))

-------

Expand Down
2 changes: 1 addition & 1 deletion design/cdk-bootstrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,4 +323,4 @@ This should make sure the CFN update succeeds.
## Bootstrap template

The bootstrap template used by the CLI command can be found in the
[aws-cdk package](../packages/aws-cdk/lib/api/bootstrap/bootstrap-template.json).
[aws-cdk package](../packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml).
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.30.0"
"version": "1.31.0"
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"conventional-changelog-cli": "^2.0.31",
"fs-extra": "^8.1.0",
"jsii-diff": "^1.1.0",
"jsii-pacmak": "^0.22.0",
"jsii-rosetta": "^0.22.0",
"jsii-pacmak": "^1.1.0",
"jsii-rosetta": "^1.1.0",
"lerna": "^3.20.2",
"standard-version": "^7.1.0",
"typescript": "~3.8.3"
Expand Down Expand Up @@ -58,4 +58,4 @@
"@aws-cdk/cx-api/semver/**"
]
}
}
}
9 changes: 6 additions & 3 deletions packages/@aws-cdk/alexa-ask/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,17 @@
},
"dependencies": {
"@aws-cdk/core": "0.0.0",
"constructs": "^1.1.2"
"constructs": "^2.0.0"
},
"peerDependencies": {
"@aws-cdk/core": "0.0.0",
"constructs": "^1.1.2"
"constructs": "^2.0.0"
},
"engines": {
"node": ">= 10.3.0"
},
"stability": "experimental"
"stability": "experimental",
"awscdkio": {
"announce": false
}
}
7 changes: 5 additions & 2 deletions packages/@aws-cdk/app-delivery/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@aws-cdk/aws-iam": "0.0.0",
"@aws-cdk/core": "0.0.0",
"@aws-cdk/cx-api": "0.0.0",
"constructs": "^1.1.2"
"constructs": "^2.0.0"
},
"devDependencies": {
"@aws-cdk/assert": "0.0.0",
Expand Down Expand Up @@ -85,7 +85,7 @@
"@aws-cdk/aws-iam": "0.0.0",
"@aws-cdk/core": "0.0.0",
"@aws-cdk/cx-api": "0.0.0",
"constructs": "^1.1.2"
"constructs": "^2.0.0"
},
"engines": {
"node": ">= 10.3.0"
Expand All @@ -99,5 +99,8 @@
"docs-public-apis:@aws-cdk/app-delivery.PipelineDeployStackAction.onStateChange",
"docs-public-apis:@aws-cdk/app-delivery.PipelineDeployStackActionProps"
]
},
"awscdkio": {
"announce": false
}
}
4 changes: 2 additions & 2 deletions packages/@aws-cdk/assert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
"@aws-cdk/cloudformation-diff": "0.0.0",
"@aws-cdk/core": "0.0.0",
"@aws-cdk/cx-api": "0.0.0",
"constructs": "^1.1.2"
"constructs": "^2.0.0"
},
"peerDependencies": {
"@aws-cdk/core": "0.0.0",
"jest": "^24.9.0",
"constructs": "^1.1.2"
"constructs": "^2.0.0"
},
"repository": {
"url": "https://github.com/aws/aws-cdk.git",
Expand Down
7 changes: 5 additions & 2 deletions packages/@aws-cdk/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@
"@aws-cdk/core": "0.0.0",
"@aws-cdk/cx-api": "0.0.0",
"minimatch": "^3.0.4",
"constructs": "^1.1.2"
"constructs": "^2.0.0"
},
"homepage": "https://github.com/aws/aws-cdk",
"peerDependencies": {
"@aws-cdk/core": "0.0.0",
"@aws-cdk/cx-api": "0.0.0",
"constructs": "^1.1.2"
"constructs": "^2.0.0"
},
"engines": {
"node": ">= 10.3.0"
Expand All @@ -100,5 +100,8 @@
"docs-public-apis:@aws-cdk/assets.StagingProps.sourcePath",
"docs-public-apis:@aws-cdk/assets.FollowMode"
]
},
"awscdkio": {
"announce": false
}
}
9 changes: 6 additions & 3 deletions packages/@aws-cdk/aws-accessanalyzer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,17 @@
},
"dependencies": {
"@aws-cdk/core": "0.0.0",
"constructs": "^1.1.2"
"constructs": "^2.0.0"
},
"peerDependencies": {
"@aws-cdk/core": "0.0.0",
"constructs": "^1.1.2"
"constructs": "^2.0.0"
},
"engines": {
"node": ">= 10.3.0"
},
"stability": "experimental"
"stability": "experimental",
"awscdkio": {
"announce": false
}
}
9 changes: 6 additions & 3 deletions packages/@aws-cdk/aws-acmpca/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,17 @@
},
"dependencies": {
"@aws-cdk/core": "0.0.0",
"constructs": "^1.1.2"
"constructs": "^2.0.0"
},
"peerDependencies": {
"@aws-cdk/core": "0.0.0",
"constructs": "^1.1.2"
"constructs": "^2.0.0"
},
"engines": {
"node": ">= 10.3.0"
},
"stability": "experimental"
"stability": "experimental",
"awscdkio": {
"announce": false
}
}
9 changes: 6 additions & 3 deletions packages/@aws-cdk/aws-amazonmq/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,17 @@
},
"dependencies": {
"@aws-cdk/core": "0.0.0",
"constructs": "^1.1.2"
"constructs": "^2.0.0"
},
"peerDependencies": {
"@aws-cdk/core": "0.0.0",
"constructs": "^1.1.2"
"constructs": "^2.0.0"
},
"engines": {
"node": ">= 10.3.0"
},
"stability": "experimental"
"stability": "experimental",
"awscdkio": {
"announce": false
}
}
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-amplify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const amplifyApp = new amplify.App(this, 'MyApp', {
version: '1.0',
frontend: {
phases: {
prebuild: {
preBuild: {
commands: [
'yarn'
]
Expand Down
7 changes: 5 additions & 2 deletions packages/@aws-cdk/aws-amplify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@
"@aws-cdk/aws-codebuild": "0.0.0",
"@aws-cdk/aws-secretsmanager": "0.0.0",
"@aws-cdk/core": "0.0.0",
"constructs": "^1.1.2"
"constructs": "^2.0.0"
},
"peerDependencies": {
"@aws-cdk/aws-iam": "0.0.0",
"@aws-cdk/aws-kms": "0.0.0",
"@aws-cdk/aws-codebuild": "0.0.0",
"@aws-cdk/aws-secretsmanager": "0.0.0",
"@aws-cdk/core": "0.0.0",
"constructs": "^1.1.2"
"constructs": "^2.0.0"
},
"engines": {
"node": ">= 10.3.0"
Expand All @@ -111,5 +111,8 @@
"exclude": [
"construct-ctor-props-optional:@aws-cdk/aws-amplify.App"
]
},
"awscdkio": {
"announce": false
}
}
4 changes: 4 additions & 0 deletions packages/@aws-cdk/aws-apigateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,8 @@ books.addMethod('GET', new apigateway.HttpIntegration('http://amazon.com'), {
});
```

You can find a full working example [here](test/authorizers/integ.token-authorizer.ts).

By default, the `TokenAuthorizer` looks for the authorization token in the request header with the key 'Authorization'. This can,
however, be modified by changing the `identitySource` property.

Expand Down Expand Up @@ -494,6 +496,8 @@ books.addMethod('GET', new apigateway.HttpIntegration('http://amazon.com'), {
});
```

You can find a full working example [here](test/authorizers/integ.request-authorizer.ts).

By default, the `RequestAuthorizer` does not pass any kind of information from the request. This can,
however, be modified by changing the `identitySource` property, and is required when specifying a value for caching.

Expand Down
19 changes: 17 additions & 2 deletions packages/@aws-cdk/aws-apigateway/lib/authorizers/lambda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,21 @@ abstract class LambdaAuthorizer extends Authorizer implements IAuthorizer {
}));
}
}

/**
* Returns a token that resolves to the Rest Api Id at the time of synthesis.
* Throws an error, during token resolution, if no RestApi is attached to this authorizer.
*/
protected lazyRestApiId() {
return Lazy.stringValue({
produce: () => {
if (!this.restApiId) {
throw new Error(`Authorizer (${this.node.path}) must be attached to a RestApi`);
}
return this.restApiId;
}
});
}
}

/**
Expand Down Expand Up @@ -150,7 +165,7 @@ export class TokenAuthorizer extends LambdaAuthorizer {
constructor(scope: Construct, id: string, props: TokenAuthorizerProps) {
super(scope, id, props);

const restApiId = Lazy.stringValue({ produce: () => this.restApiId });
const restApiId = this.lazyRestApiId();
const resource = new CfnAuthorizer(this, 'Resource', {
name: props.authorizerName ?? this.node.uniqueId,
restApiId,
Expand Down Expand Up @@ -212,7 +227,7 @@ export class RequestAuthorizer extends LambdaAuthorizer {
throw new Error(`At least one Identity Source is required for a REQUEST-based Lambda authorizer if caching is enabled.`);
}

const restApiId = Lazy.stringValue({ produce: () => this.restApiId });
const restApiId = this.lazyRestApiId();
const resource = new CfnAuthorizer(this, 'Resource', {
name: props.authorizerName ?? this.node.uniqueId,
restApiId,
Expand Down
9 changes: 6 additions & 3 deletions packages/@aws-cdk/aws-apigateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"@aws-cdk/aws-iam": "0.0.0",
"@aws-cdk/aws-lambda": "0.0.0",
"@aws-cdk/core": "0.0.0",
"constructs": "^1.1.2"
"constructs": "^2.0.0"
},
"homepage": "https://github.com/aws/aws-cdk",
"peerDependencies": {
Expand All @@ -87,7 +87,7 @@
"@aws-cdk/aws-iam": "0.0.0",
"@aws-cdk/aws-lambda": "0.0.0",
"@aws-cdk/core": "0.0.0",
"constructs": "^1.1.2"
"constructs": "^2.0.0"
},
"engines": {
"node": ">= 10.3.0"
Expand Down Expand Up @@ -299,5 +299,8 @@
"attribute-tag:@aws-cdk/aws-apigateway.TokenAuthorizer.authorizerArn"
]
},
"stability": "stable"
"stability": "stable",
"awscdkio": {
"announce": false
}
}
35 changes: 34 additions & 1 deletion packages/@aws-cdk/aws-apigateway/test/authorizers/test.lambda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,5 +267,38 @@ export = {
expect(stack).notTo(haveResource('AWS::Lambda::Permission'));

test.done();
}
},

'token authorizer throws when not attached to a rest api'(test: Test) {
const stack = new Stack();
const func = new lambda.Function(stack, 'myfunction', {
handler: 'handler',
code: lambda.Code.fromInline('foo'),
runtime: lambda.Runtime.NODEJS_12_X,
});
const auth = new TokenAuthorizer(stack, 'myauthorizer', {
handler: func,
});

test.throws(() => stack.resolve(auth.authorizerArn), /must be attached to a RestApi/);

test.done();
},

'request authorizer throws when not attached to a rest api'(test: Test) {
const stack = new Stack();
const func = new lambda.Function(stack, 'myfunction', {
handler: 'handler',
code: lambda.Code.fromInline('foo'),
runtime: lambda.Runtime.NODEJS_12_X,
});
const auth = new RequestAuthorizer(stack, 'myauthorizer', {
handler: func,
identitySources: [ IdentitySource.header('myheader') ],
});

test.throws(() => stack.resolve(auth.authorizerArn), /must be attached to a RestApi/);

test.done();
},
};
Loading

0 comments on commit 8f3ac79

Please sign in to comment.