Skip to content

Commit a87259f

Browse files
authored
2 parents 4c11af6 + b99c8dd commit a87259f

File tree

6,861 files changed

+290324
-244207
lines changed

Some content is hidden

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

6,861 files changed

+290324
-244207
lines changed

.github/workflows/github-merit-badger.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ jobs:
1717
badges: '[beginning-contributor,repeat-contributor,valued-contributor,admired-contributor,star-contributor,distinguished-contributor]'
1818
thresholds: '[0,3,6,13,25,50]'
1919
badge-type: 'achievement'
20-
ignore-usernames: '[RomainMuller,rix0rrr,Jerry-AWS,MrArnoldPalmer,iliapolo,otaviomacedo,madeline-k,kaizencc,comcalvi,corymhall,peterwoodworth,ryparker,TheRealAmazonKendra,vinayak-kukreja,Naumel,mrgrain,pahud,cgarvis,kellertk,aws-cdk-automation,dependabot[bot],mergify[bot]]'
20+
ignore-usernames: '[RomainMuller,rix0rrr,Jerry-AWS,MrArnoldPalmer,iliapolo,otaviomacedo,madeline-k,kaizencc,comcalvi,corymhall,peterwoodworth,ryparker,TheRealAmazonKendra,vinayak-kukreja,Naumel,mrgrain,pahud,cgarvis,kellertk,HBobertz,aws-cdk-automation,dependabot[bot],mergify[bot]]'

.github/workflows/yarn-upgrade.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ jobs:
3838
- name: Install Tools
3939
run: |-
4040
npm -g install lerna npm-check-updates@^9.0.0
41-
- name: Build CLI
42-
run: cd packages/aws-cdk && ../../scripts/buildup
4341
- name: Build Integ Runner
4442
run: cd packages/@aws-cdk/integ-runner && ../../../scripts/buildup
4543
- name: List Mono-Repo Packages
@@ -69,6 +67,8 @@ jobs:
6967
for pj in $(find packages/aws-cdk/lib/init-templates -name package.json); do
7068
(cd $(dirname $pj) && ncu --upgrade --reject='@types/jest,@types/node,@types/prettier,@types/fs-extra,constructs,typescript,aws-sdk,aws-sdk-mock,ts-jest,jest,${{ steps.list-packages.outputs.list }}')
7169
done
70+
# Upgrade dependencies at an aws-eks integ test docker image
71+
cd packages/@aws-cdk/aws-eks/test/sdk-call-integ-test-docker-app/app/ && ncu --upgrade --reject='@types/jest,@types/node,@types/prettier,@types/fs-extra,constructs,typescript,aws-sdk,aws-sdk-mock,ts-jest,jest,${{ steps.list-packages.outputs.list }}'
7272
7373
# This will ensure the current lockfile is up-to-date with the dependency specifications (necessary for "yarn update" to run)
7474
- name: Run "yarn install"

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ cdk.context.json
3434
.cdk.staging/
3535
cdk.out/
3636
*.tabl.json
37+
cdk-integ.out.*/
3738

3839
# Yarn error log
3940
yarn-error.log

.mergify.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pull_request_rules:
1010
label:
1111
add: [ contribution/core ]
1212
conditions:
13-
- author~=^(RomainMuller|rix0rrr|Jerry-AWS|MrArnoldPalmer|iliapolo|uttarasridhar|otaviomacedo|madeline-k|kaizencc|comcalvi|corymhall|peterwoodworth|ryparker|TheRealAmazonKendra|yuth|vinayak-kukreja|Naumel|mrgrain|pahud|cgarvis|kellertk)$
13+
- author~=^(RomainMuller|rix0rrr|Jerry-AWS|MrArnoldPalmer|iliapolo|uttarasridhar|otaviomacedo|madeline-k|kaizencc|comcalvi|corymhall|peterwoodworth|ryparker|TheRealAmazonKendra|yuth|vinayak-kukreja|Naumel|mrgrain|pahud|cgarvis|kellertk|HBobertz)$
1414
- -label~="contribution/core"
1515
- name: automatic merge
1616
actions:

CHANGELOG.v2.alpha.md

+19
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
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+
## [2.51.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.50.0-alpha.0...v2.51.0-alpha.0) (2022-11-18)
6+
7+
8+
### Features
9+
10+
* **gamelift:** add BuildFleet L2 Construct for GameLift ([#22835](https://github.com/aws/aws-cdk/issues/22835)) ([834fab4](https://github.com/aws/aws-cdk/commit/834fab4983526eced3ddbdd58c5bfefbe757715d))
11+
* **gamelift:** add GameServerGroup L2 Construct for GameLift ([#22762](https://github.com/aws/aws-cdk/issues/22762)) ([ef74116](https://github.com/aws/aws-cdk/commit/ef74116aad56abbcea788ef3662a6ae6e74c4145))
12+
* **integ-runner:** support config file ([#22937](https://github.com/aws/aws-cdk/issues/22937)) ([4f49efe](https://github.com/aws/aws-cdk/commit/4f49efe35eaffd662c22e0d80e9b7fadeb25ab37))
13+
* **integ-runner:** support custom `--app` commands ([#22761](https://github.com/aws/aws-cdk/issues/22761)) ([a7bb6e1](https://github.com/aws/aws-cdk/commit/a7bb6e1a8a9a9f3fe534069ec77b4f6b10307c9f)), closes [#22521](https://github.com/aws/aws-cdk/issues/22521)
14+
* **integ-runner:** support custom `--test-regex` to match integ test files ([#22786](https://github.com/aws/aws-cdk/issues/22786)) ([fa1a439](https://github.com/aws/aws-cdk/commit/fa1a4395230790c89d5c468306759f4a6c5f7e0c)), closes [#22761](https://github.com/aws/aws-cdk/issues/22761) [#22521](https://github.com/aws/aws-cdk/issues/22521)
15+
* **integ-runner:** support snapshot diff on nested stacks ([#22881](https://github.com/aws/aws-cdk/issues/22881)) ([5b3d06d](https://github.com/aws/aws-cdk/commit/5b3d06d808d1eb110943b2c68de75ae6d5b5e624))
16+
* **sagemaker:** add EndpointConfig L2 construct ([#22865](https://github.com/aws/aws-cdk/issues/22865)) ([0e97c15](https://github.com/aws/aws-cdk/commit/0e97c15b49d02b44ea4916a3f29a156ca69a5a23)), closes [#2809](https://github.com/aws/aws-cdk/issues/2809)
17+
* **sagemaker:** add Model L2 construct ([#22549](https://github.com/aws/aws-cdk/issues/22549)) ([93915f1](https://github.com/aws/aws-cdk/commit/93915f113e656de8374c99e42135f698f0877685)), closes [#2809](https://github.com/aws/aws-cdk/issues/2809)
18+
19+
20+
### Bug Fixes
21+
22+
* **gamelift:** restrict policy to access Script / Build content in S3 ([#22767](https://github.com/aws/aws-cdk/issues/22767)) ([c936002](https://github.com/aws/aws-cdk/commit/c93600260c86dfbc6a8f8f2399a6ac9d0f4b4d35))
23+
524
## [2.50.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.49.1-alpha.0...v2.50.0-alpha.0) (2022-11-01)
625

726

CHANGELOG.v2.md

+41
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,47 @@
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+
## [2.51.0](https://github.com/aws/aws-cdk/compare/v2.50.0...v2.51.0) (2022-11-18)
6+
7+
8+
### Features
9+
10+
* **assertions:** allResources and allResourcesProperties methods ([#22007](https://github.com/aws/aws-cdk/issues/22007)) ([2430537](https://github.com/aws/aws-cdk/commit/24305376260407ea4101ffc6637470c1ecd97ec5)), closes [#21269](https://github.com/aws/aws-cdk/issues/21269)
11+
* **cfnspec:** cloudformation spec v96.0.0 ([#22775](https://github.com/aws/aws-cdk/issues/22775)) ([aa19ec0](https://github.com/aws/aws-cdk/commit/aa19ec05835a7c71e1aa01dcd649a4d933ef1fd8))
12+
* **cfnspec:** cloudformation spec v97.0.0 ([#22876](https://github.com/aws/aws-cdk/issues/22876)) ([e29df69](https://github.com/aws/aws-cdk/commit/e29df698fbd1f5365edf4f71a91417d47806fc1c))
13+
* **codebuild:** interactive breakpoints using SSM ([#22728](https://github.com/aws/aws-cdk/issues/22728)) ([bf165a1](https://github.com/aws/aws-cdk/commit/bf165a1f76f44114f0c37b0c1dace6f2ac0e828f))
14+
* **cognito:** deletion protection for user pools ([#22765](https://github.com/aws/aws-cdk/issues/22765)) ([9bde9f3](https://github.com/aws/aws-cdk/commit/9bde9f3149cbfa6e7b97204f54e7cef5c9127971))
15+
* **ec2:** change log format in Vpc flow logs ([#22430](https://github.com/aws/aws-cdk/issues/22430)) ([26779f8](https://github.com/aws/aws-cdk/commit/26779f8b233a1ff6ba35fe2b364df4971bfcce9f)), closes [#16279](https://github.com/aws/aws-cdk/issues/16279) [/github.com/aws/aws-cdk/pull/16279#discussion_r808075037](https://github.com/aws//github.com/aws/aws-cdk/pull/16279/issues/discussion_r808075037) [#19316](https://github.com/aws/aws-cdk/issues/19316)
16+
* **iam:** customize IAM role creation behavior ([#22856](https://github.com/aws/aws-cdk/issues/22856)) ([b25e526](https://github.com/aws/aws-cdk/commit/b25e52616717b55a309c5d6d0998f2fd4cc6fe39)), closes [#22749](https://github.com/aws/aws-cdk/issues/22749) [#22862](https://github.com/aws/aws-cdk/issues/22862)
17+
* **lambda:** add nodejs18.x runtime ([#22964](https://github.com/aws/aws-cdk/issues/22964)) ([176feef](https://github.com/aws/aws-cdk/commit/176feefd7ceb4e8dc622283e2b40cab306705580))
18+
* lambda-layer-awscli): depend on @awscdk/asset-awscli-v1 and reduce aws-cdk-lib size ([#22823](https://github.com/aws/aws-cdk/issues/22823)) ([4bdb18e](https://github.com/aws/aws-cdk/commit/4bdb18e6a43c41ad403c16ab836fe7b991f9531c))
19+
* **lambda-layer-kubectl:** depend on @awscdk/asset-kubectl-v20 and reduce aws-cdk-lib size ([#22677](https://github.com/aws/aws-cdk/issues/22677)) ([6c606d0](https://github.com/aws/aws-cdk/commit/6c606d0f103681db2632d614843233632327693e))
20+
* **lambda-layer-node-proxy-agent:** depend on @awscdk/asset-node-proxy-agent-v5 and reduce aws-cdk-lib size ([#22769](https://github.com/aws/aws-cdk/issues/22769)) ([4d4e8cc](https://github.com/aws/aws-cdk/commit/4d4e8cc455a2828d76374a3174a1ce8bb600aac5))
21+
22+
23+
### Bug Fixes
24+
25+
* **cli:** asset prebuild breaks some custom bootstrap scenarios ([#22930](https://github.com/aws/aws-cdk/issues/22930)) ([fc4668d](https://github.com/aws/aws-cdk/commit/fc4668d6ef23702547890549568a9205c79149f8)), closes [#21965](https://github.com/aws/aws-cdk/issues/21965)
26+
* **cli:** assetParallelism option in cdk.json is not recognized ([#22781](https://github.com/aws/aws-cdk/issues/22781)) ([e2a9c77](https://github.com/aws/aws-cdk/commit/e2a9c778f48c098990d2492bf7e269651056d667))
27+
* **cli:** synthesis stops on expired AWS credentials ([#22861](https://github.com/aws/aws-cdk/issues/22861)) ([0a55e91](https://github.com/aws/aws-cdk/commit/0a55e91950c00daa4fc1a29ca8bad268620a64f3))
28+
* **cloudfront:** custom originId not used for multiple behaviors with same origin ([#22830](https://github.com/aws/aws-cdk/issues/22830)) ([2f1e2e9](https://github.com/aws/aws-cdk/commit/2f1e2e9a3c87ecf7b76b253c6445c5099e15218a)), closes [#22758](https://github.com/aws/aws-cdk/issues/22758)
29+
* **cloudfront:** OriginShield not easily disabled once enabled on an origin ([#22791](https://github.com/aws/aws-cdk/issues/22791)) ([6be4cf6](https://github.com/aws/aws-cdk/commit/6be4cf63470239db7ea402a20fdd6099e53a185a))
30+
* **ecs:** adding a circuit breaker causes Service replacement (under feature flag) ([#22467](https://github.com/aws/aws-cdk/issues/22467)) ([9437d4f](https://github.com/aws/aws-cdk/commit/9437d4fd5957419145b70209e9ab06a8d415efa1)), closes [#16126](https://github.com/aws/aws-cdk/issues/16126) [#16919](https://github.com/aws/aws-cdk/issues/16919) [#22328](https://github.com/aws/aws-cdk/issues/22328)
31+
* **events-targets:** encrypted queues get too wide permissions (under feature flag) ([#22740](https://github.com/aws/aws-cdk/issues/22740)) ([a36f2f0](https://github.com/aws/aws-cdk/commit/a36f2f0d3e71e0b2467812a9d93d4b0b26629a60))
32+
* **iam:** oidc provider fetches leaf certificate thumbprint instead of root ([#22802](https://github.com/aws/aws-cdk/issues/22802)) ([280b876](https://github.com/aws/aws-cdk/commit/280b876d426522fd043f13ff0b188e29acaa0fbf)), closes [40aws-cdk/aws-iam/lib/oidc-provider/external.ts#L40](https://github.com/40aws-cdk/aws-iam/lib/oidc-provider/external.ts/issues/L40) [40aws-cdk/aws-iam/lib/oidc-provider/external.ts#L46](https://github.com/40aws-cdk/aws-iam/lib/oidc-provider/external.ts/issues/L46) [40aws-cdk/aws-eks/lib/oidc-provider.ts#L49](https://github.com/40aws-cdk/aws-eks/lib/oidc-provider.ts/issues/L49)
33+
* **s3-deployment:** `responseURL` is in CloudWatch Logs ([#22952](https://github.com/aws/aws-cdk/issues/22952)) ([863548d](https://github.com/aws/aws-cdk/commit/863548d9e5d643c18e939556661cc8a05b6f7742))
34+
* CDK does not work in FIPS-restricted environments ([#22878](https://github.com/aws/aws-cdk/issues/22878)) ([76a56ad](https://github.com/aws/aws-cdk/commit/76a56adf72bde721bd2da22fc25d1730ab751e3a))
35+
* **events-targets:** policy restricts access to the same account as the Queue, not the Rule ([#22766](https://github.com/aws/aws-cdk/issues/22766)) ([0083256](https://github.com/aws/aws-cdk/commit/0083256d2329e6195c96a45589079f678b67a184))
36+
* **iam:** service principals use unnecessary exceptions (under feature flag) ([#22819](https://github.com/aws/aws-cdk/issues/22819)) ([65d8e3d](https://github.com/aws/aws-cdk/commit/65d8e3d7814ac69d6cfa2bfd0d4219817028a14b))
37+
* **region-info:** EC2 service principal is incorrect in GovCloud regions ([#22589](https://github.com/aws/aws-cdk/issues/22589)) ([1c707eb](https://github.com/aws/aws-cdk/commit/1c707eb9456bbe9226471c0930713d3bfde42130))
38+
* **s3:** remove restriction of creating lifecycle rule for noncurrent objects when bucket versionining is not set up ([#22803](https://github.com/aws/aws-cdk/issues/22803)) ([b20a6b4](https://github.com/aws/aws-cdk/commit/b20a6b4964bdb6939c35db20362aaf681192cc95)), closes [#22392](https://github.com/aws/aws-cdk/issues/22392)
39+
* **stepfunctions-tasks:** custom resource uses subprocess with Shell=true ([#22752](https://github.com/aws/aws-cdk/issues/22752)) ([bd056d1](https://github.com/aws/aws-cdk/commit/bd056d1d38a2d3f43efe4f857c4d38b30fb9b681))
40+
41+
42+
### Reverts
43+
44+
* "chore: add AWSLINT_SAVE to the PR buildspec ([#22743](https://github.com/aws/aws-cdk/issues/22743))" ([#22782](https://github.com/aws/aws-cdk/issues/22782)) ([df5830c](https://github.com/aws/aws-cdk/commit/df5830cc20ea3e7010ffba3aee9f29c31a4533e1))
45+
546
## [2.50.0](https://github.com/aws/aws-cdk/compare/v2.49.1...v2.50.0) (2022-11-01)
647

748

CONTRIBUTING.md

+22-8
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ Work your magic. Here are some guidelines:
266266

267267
Integration tests perform a few functions in the CDK code base -
268268
1. Acts as a regression detector. It does this by running `cdk synth` on the integration test and comparing it against
269-
the `*.integ.snapshot` directory. This highlights how a change affects the synthesized stacks.
269+
the `*.snapshot` directory. This highlights how a change affects the synthesized stacks.
270270
2. Allows for a way to verify if the stacks are still valid CloudFormation templates, as part of an intrusive change.
271271
This is done by running `yarn integ` which will run `cdk deploy` across all of the integration tests in that package. If you are developing a new integration test or for some other reason want to work on a single integration test over and over again without running through all the integration tests you can do so using `yarn integ integ.test-name.js`
272272
Remember to set up AWS credentials before doing this.
@@ -953,21 +953,35 @@ changes are only allowed in major versions and those are rare.
953953
To address this need, we have a feature flags pattern/mechanism. It allows us to
954954
introduce new breaking behavior which is disabled by default (so existing
955955
projects will not be affected) but enabled automatically for new projects
956-
created through `cdk init`.
956+
created through `cdk init`. Existing users can selectively opt in to new
957+
behavior on their own schedule.
957958

958-
The pattern is simple:
959+
Whenever a change leads to CloudFormation template differences that cause any of
960+
the following during an update, it is not safe to apply the new behavior
961+
automatically, and we have to use a feature flag:
962+
963+
- Resources replacement leading to service disruption; or
964+
- Users could have taken assumptions on the old setup and the change will break them.
965+
966+
Adding a new flag looks as follows:
959967

960968
1. Define a new const under
961969
[cx-api/lib/features.ts](https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk/cx-api/lib/features.ts)
962-
with the name of the context key that **enables** this new feature (for
970+
with the name of the context key that enables this new feature (for
963971
example, `ENABLE_STACK_NAME_DUPLICATES`). The context key should be in the
964972
form `module.Type:feature` (e.g. `@aws-cdk/core:enableStackNameDuplicates`).
973+
- Set `introducedIn.v2` to the literal string `'V2NEXT'`.
974+
- Double negatives should be avoided. If you want to add a flag that disables something that was previously
975+
enabled, set `default.v2` to `true` and the `recommendedValue` to `false`. You will need to update
976+
a test in `features.test.ts` -- this is okay if you have a good reason.
965977
2. Use `FeatureFlags.of(construct).isEnabled(cxapi.ENABLE_XXX)` to check if this feature is enabled
966978
in your code. If it is not defined, revert to the legacy behavior.
967-
3. Add your feature flag to the `FUTURE_FLAGS` map in
968-
[cx-api/lib/features.ts](https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk/cx-api/lib/features.ts).
969-
This map is inserted to generated `cdk.json` files for new projects created
970-
through `cdk init`.
979+
3. Add your feature flag to the `FLAGS` map in
980+
[cx-api/lib/features.ts](https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk/cx-api/lib/features.ts). In
981+
your description, be sure to cover the following:
982+
- Consciously pick the type of feature flag. Can the flag be removed in a future major version, or not?
983+
- Motivate why the feature flag exists. What is the change to existing infrastructure and why is it not safe?
984+
- In case of a "default change flag", describe what the user needs to do to restore the old behavior.
971985
4. Add an entry for your feature flag in the [README](https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk/cx-api/README.md) file.
972986
5. In your tests, ensure that you test your feature with and without the feature flag enabled. You can do this by passing the feature flag to the `context` property when instantiating an `App`.
973987
```ts

INTEGRATION_TESTS.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on what type of changes require integrations tests and how you should write inte
1717
All Construct libraries in the CDK code base have integration tests that serve to -
1818

1919
1. Acts as a regression detector. It does this by running `cdk synth` on the integration test and comparing it against
20-
the Cloud Assembly stored in the snapshot (`*.integ.snapshot/`) directory. This highlights how a change affects the synthesized stacks.
20+
the Cloud Assembly stored in the snapshot (`*.snapshot/`) directory. This highlights how a change affects the synthesized stacks.
2121
2. Allows for a way to verify if the stacks are still valid CloudFormation templates, as part of an intrusive change.
2222
This is done by running `yarn integ` which will run `cdk deploy` across all of the integration tests in that package.
2323
If you are developing a new integration test or for some other reason want to work on a single integration test
@@ -115,7 +115,7 @@ This will:
115115
1. Synthesize the CDK app
116116
2. `cdk deploy` to your AWS account
117117
3. `cdk destroy` to delete the stack
118-
4. Save a snapshot of the Cloud Assembly to `lambda.integ.snapshot/`
118+
4. Save a snapshot of the Cloud Assembly to `integ.lambda.js.snapshot/`
119119

120120
Now when you run `npm test` it will synth the integ app and compare the result with the snapshot.
121121
If the snapshot has changed the same process must be followed to update the snapshot.

0 commit comments

Comments
 (0)