Skip to content

Commit 82b905d

Browse files
authored
Merge branch 'master' into merge-back/1.138.2
2 parents 0dea806 + ddc2bc6 commit 82b905d

File tree

349 files changed

+137339
-123403
lines changed

Some content is hidden

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

349 files changed

+137339
-123403
lines changed

.github/workflows/yarn-upgrade.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
uses: actions/checkout@v2
1919

2020
- name: Set up Node
21-
uses: actions/[email protected].0
21+
uses: actions/[email protected].1
2222
with:
2323
node-version: 12
2424

CONTRIBUTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,8 @@ See [Gitpod section](#gitpod) on how to set up the CDK repo on Gitpod.
5252

5353
The following tools need to be installed on your system prior to installing the CDK:
5454

55-
- [Node.js >= 10.13.0](https://nodejs.org/download/release/latest-v10.x/)
55+
- [Node.js >= 14.15.0](https://nodejs.org/download/release/latest-v14.x/)
5656
- We recommend using a version in [Active LTS](https://nodejs.org/en/about/releases/)
57-
- ⚠️ versions `13.0.0` to `13.6.0` are not supported due to compatibility issues with our dependencies.
5857
- [Yarn >= 1.19.1, < 2](https://yarnpkg.com/lang/en/docs/install)
5958
- [.NET Core SDK 3.1.x](https://www.microsoft.com/net/download)
6059
- [Python >= 3.6.5, < 4.0](https://www.python.org/downloads/release/python-365/)

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ infrastructure definition and share it without worrying about boilerplate logic.
1919

2020
The CDK is available in the following languages:
2121

22-
* JavaScript, TypeScript ([Node.js ≥ 10.13.0](https://nodejs.org/download/release/latest-v10.x/))
22+
* JavaScript, TypeScript ([Node.js ≥ 14.15.0](https://nodejs.org/download/release/latest-v14.x/))
2323
- We recommend using a version in [Active LTS](https://nodejs.org/en/about/releases/)
24-
- ⚠️ versions `13.0.0` to `13.6.0` are not supported due to compatibility issues with our dependencies.
2524
* Python ([Python ≥ 3.6](https://www.python.org/downloads/))
2625
* Java ([Java ≥ 8](https://www.oracle.com/technetwork/java/javase/downloads/index.html) and [Maven ≥ 3.5.4](https://maven.apache.org/download.cgi))
2726
* .NET ([.NET Core ≥ 3.1](https://dotnet.microsoft.com/download))
@@ -77,8 +76,7 @@ in the CDK Developer Guide.
7776
For a detailed walkthrough, see the [tutorial](https://docs.aws.amazon.com/cdk/latest/guide/getting_started.html#hello_world_tutorial) in the AWS CDK [Developer Guide](https://docs.aws.amazon.com/cdk/latest/guide/home.html).
7877

7978
### At a glance
80-
Install or update the [AWS CDK CLI] from npm (requires [Node.js ≥ 10.13.0](https://nodejs.org/download/release/latest-v10.x/)). We recommend using a version in [Active LTS](https://nodejs.org/en/about/releases/)
81-
⚠️ versions `13.0.0` to `13.6.0` are not supported due to compatibility issues with our dependencies.
79+
Install or update the [AWS CDK CLI] from npm (requires [Node.js ≥ 14.15.0](https://nodejs.org/download/release/latest-v14.x/)). We recommend using a version in [Active LTS](https://nodejs.org/en/about/releases/)
8280

8381
```console
8482
$ npm i -g aws-cdk
@@ -155,6 +153,12 @@ this capability, please see the
155153
## More Resources
156154
* [CDK Workshop](https://cdkworkshop.com/)
157155
* [Construct Hub](https://constructs.dev) - Find and use open-source Cloud Development Kit (CDK) libraries
156+
* Best Practices
157+
* [Best practices for developing cloud applications with AWS CDK](https://aws.amazon.com/blogs/devops/best-practices-for-developing-cloud-applications-with-aws-cdk/)
158+
* [Align with best practices while creating infrastructure using cdk aspects](https://aws.amazon.com/blogs/devops/align-with-best-practices-while-creating-infrastructure-using-cdk-aspects/)
159+
* [Recommended AWS CDK project structure for Python applications](https://aws.amazon.com/blogs/developer/recommended-aws-cdk-project-structure-for-python-applications/)
160+
* [Best practices for discoverability of a construct library on Construct Hub](https://aws.amazon.com/blogs/opensource/best-practices-for-discoverability-of-a-construct-library-on-construct-hub/)
161+
* [All developer blog posts about AWS CDK](https://aws.amazon.com/blogs/developer/category/developer-tools/aws-cloud-development-kit/)
158162
* **[CDK Construction Zone](https://www.twitch.tv/collections/9kCOGphNZBYVdA)** - A Twitch live coding series hosted by the CDK team, season one episodes:
159163
* Triggers: Join us as we implement [Triggers](https://github.com/aws/aws-cdk-rfcs/issues/71), a Construct for configuring deploy time actions. Episodes 1-3:
160164
* [S1E1](https://www.twitch.tv/videos/917691798): Triggers (part 1); **Participants:** @NetaNir, @eladb, @richardhboyd

allowed-breaking-changes.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,26 @@ incompatible-argument:@aws-cdk/aws-autoscaling-hooktargets.FunctionHook.bind
9393
incompatible-argument:@aws-cdk/aws-autoscaling-hooktargets.QueueHook.bind
9494
incompatible-argument:@aws-cdk/aws-autoscaling-hooktargets.TopicHook.bind
9595
incompatible-argument:@aws-cdk/aws-autoscaling.ILifecycleHookTarget.bind
96+
97+
# removed properties from kafka eventsources as they are not supported
98+
removed:@aws-cdk/aws-lambda-event-sources.KafkaEventSourceProps.bisectBatchOnError
99+
removed:@aws-cdk/aws-lambda-event-sources.KafkaEventSourceProps.maxRecordAge
100+
removed:@aws-cdk/aws-lambda-event-sources.KafkaEventSourceProps.parallelizationFactor
101+
removed:@aws-cdk/aws-lambda-event-sources.KafkaEventSourceProps.reportBatchItemFailures
102+
removed:@aws-cdk/aws-lambda-event-sources.KafkaEventSourceProps.retryAttempts
103+
removed:@aws-cdk/aws-lambda-event-sources.KafkaEventSourceProps.tumblingWindow
104+
removed:@aws-cdk/aws-lambda-event-sources.ManagedKafkaEventSourceProps.bisectBatchOnError
105+
removed:@aws-cdk/aws-lambda-event-sources.ManagedKafkaEventSourceProps.maxRecordAge
106+
removed:@aws-cdk/aws-lambda-event-sources.ManagedKafkaEventSourceProps.parallelizationFactor
107+
removed:@aws-cdk/aws-lambda-event-sources.ManagedKafkaEventSourceProps.reportBatchItemFailures
108+
removed:@aws-cdk/aws-lambda-event-sources.ManagedKafkaEventSourceProps.retryAttempts
109+
removed:@aws-cdk/aws-lambda-event-sources.ManagedKafkaEventSourceProps.tumblingWindow
110+
removed:@aws-cdk/aws-lambda-event-sources.SelfManagedKafkaEventSourceProps.bisectBatchOnError
111+
removed:@aws-cdk/aws-lambda-event-sources.SelfManagedKafkaEventSourceProps.maxRecordAge
112+
removed:@aws-cdk/aws-lambda-event-sources.SelfManagedKafkaEventSourceProps.parallelizationFactor
113+
removed:@aws-cdk/aws-lambda-event-sources.SelfManagedKafkaEventSourceProps.reportBatchItemFailures
114+
removed:@aws-cdk/aws-lambda-event-sources.SelfManagedKafkaEventSourceProps.retryAttempts
115+
removed:@aws-cdk/aws-lambda-event-sources.SelfManagedKafkaEventSourceProps.tumblingWindow
116+
base-types:@aws-cdk/aws-lambda-event-sources.KafkaEventSourceProps
117+
base-types:@aws-cdk/aws-lambda-event-sources.ManagedKafkaEventSourceProps
118+
base-types:@aws-cdk/aws-lambda-event-sources.SelfManagedKafkaEventSourceProps

packages/@aws-cdk-containers/ecs-service-extensions/test/integ.all-service-addons.expected.json

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3185,22 +3185,12 @@
31853185
"Backends": [
31863186
{
31873187
"VirtualService": {
3188-
"VirtualServiceName": {
3189-
"Fn::GetAtt": [
3190-
"namevirtualservice3DDDDF1E",
3191-
"VirtualServiceName"
3192-
]
3193-
}
3188+
"VirtualServiceName": "name.production"
31943189
}
31953190
},
31963191
{
31973192
"VirtualService": {
3198-
"VirtualServiceName": {
3199-
"Fn::GetAtt": [
3200-
"greetingvirtualservice60AD3AD9",
3201-
"VirtualServiceName"
3202-
]
3203-
}
3193+
"VirtualServiceName": "greeting.production"
32043194
}
32053195
}
32063196
],

packages/@aws-cdk/aws-apigatewayv2-authorizers/lib/websocket/lambda.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ export interface WebSocketLambdaAuthorizerProps {
2828
/**
2929
* The identity source for which authorization is requested.
3030
*
31-
* @default ['$request.header.Authorization']
31+
* Request parameter match `'route.request.querystring|header.[a-zA-z0-9._-]+'`.
32+
* Staged variable match `'stageVariables.[a-zA-Z0-9._-]+'`.
33+
* Context parameter match `'context.[a-zA-Z0-9._-]+'`.
34+
*
35+
* @default ['route.request.header.Authorization']
3236
*/
3337
readonly identitySource?: string[];
3438
}
@@ -56,7 +60,7 @@ export class WebSocketLambdaAuthorizer implements IWebSocketRouteAuthorizer {
5660
this.authorizer = new WebSocketAuthorizer(options.scope, this.id, {
5761
webSocketApi: options.route.webSocketApi,
5862
identitySource: this.props.identitySource ?? [
59-
'$request.header.Authorization',
63+
'route.request.header.Authorization',
6064
],
6165
type: WebSocketAuthorizerType.LAMBDA,
6266
authorizerName: this.props.authorizerName ?? this.id,

packages/@aws-cdk/aws-apigatewayv2-authorizers/test/websocket/lambda.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ describe('WebSocketLambdaAuthorizer', () => {
3535
Name: 'default-authorizer',
3636
AuthorizerType: 'REQUEST',
3737
IdentitySource: [
38-
'$request.header.Authorization',
38+
'route.request.header.Authorization',
3939
],
4040
});
4141

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,24 @@ The `backends` property can be added with `node.addBackend()`. In the example, w
236236

237237
The `backendDefaults` property is added to the node while creating the virtual node. These are the virtual node's default settings for all backends.
238238

239+
The `VirtualNode.addBackend()` method is especially useful if you want to create a circular traffic flow by having a Virtual Service as a backend whose provider is that same Virtual Node:
240+
241+
```ts
242+
declare const mesh: appmesh.Mesh;
243+
244+
const node = new appmesh.VirtualNode(this, 'node', {
245+
mesh,
246+
serviceDiscovery: appmesh.ServiceDiscovery.dns('node'),
247+
});
248+
249+
const virtualService = new appmesh.VirtualService(this, 'service-1', {
250+
virtualServiceProvider: appmesh.VirtualServiceProvider.virtualNode(node),
251+
virtualServiceName: 'service1.domain.local',
252+
});
253+
254+
node.addBackend(appmesh.Backend.virtualService(virtualService));
255+
```
256+
239257
### Adding TLS to a listener
240258

241259
The `tls` property specifies TLS configuration when creating a listener for a virtual node or a virtual gateway.

packages/@aws-cdk/aws-appmesh/lib/shared-interfaces.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,14 @@ class VirtualServiceBackend extends Backend {
238238
return {
239239
virtualServiceBackend: {
240240
virtualService: {
241-
virtualServiceName: this.virtualService.virtualServiceName,
241+
/**
242+
* We want to use the name of the Virtual Service here directly instead of
243+
* a `{ 'Fn::GetAtt' }` CFN expression. This avoids a circular dependency in
244+
* the case where this Virtual Node is the Virtual Service's provider.
245+
*/
246+
virtualServiceName: cdk.Token.isUnresolved(this.virtualService.virtualServiceName)
247+
? (this.virtualService as any).physicalName
248+
: this.virtualService.virtualServiceName,
242249
clientPolicy: this.tlsClientPolicy
243250
? {
244251
tls: renderTlsClientPolicy(scope, this.tlsClientPolicy),

packages/@aws-cdk/aws-appmesh/test/integ.mesh.expected.json

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,22 +1040,12 @@
10401040
"Backends": [
10411041
{
10421042
"VirtualService": {
1043-
"VirtualServiceName": {
1044-
"Fn::GetAtt": [
1045-
"service6D174F83",
1046-
"VirtualServiceName"
1047-
]
1048-
}
1043+
"VirtualServiceName": "service1.domain.local"
10491044
}
10501045
},
10511046
{
10521047
"VirtualService": {
1053-
"VirtualServiceName": {
1054-
"Fn::GetAtt": [
1055-
"service27C65CF7D",
1056-
"VirtualServiceName"
1057-
]
1058-
}
1048+
"VirtualServiceName": "service2.domain.local"
10591049
}
10601050
}
10611051
],
@@ -1111,12 +1101,7 @@
11111101
"Backends": [
11121102
{
11131103
"VirtualService": {
1114-
"VirtualServiceName": {
1115-
"Fn::GetAtt": [
1116-
"service3859EB104",
1117-
"VirtualServiceName"
1118-
]
1119-
}
1104+
"VirtualServiceName": "service3.domain.local"
11201105
}
11211106
}
11221107
],
@@ -1241,12 +1226,7 @@
12411226
"Backends": [
12421227
{
12431228
"VirtualService": {
1244-
"VirtualServiceName": {
1245-
"Fn::GetAtt": [
1246-
"service4983B61EE",
1247-
"VirtualServiceName"
1248-
]
1249-
}
1229+
"VirtualServiceName": "service4.domain.local"
12501230
}
12511231
}
12521232
],

0 commit comments

Comments
 (0)