Skip to content

Commit c2f38e8

Browse files
authored
2 parents 953bc25 + 0c279fd commit c2f38e8

File tree

323 files changed

+11119
-1993
lines changed

Some content is hidden

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

323 files changed

+11119
-1993
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,5 @@ yarn-error.log
4545

4646
# Cloud9
4747
.c9
48+
49+
/.versionrc.json

.versionrc.json

-5
This file was deleted.

CHANGELOG.md

+42-1
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,55 @@
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.72.0](https://github.com/aws/aws-cdk/compare/v1.71.0...v1.72.0) (2020-11-06)
6+
7+
8+
### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES
9+
10+
* **rds:** Serverless cluster `enableHttpEndpoint` renamed to `enableDataApi`
11+
* **stepfunctions-tasks:** type of `outputLocation` in the experimental Athena `StartQueryExecution` has been changed to `s3.Location` from `string`
12+
13+
### Features
14+
15+
* **apigatewayv2:** http api - endpoint url ([#11092](https://github.com/aws/aws-cdk/issues/11092)) ([c200413](https://github.com/aws/aws-cdk/commit/c20041356940c5569c00e82f9e6bee794002929b)), closes [#10651](https://github.com/aws/aws-cdk/issues/10651)
16+
* **apigatewayv2:** vpc link and private integrations ([#11198](https://github.com/aws/aws-cdk/issues/11198)) ([e87a6a3](https://github.com/aws/aws-cdk/commit/e87a6a333c06d157f6d9074e05f251505525d0d5)), closes [#10531](https://github.com/aws/aws-cdk/issues/10531) [#10119](https://github.com/aws/aws-cdk/issues/10119) [aws/jsii#1947](https://github.com/aws/jsii/issues/1947)
17+
* **appmesh:** add Virtual Gateways and Gateway Routes ([#10879](https://github.com/aws/aws-cdk/issues/10879)) ([79200e7](https://github.com/aws/aws-cdk/commit/79200e75b2468ccdee46154d049f3ceb30bb51e1))
18+
* **appsync:** add RDS datasource ([#9258](https://github.com/aws/aws-cdk/issues/9258)) ([23d0943](https://github.com/aws/aws-cdk/commit/23d0943216df76bea395b319deb21282e4c57a7c)), closes [#9152](https://github.com/aws/aws-cdk/issues/9152)
19+
* **appsync:** support custom cloudWatchLogsRoleArn for GraphqlApi ([#10357](https://github.com/aws/aws-cdk/issues/10357)) ([bed89a5](https://github.com/aws/aws-cdk/commit/bed89a5d0aabe7d9a25ad7fac74a38f03b92e4c9)), closes [#9441](https://github.com/aws/aws-cdk/issues/9441)
20+
* **ec2:** Add Lambda interface endpoint ([#11260](https://github.com/aws/aws-cdk/issues/11260)) ([9d0c935](https://github.com/aws/aws-cdk/commit/9d0c935fc62f325105598473e39b47b247437146)), closes [#11259](https://github.com/aws/aws-cdk/issues/11259)
21+
* intro "Names.uniqueId()" instead of the deprecated "node.uniqueId" ([#11166](https://github.com/aws/aws-cdk/issues/11166)) ([5e433b1](https://github.com/aws/aws-cdk/commit/5e433b1d52470c3ecf5a460f79e4b8103542c35c)), closes [aws/constructs#314](https://github.com/aws/constructs/issues/314)
22+
* **ecs-patterns:** add option to create cname instead of alias record ([#10812](https://github.com/aws/aws-cdk/issues/10812)) ([89a5055](https://github.com/aws/aws-cdk/commit/89a505524ae3fe1c726d6988df07da6167493480))
23+
* **ecs-service-extensions:** create an `Environment` from attributes ([#10932](https://github.com/aws/aws-cdk/issues/10932)) ([d395b5e](https://github.com/aws/aws-cdk/commit/d395b5e618fc423c46c65b9be40d0c1423e2b578)), closes [#10931](https://github.com/aws/aws-cdk/issues/10931)
24+
* **rds:** add grant method for Data API ([#10748](https://github.com/aws/aws-cdk/issues/10748)) ([884539b](https://github.com/aws/aws-cdk/commit/884539b231245c893c456b2c619fe661cd39960f)), closes [#10744](https://github.com/aws/aws-cdk/issues/10744)
25+
26+
27+
### Bug Fixes
28+
29+
* **apigateway:** changes to gateway response does not trigger auto deployment ([#11068](https://github.com/aws/aws-cdk/issues/11068)) ([0c8264a](https://github.com/aws/aws-cdk/commit/0c8264adf782d1adbfe8d538186a71093d9c8834)), closes [#10963](https://github.com/aws/aws-cdk/issues/10963)
30+
* **cfnspec:** incorrect Route 53 health check configuration properties in CloudFormation specification ([#11280](https://github.com/aws/aws-cdk/issues/11280)) ([f3c8b50](https://github.com/aws/aws-cdk/commit/f3c8b5034eb7ad1ccd9eecb4a929c8f11a2336d0)), closes [#issuecomment-717435271](https://github.com/aws/aws-cdk/issues/11096#issuecomment-717435271) [#11096](https://github.com/aws/aws-cdk/issues/11096)
31+
* **cli:** `--no-previous-parameters` incorrectly skips updates ([#11288](https://github.com/aws/aws-cdk/issues/11288)) ([1bfc649](https://github.com/aws/aws-cdk/commit/1bfc64948b6ac63f93f030c5a2064b3ac4376289))
32+
* **core:** many nested stacks make NodeJS run out of memory ([#11250](https://github.com/aws/aws-cdk/issues/11250)) ([c124886](https://github.com/aws/aws-cdk/commit/c124886fbcabea166f34250cad84f7526e05b1bf))
33+
* **core:** multiple library copies lead to 'Assets must be defined within Stage or App' error ([#11113](https://github.com/aws/aws-cdk/issues/11113)) ([fcfed39](https://github.com/aws/aws-cdk/commit/fcfed39e3524eef66d3638896bf4ca86697f1718)), closes [#10314](https://github.com/aws/aws-cdk/issues/10314)
34+
* **core:** support docker engine v20.10.0-beta1 ([#11124](https://github.com/aws/aws-cdk/issues/11124)) ([87887a3](https://github.com/aws/aws-cdk/commit/87887a3faf24f5fde608135429585c6521637764))
35+
* **dynamodb:** Misconfigured metrics causing empty graphs ([#11283](https://github.com/aws/aws-cdk/issues/11283)) ([9968669](https://github.com/aws/aws-cdk/commit/9968669e4f4602a03de67e12bc5636a4f4bb1fd7))
36+
* **ecs:** redirect config should honor openListener flag ([#11115](https://github.com/aws/aws-cdk/issues/11115)) ([ed6e7ed](https://github.com/aws/aws-cdk/commit/ed6e7ed9ebee7dc8932c35885698fc72e2052085))
37+
* **event-targets:** circular dependency when the lambda target is in a different stack ([#11217](https://github.com/aws/aws-cdk/issues/11217)) ([e21f249](https://github.com/aws/aws-cdk/commit/e21f249f7b9c78ed5948d63e7650ee7b8d5b3f8b)), closes [#10942](https://github.com/aws/aws-cdk/issues/10942)
38+
* **pipelines:** asset stage can't support more than 50 assets ([#11284](https://github.com/aws/aws-cdk/issues/11284)) ([5db8e80](https://github.com/aws/aws-cdk/commit/5db8e8018d2b8304025b7e61178c7a747c778a78)), closes [#9353](https://github.com/aws/aws-cdk/issues/9353)
39+
* **secretsmanager:** can't export secret name from Secret ([#11202](https://github.com/aws/aws-cdk/issues/11202)) ([5dcdecb](https://github.com/aws/aws-cdk/commit/5dcdecb2c5d6ce19517af66090cfacabed88025b)), closes [#10914](https://github.com/aws/aws-cdk/issues/10914)
40+
* **secretsmanager:** Secret.fromSecretName doesn't work with ECS ([#11042](https://github.com/aws/aws-cdk/issues/11042)) ([fe1ce73](https://github.com/aws/aws-cdk/commit/fe1ce73ec59fc3ad9d8b138ba2122303e77c0531)), closes [#10309](https://github.com/aws/aws-cdk/issues/10309) [#10519](https://github.com/aws/aws-cdk/issues/10519)
41+
* **stepfunctions:** stack overflow when referenced json path finding encounters a circular object graph ([#11225](https://github.com/aws/aws-cdk/issues/11225)) ([f14d823](https://github.com/aws/aws-cdk/commit/f14d823279e4dbb6ac90ab21d219257b22b81278)), closes [#9319](https://github.com/aws/aws-cdk/issues/9319)
42+
* **stepfunctions-tasks:** Athena* APIs have incorrect supported integration patterns ([#11188](https://github.com/aws/aws-cdk/issues/11188)) ([0f66833](https://github.com/aws/aws-cdk/commit/0f6683394fa6f96d6839b2c107f3dab8045509b4)), closes [#11045](https://github.com/aws/aws-cdk/issues/11045) [#11246](https://github.com/aws/aws-cdk/issues/11246)
43+
* **stepfunctions-tasks:** incorrect S3 permissions for AthenaStartQueryExecution ([#11203](https://github.com/aws/aws-cdk/issues/11203)) ([b35c423](https://github.com/aws/aws-cdk/commit/b35c423644fbd8f20705c16c0809a9fb93e6d6f3))
44+
* explicitly set the 'ImagePullPrincipalType' of image ([#11264](https://github.com/aws/aws-cdk/issues/11264)) ([29aa223](https://github.com/aws/aws-cdk/commit/29aa223f05b5f012b42b662e7a9fcc8fe82167a7)), closes [#10569](https://github.com/aws/aws-cdk/issues/10569)
45+
546
## [1.71.0](https://github.com/aws/aws-cdk/compare/v1.70.0...v1.71.0) (2020-10-29)
647

748

849
### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES
950

1051
* **synthetics:** `runtime` is now a required property.
1152

12-
### ⚠ BREAKING CHANGES
53+
### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES
1354

1455
* **core:** Creation stack traces for `Lazy` values are no longer
1556
captured by default. The `CDK_DEBUG=true` environment variable must be

CONTRIBUTING.md

+53-18
Original file line numberDiff line numberDiff line change
@@ -779,24 +779,59 @@ CDK](https://github.com/aws/aws-cdk/issues/3398) we will either remove the
779779
legacy behavior or flip the logic for all these features and then
780780
reset the `FEATURE_FLAGS` map for the next cycle.
781781
782-
### Versioning
783-
784-
All `package.json` files in this repo use a stable marker version of `0.0.0`.
785-
This means that when you declare dependencies, you should always use `0.0.0`.
786-
This makes it easier for us to bump a new version (the `bump.sh` script will
787-
just update the central version and create a CHANGELOG entry) and also reduces
788-
the chance of merge conflicts after a new version is released.
789-
790-
Additional scripts that take part in the versioning mechanism:
791-
792-
- `scripts/get-version.js` can be used to obtain the actual version of the repo.
793-
You can use either from JavaScript code by `require('./scripts/get-version')`
794-
or from a shell script `node -p "require('./scripts/get-version')"`.
795-
- `scripts/get-version-marker.js` returns `0.0.0` and used to DRY the version
796-
marker.
797-
- `scripts/align-version.sh` and `scripts/align-version.js` are used to align
798-
all package.json files in the repo to the official version. This script is
799-
invoked in CI builds and should not be used inside a development environment.
782+
### Versioning and Release
783+
784+
The `release.json` file at the root of the repo determines which release line
785+
this branch belongs to.
786+
787+
```js
788+
{
789+
"majorVersion": 1 | 2,
790+
"releaseType": "stable" | "alpha" | "rc"
791+
}
792+
```
793+
794+
To reduce merge conflicts in automatic merges between version branches, the
795+
current version number is stored under `version.vNN.json` (where `NN` is
796+
`majorVersion`) and changelogs are stored under `CHANGELOG.NN.md` (for
797+
historical reasons, the changelog for 1.x is under `CHANGELOG.md`). When we
798+
fork to a new release branch (e.g. `v2-main`), we will update `release.json` in
799+
this branch to reflect the new version line, and this information will be used
800+
to determine how releases are cut.
801+
802+
The actual `version` field in all `package.json` files should always be `0.0.0`.
803+
This means that local development builds will use version `0.0.0` instead of the
804+
official version from the version file.
805+
806+
#### `./bump.sh`
807+
808+
This script uses [standard-version] to update the version in `version.vNN.json`
809+
to the next version. By default it will perform a **minor** bump, but `./bump.sh
810+
patch` can be used to perform a patch release if that's needed.
811+
812+
This script will also update the relevant changelog file.
813+
814+
[standard-version]: https://github.com/conventional-changelog/standard-version
815+
816+
#### `scripts/resolve-version.js`
817+
818+
The script evaluates evaluates the configuration in `release.json` and exports an
819+
object like this:
820+
821+
```js
822+
{
823+
version: '2.0.0-alpha.1', // the current version
824+
versionFile: 'version.v2.json', // the version file
825+
changelogFile: 'CHANGELOG.v2.md', // changelog file name
826+
prerelease: 'alpha', // prerelease tag (undefined for stable)
827+
marker: '0.0.0' // version marker in package.json files
828+
}
829+
```
830+
831+
#### scripts/align-version.sh
832+
833+
In official builds, the `scripts/align-version.sh` is used to update all
834+
`package.json` files based on the version from `version.vNN.json`.
800835

801836
## Troubleshooting
802837

bump.sh

+4-18
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,7 @@
1313
#
1414
# --------------------------------------------------------------------------------------------------
1515
set -euo pipefail
16-
version=${1:-minor}
17-
18-
echo "Starting ${version} version bump"
19-
20-
# /bin/bash ./install.sh
21-
22-
# Generate CHANGELOG and create a commit (see .versionrc.json)
23-
npx standard-version --release-as ${version}
24-
25-
# I am sorry.
26-
#
27-
# I've gone diving through the code of `conventional-changelog` to see if there
28-
# was a way to configure the string and ultimately I decided that a 'sed' was the simpler
29-
# way to go.
30-
sed -i.tmp -e 's/BREAKING CHANGES$/BREAKING CHANGES TO EXPERIMENTAL FEATURES/' CHANGELOG.md
31-
rm CHANGELOG.md.tmp
32-
git add CHANGELOG.md
33-
git commit --amend --no-edit
16+
scriptdir=$(cd $(dirname $0) && pwd)
17+
cd ${scriptdir}
18+
yarn --frozen-lockfile
19+
${scriptdir}/scripts/bump.js ${1:-minor}

lerna.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
"packages/@aws-cdk-containers/*",
99
"packages/@monocdk-experiment/*",
1010
"packages/@aws-cdk/*/lambda-packages/*",
11-
"tools/*"
11+
"tools/*",
12+
"scripts/script-tests"
1213
],
1314
"rejectCycles": "true",
14-
"version": "1.71.0"
15+
"version": "0.0.0"
1516
}

pack.sh

+6-11
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ export PATH=$PWD/node_modules/.bin:$PATH
77
export NODE_OPTIONS="--max-old-space-size=4096 ${NODE_OPTIONS:-}"
88
root=$PWD
99

10+
# Get version and changelog file name (these require that .versionrc.json would have been generated)
11+
version=$(node -p "require('./scripts/resolve-version').version")
12+
changelog_file=$(node -p "require('./scripts/resolve-version').changelogFile")
13+
marker=$(node -p "require('./scripts/resolve-version').marker")
14+
1015
PACMAK=${PACMAK:-jsii-pacmak}
1116
ROSETTA=${ROSETTA:-jsii-rosetta}
1217
TMPDIR=${TMPDIR:-$(dirname $(mktemp -u))}
@@ -57,15 +62,6 @@ done
5762
# Remove a JSII aggregate POM that may have snuk past
5863
rm -rf dist/java/software/amazon/jsii
5964

60-
# Get version
61-
version="$(node -p "require('./scripts/get-version')")"
62-
63-
# Ensure we don't publish anything beyond 1.x for now
64-
if [[ ! "${version}" == "1."* ]]; then
65-
echo "ERROR: accidentally releasing a major version? Expecting repo version to start with '1.' but got '${version}'"
66-
exit 1
67-
fi
68-
6965
# Get commit from CodePipeline (or git, if we are in CodeBuild)
7066
# If CODEBUILD_RESOLVED_SOURCE_VERSION is not defined (i.e. local
7167
# build or CodePipeline build), use the HEAD commit hash).
@@ -83,12 +79,11 @@ cat > ${distdir}/build.json <<HERE
8379
HERE
8480

8581
# copy CHANGELOG.md to dist/ for github releases
86-
cp CHANGELOG.md ${distdir}/
82+
cp ${changelog_file} ${distdir}/CHANGELOG.md
8783

8884
# defensive: make sure our artifacts don't use the version marker (this means
8985
# that "pack" will always fails when building in a dev environment)
9086
# when we get to 10.0.0, we can fix this...
91-
marker=$(node -p "require('./scripts/get-version-marker')")
9287
if find dist/ | grep "${marker}"; then
9388
echo "ERROR: build artifacts use the version marker '${marker}' instead of a real version."
9489
echo "This is expected for builds in a development environment but should not happen in CI builds!"

package.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
"build-all": "tsc -b"
1515
},
1616
"devDependencies": {
17-
"conventional-changelog-cli": "^2.1.0",
17+
"conventional-changelog-cli": "^2.1.1",
1818
"fs-extra": "^9.0.1",
1919
"graceful-fs": "^4.2.4",
2020
"jest-junit": "^12.0.0",
21-
"jsii-diff": "^1.14.0",
22-
"jsii-pacmak": "^1.14.0",
23-
"jsii-rosetta": "^1.14.0",
21+
"jsii-diff": "^1.14.1",
22+
"jsii-pacmak": "^1.14.1",
23+
"jsii-rosetta": "^1.14.1",
2424
"lerna": "^3.22.1",
2525
"standard-version": "^9.0.0",
2626
"typescript": "~3.9.7"
@@ -45,7 +45,8 @@
4545
"packages/@aws-cdk-containers/*",
4646
"packages/@monocdk-experiment/*",
4747
"packages/@aws-cdk/*/lambda-packages/*",
48-
"tools/*"
48+
"tools/*",
49+
"scripts/script-tests"
4950
],
5051
"nohoist": [
5152
"**/jszip",

packages/@aws-cdk-containers/ecs-service-extensions/README.md

+29-1
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ The `Service` construct provided by this module can be extended with optional `S
1616

1717
- [AWS X-Ray](https://aws.amazon.com/xray/) for tracing your application
1818
- [Amazon CloudWatch Agent](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Install-CloudWatch-Agent.html) for capturing per task stats
19-
- [AWS AppMesh f](https://aws.amazon.com/app-mesh/)or adding your application to a service mesh
19+
- [AWS AppMesh](https://aws.amazon.com/app-mesh/) for adding your application to a service mesh
2020
- [Application Load Balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html), for exposing your service to the public
2121
- [AWS FireLens](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html), for filtering and routing application logs
22+
- [Community Extensions](#community-extensions), providing support for advanced use cases
2223

2324
The `ServiceExtension` class is an abstract class which you can also implement in
2425
order to build your own custom service extensions for modifying your service, or
@@ -283,3 +284,30 @@ The above code uses the well known service discovery name for each
283284
service, and passes it as an environment variable to the container so
284285
that the container knows what address to use when communicating to
285286
the other service.
287+
288+
## Importing a pre-existing cluster
289+
290+
To create an environment with a pre-existing cluster, you must import the cluster first, then use `Environment.fromEnvironmentAttributes()`. When a cluster is imported into an environment, the cluster is treated as immutable. As a result, no extension may modify the cluster to change a setting.
291+
292+
```ts
293+
294+
const cluster = ecs.Cluster.fromClusterAttributes(stack, 'Cluster', {
295+
...
296+
});
297+
298+
const environment = Environment.fromEnvironmentAttributes(stack, 'Environment', {
299+
capacityType: EnvironmentCapacityType.EC2, // or `FARGATE`
300+
cluster,
301+
});
302+
303+
```
304+
305+
## Community Extensions
306+
307+
We encourage the development of Community Service Extensions that support
308+
advanced features. Here are some useful extensions that we have reviewed:
309+
310+
* [ListenerRulesExtension](https://www.npmjs.com/package/@wheatstalk/ecs-service-extension-listener-rules) for more precise control over Application Load Balancer rules
311+
312+
> Please submit a pull request so that we can review your service extension and
313+
> list it here.

0 commit comments

Comments
 (0)