Skip to content

Commit 8c415ff

Browse files
authored
Merge branch 'master' into kinesis-stream-permissions-list-shards
2 parents 15a1db2 + aa60f89 commit 8c415ff

File tree

117 files changed

+6180
-869
lines changed

Some content is hidden

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

117 files changed

+6180
-869
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1+
### Commit Message
12

3+
COMMIT MESSAGE HERE (preserve newline after "Commit Message" heading)
4+
5+
### End Commit Message
26

37
----
48

59
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
6-
7-
<!--
8-
Please read the contribution guidelines and follow the pull-request checklist:
9-
https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md
10-
-->

.mergify.yml

+1-7
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,11 @@ pull_request_rules:
5656
- status-success~=AWS CodeBuild us-east-1
5757
- status-success=Semantic Pull Request
5858
- status-success=mandatory-changes
59-
- name: when changes are requested
60-
actions:
61-
comment:
62-
message: Once all the requested changes have been addressed, and the PR is ready for another review, remember to [dismiss the review](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/dismissing-a-pull-request-review).
63-
conditions:
64-
- changes-requested-reviews-by=@aws/aws-cdk-team
6559
- name: remove stale reviews
6660
actions:
6761
dismiss_reviews:
6862
approved: true
69-
changes_requested: false
63+
changes_requested: true
7064
conditions:
7165
- author!=dependabot[bot]
7266
- author!=dependabot-preview[bot]

CHANGELOG.md

+28
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,34 @@
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.31.0](https://github.com/aws/aws-cdk/compare/v1.30.0...v1.31.0) (2020-03-24)
6+
7+
8+
### ⚠ BREAKING CHANGES
9+
10+
* .NET Core v3.1 is required with JSII v1.1
11+
12+
### Features
13+
14+
* **cloud9:** Support Cloud9 EC2 Environment ([#6298](https://github.com/aws/aws-cdk/issues/6298)) ([f50b876](https://github.com/aws/aws-cdk/commit/f50b8769548c34a66cf05079d1ac721c83992840))
15+
* **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)
16+
* **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)
17+
* **events:** AWS Batch event target ([#6570](https://github.com/aws/aws-cdk/issues/6570)) ([73899a9](https://github.com/aws/aws-cdk/commit/73899a95ffe52c51ff77155fd654c2b4cdef7241))
18+
19+
20+
### Bug Fixes
21+
22+
* **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)
23+
* **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)
24+
* **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)
25+
* **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))
26+
* **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)
27+
* **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))
28+
* **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)
29+
30+
31+
* .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))
32+
533
## [1.30.0](https://github.com/aws/aws-cdk/compare/v1.29.0...v1.30.0) (2020-03-18)
634

735

CONTRIBUTING.md

+22
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ and let us know if it's not up-to-date (even better, submit a PR with your corr
2727
- [Full clean build](#full-clean-build)
2828
- [Full Docker build](#full-docker-build)
2929
- [Partial build](#partial-build)
30+
- [Partial pack](#partial-pack)
3031
- [Quick Iteration](#quick-iteration)
3132
- [Linking against this repository](#linking-against-this-repository)
3233
- [Running integration tests in parallel](#running-integration-tests-in-parallel)
@@ -424,6 +425,27 @@ $ ../../../scripts/buildup
424425
Note that `buildup` uses `foreach.sh`, which means it's resumable. If your build fails and you wish to resume, just run
425426
`buildup --resume`. If you wish to restart, run `buildup` again.
426427

428+
### Partial pack
429+
430+
Packing involves generating CDK code in the various target languages, and packaged up ready to be published to the
431+
respective package managers. Once in a while, these will need to be generated either to test the experience of a new
432+
feature, or reproduce a packaging failure.
433+
434+
Before running this, make sure either that the CDK module and all of its dependencies are already built. See [Partial
435+
build](#partial-build) or [Full clean build](#full-clean-build).
436+
437+
To package a specific module, say the `@aws-cdk/aws-ec2` module:
438+
439+
```console
440+
$ cd <root-of-cdk-repo>
441+
$ docker run --rm --net=host -it -v $PWD:$PWD -w $PWD jsii/superchain
442+
docker$ cd packages/@aws-cdk/aws-ec2
443+
docker$ ../../../scripts/foreach.sh --up yarn run package
444+
docker$ exit
445+
```
446+
447+
The `dist/` folder within each module contains the packaged up language artifacts.
448+
427449
### Quick Iteration
428450

429451
After you've built the modules you want to work on once, use `lr watch` for each module that you are modifying.

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.30.0"
13+
"version": "1.31.0"
1414
}

packages/@aws-cdk/aws-apigateway/README.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -619,10 +619,18 @@ domain.addBasePathMapping(api1, { basePath: 'go-to-api1' });
619619
domain.addBasePathMapping(api2, { basePath: 'boom' });
620620
```
621621

622-
NOTE: currently, the mapping will always be assigned to the APIs
623-
`deploymentStage`, which will automatically assigned to the latest API
624-
deployment. Raise a GitHub issue if you require more granular control over
625-
mapping base paths to stages.
622+
You can specify the API `Stage` to which this base path URL will map to. By default, this will be the
623+
`deploymentStage` of the `RestApi`.
624+
625+
```ts
626+
const betaDeploy = new Deployment(this, 'beta-deployment', {
627+
api: restapi,
628+
});
629+
const betaStage = new Stage(this, 'beta-stage', {
630+
deployment: betaDeploy,
631+
});
632+
domain.addBasePathMapping(restapi, { basePath: 'api/beta', stage: betaStage });
633+
```
626634

627635
If you don't specify `basePath`, all URLs under this domain will be mapped
628636
to the API, and you won't be able to map another API to the same domain:

packages/@aws-cdk/aws-apigateway/lib/base-path-mapping.ts

+12-4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Construct, Resource, Token } from '@aws-cdk/core';
22
import { CfnBasePathMapping } from './apigateway.generated';
33
import { IDomainName } from './domain-name';
44
import { IRestApi, RestApi } from './restapi';
5+
import { Stage } from './stage';
56

67
export interface BasePathMappingOptions {
78
/**
@@ -13,6 +14,13 @@ export interface BasePathMappingOptions {
1314
* is undefined, no additional mappings will be allowed on this domain name.
1415
*/
1516
readonly basePath?: string;
17+
18+
/**
19+
* The Deployment stage of API
20+
* [disable-awslint:ref-via-interface]
21+
* @default - map to deploymentStage of restApi otherwise stage needs to pass in URL
22+
*/
23+
readonly stage?: Stage;
1624
}
1725

1826
export interface BasePathMappingProps extends BasePathMappingOptions {
@@ -44,17 +52,17 @@ export class BasePathMapping extends Resource {
4452
}
4553
}
4654

47-
// if this is an owned API and it has a deployment stage, map all requests
55+
// if restApi is an owned API and it has a deployment stage, map all requests
4856
// to that stage. otherwise, the stage will have to be specified in the URL.
49-
const stage = props.restApi instanceof RestApi
57+
const stage = props.stage ?? (props.restApi instanceof RestApi
5058
? props.restApi.deploymentStage
51-
: undefined;
59+
: undefined);
5260

5361
new CfnBasePathMapping(this, 'Resource', {
5462
basePath: props.basePath,
5563
domainName: props.domainName.domainName,
5664
restApiId: props.restApi.restApiId,
57-
stage: stage && stage.stageName,
65+
stage: stage && stage.stageName
5866
});
5967
}
6068
}

packages/@aws-cdk/aws-apigateway/test/test.domains.ts

+52
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,58 @@ export = {
330330
}
331331
}));
332332

333+
test.done();
334+
},
335+
336+
'"addBasePathMapping" can be used to add base path mapping to the domain with specific stage'(test: Test) {
337+
// GIVEN
338+
const stack = new Stack();
339+
const api1 = new apigw.RestApi(stack, 'api1');
340+
const api2 = new apigw.RestApi(stack, 'api2');
341+
const domain = new apigw.DomainName(stack, 'my-domain', {
342+
domainName: 'example.com',
343+
certificate: acm.Certificate.fromCertificateArn(stack, 'cert', 'arn:aws:acm:us-east-1:1111111:certificate/11-3336f1-44483d-adc7-9cd375c5169d'),
344+
endpointType: apigw.EndpointType.REGIONAL
345+
});
346+
api1.root.addMethod('GET');
347+
api2.root.addMethod('GET');
348+
349+
const testDeploy = new apigw.Deployment(stack, 'test-deployment', {
350+
api: api1
351+
});
352+
353+
const testStage = new apigw.Stage(stack, 'test-stage', {
354+
deployment : testDeploy
355+
});
356+
357+
// WHEN
358+
domain.addBasePathMapping(api1, { basePath: 'api1', stage: testStage });
359+
domain.addBasePathMapping(api2, { basePath: 'api2' });
360+
361+
// THEN
362+
expect(stack).to(haveResource('AWS::ApiGateway::BasePathMapping', {
363+
"DomainName": {
364+
"Ref": "mydomain592C948B"
365+
},
366+
"BasePath": "api1",
367+
"RestApiId": {
368+
"Ref": "api1A91238E2"
369+
},
370+
"Stage": stack.resolve(testStage.stageName)
371+
}));
372+
373+
expect(stack).to(haveResource('AWS::ApiGateway::BasePathMapping', {
374+
"DomainName": {
375+
"Ref": "mydomain592C948B"
376+
},
377+
"BasePath": "api2",
378+
"RestApiId": {
379+
"Ref": "api2C4850CEA"
380+
},
381+
"Stage": {
382+
"Ref": "api2DeploymentStageprod4120D74E"
383+
}
384+
}));
333385
test.done();
334386
}
335387
};

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
},
4646
"EmailVerificationMessage": "Hello {username}, Your verification code is {####}",
4747
"EmailVerificationSubject": "Verify your new account",
48-
"LambdaConfig": {},
4948
"SmsConfiguration": {
5049
"ExternalId": "awsappsyncintegPool5D14B05B",
5150
"SnsCallerArn": {
@@ -606,4 +605,4 @@
606605
"DeletionPolicy": "Delete"
607606
}
608607
}
609-
}
608+
}

packages/@aws-cdk/aws-cloudfront/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"devDependencies": {
6565
"@aws-cdk/assert": "0.0.0",
6666
"@types/nodeunit": "^0.0.30",
67-
"aws-sdk": "^2.644.0",
67+
"aws-sdk": "^2.646.0",
6868
"cdk-build-tools": "0.0.0",
6969
"cdk-integ-tools": "0.0.0",
7070
"cfn2ts": "0.0.0",

packages/@aws-cdk/aws-cloudtrail/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"devDependencies": {
6565
"@aws-cdk/assert": "0.0.0",
6666
"@types/nodeunit": "^0.0.30",
67-
"aws-sdk": "^2.644.0",
67+
"aws-sdk": "^2.646.0",
6868
"cdk-build-tools": "0.0.0",
6969
"cdk-integ-tools": "0.0.0",
7070
"cfn2ts": "0.0.0",

packages/@aws-cdk/aws-codebuild/README.md

+35-5
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ The CodeBuild library supports both Linux and Windows images via the
189189
`LinuxBuildImage` and `WindowsBuildImage` classes, respectively.
190190

191191
You can either specify one of the predefined Windows/Linux images by using one
192-
of the constants such as `WindowsBuildImage.WIN_SERVER_CORE_2016_BASE` or
192+
of the constants such as `WindowsBuildImage.WINDOWS_BASE_2_0` or
193193
`LinuxBuildImage.STANDARD_2_0`.
194194

195195
Alternatively, you can specify a custom image using one of the static methods on
@@ -371,11 +371,41 @@ For example:
371371
```ts
372372
const vpc = new ec2.Vpc(this, 'MyVPC');
373373
const project = new codebuild.Project(this, 'MyProject', {
374-
vpc: vpc,
375-
buildSpec: codebuild.BuildSpec.fromObject({
376-
// ...
377-
}),
374+
vpc: vpc,
375+
buildSpec: codebuild.BuildSpec.fromObject({
376+
// ...
377+
}),
378378
});
379379

380380
project.connections.allowTo(loadBalancer, ec2.Port.tcp(443));
381381
```
382+
383+
## Project File System Location EFS
384+
385+
Add support for CodeBuild to build on AWS EFS file system mounts using
386+
the new ProjectFileSystemLocation.
387+
The `fileSystemLocations` property which accepts a list `ProjectFileSystemLocation`
388+
as represented by the interface `IFileSystemLocations`.
389+
The only supported file system type is `EFS`.
390+
391+
For example:
392+
393+
```ts
394+
new codebuild.Project(stack, 'MyProject', {
395+
buildSpec: codebuild.BuildSpec.fromObject({
396+
version: '0.2',
397+
}),
398+
fileSystemLocations: [
399+
codebuild.FileSystemLocation.efs({
400+
identifier: "myidentifier2",
401+
location: "myclodation.mydnsroot.com:/loc",
402+
mountPoint: "/media",
403+
mountOptions: "opts"
404+
})
405+
]
406+
});
407+
```
408+
409+
Here's a CodeBuild project with a simple example that creates a project mounted on AWS EFS:
410+
411+
[Minimal Example](./test/integ.project-file-system-location.ts)

0 commit comments

Comments
 (0)