Skip to content

Commit 5f44668

Browse files
authored
Merge pull request #12513 from aws/bump/1.85.0
chore(release): 1.85.0
2 parents 866c8dc + 9a27828 commit 5f44668

108 files changed

Lines changed: 5271 additions & 1237 deletions

File tree

Some content is hidden

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

.github/workflows/auto-approve-v2-merge-forward.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Automatically approve PRs that merge master forward to v2-main
22
#
33
# Only does approvals! mergify takes care of the actual merge.
4-
name: Auto-approve forward merges onto v2-main
4+
name: Auto-approve automated PRs around CDK v2
55
on:
66
pull_request:
77
types:
@@ -21,6 +21,6 @@ jobs:
2121
if: >
2222
github.event.pull_request.user.login == 'aws-cdk-automation'
2323
&& github.event.pull_request.base.ref == 'v2-main'
24-
&& contains(github.event.pull_request.labels.*.name, 'pr/forward-merge')
24+
&& contains(github.event.pull_request.labels.*.name, 'pr/auto-approve')
2525
with:
2626
github-token: "${{ secrets.GITHUB_TOKEN }}"

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,27 @@
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.85.0](https://github.com/aws/aws-cdk/compare/v1.84.0...v1.85.0) (2021-01-14)
6+
7+
* **s3-deployment**: This version includes an important update, please upgrade to prevent deployment failure. This is in prepartion of Lambda deperaction of the request module in boto, more details are available in [AWS blog](https://aws.amazon.com/blogs/compute/upcoming-changes-to-the-python-sdk-in-aws-lambda/). Note, users of versions < `1.81.0` will not be impacted by this deprecation, but are still encoraged to upgrade to the latest version.
8+
9+
10+
### Features
11+
12+
* **apigatewayv2:** http api - disable execute api endpoint ([#12426](https://github.com/aws/aws-cdk/issues/12426)) ([1724da7](https://github.com/aws/aws-cdk/commit/1724da758666ec92f7b923c899d2f2f439083ba2)), closes [#12241](https://github.com/aws/aws-cdk/issues/12241)
13+
* **appmesh:** add listener TLS certificates for VirtualNodes and VirtualGateways ([#11863](https://github.com/aws/aws-cdk/issues/11863)) ([175a257](https://github.com/aws/aws-cdk/commit/175a2570465d484aa0a73a7bded34e686da493ed)), closes [#10051](https://github.com/aws/aws-cdk/issues/10051)
14+
* **cfnspec:** CloudFormation resource specification update to v23.0.0 ([#12490](https://github.com/aws/aws-cdk/issues/12490)) ([a7a2236](https://github.com/aws/aws-cdk/commit/a7a2236367f8f01b00b6d90f1d3fe7bf674b1aee))
15+
16+
17+
### Bug Fixes
18+
19+
* **appsync:** rds data source configured with cluster arn ([#12255](https://github.com/aws/aws-cdk/issues/12255)) ([d0305f3](https://github.com/aws/aws-cdk/commit/d0305f33da41ce1f07a5d571eb21c0ee9ea852d0)), closes [#11536](https://github.com/aws/aws-cdk/issues/11536)
20+
* **aws-ecs:** Support configuring Windows capacity for cluster ASGs ([#12365](https://github.com/aws/aws-cdk/issues/12365)) ([6d9a0f1](https://github.com/aws/aws-cdk/commit/6d9a0f1ea0c05e7902ccca4d0fc4040e688846e5))
21+
* **eks:** aws-node-termination-handler incorrectly deployed to on-demand instances as well ([#12369](https://github.com/aws/aws-cdk/issues/12369)) ([05c0b5f](https://github.com/aws/aws-cdk/commit/05c0b5f5a31c3fe89c47c6db8d9051f7165641a9)), closes [#12368](https://github.com/aws/aws-cdk/issues/12368)
22+
* **s3:** Bucket.grantWrite() no longer adds s3:PutObject* permission ([#12391](https://github.com/aws/aws-cdk/issues/12391)) ([cd437cf](https://github.com/aws/aws-cdk/commit/cd437cf630266086a3ddf9e326f215b5d1acdfd7))
23+
* **s3-deployment:** stop using deprecated API's that will cause breakage post 01/31/21 ([#12491](https://github.com/aws/aws-cdk/issues/12491)) ([f50f928](https://github.com/aws/aws-cdk/commit/f50f92880bbc219c331c858eaace712e0757507d))
24+
* **sns:** require topic name for fifo topic [#12386](https://github.com/aws/aws-cdk/issues/12386) ([#12437](https://github.com/aws/aws-cdk/issues/12437)) ([37d8ccc](https://github.com/aws/aws-cdk/commit/37d8ccc763f532999bc9f114264f3d29725b0f28))
25+
526
## [1.84.0](https://github.com/aws/aws-cdk/compare/v1.83.0...v1.84.0) (2021-01-12)
627

728

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,13 @@ httpApi.addRoutes({
9595
});
9696
```
9797

98-
The URL to the endpoint can be retrieved via the `apiEndpoint` attribute.
98+
The URL to the endpoint can be retrieved via the `apiEndpoint` attribute. By default this URL is enabled for clients. Use `disableExecuteApiEndpoint` to disable it.
99+
100+
```ts
101+
const httpApi = new HttpApi(stack, 'HttpApi', {
102+
disableExecuteApiEndpoint: true,
103+
});
104+
```
99105

100106
The `defaultIntegration` option while defining HTTP APIs lets you create a default catch-all integration that is
101107
matched when a client reaches a route that is not explicitly defined.

packages/@aws-cdk/aws-apigatewayv2/lib/http/api.ts

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,15 @@ export interface HttpApiProps {
128128
* @default - no default domain mapping configured. meaningless if `createDefaultStage` is `false`.
129129
*/
130130
readonly defaultDomainMapping?: DefaultDomainMappingOptions;
131+
132+
/**
133+
* Specifies whether clients can invoke your API using the default endpoint.
134+
* By default, clients can invoke your API with the default
135+
* `https://{api_id}.execute-api.{region}.amazonaws.com` endpoint. Enable
136+
* this if you would like clients to use your custom domain name.
137+
* @default false execute-api endpoint enabled.
138+
*/
139+
readonly disableExecuteApiEndpoint?: boolean;
131140
}
132141

133142
/**
@@ -283,17 +292,24 @@ export class HttpApi extends HttpApiBase {
283292
*/
284293
public readonly httpApiName?: string;
285294
public readonly httpApiId: string;
286-
public readonly apiEndpoint: string;
295+
296+
/**
297+
* Specifies whether clients can invoke this HTTP API by using the default execute-api endpoint.
298+
*/
299+
public readonly disableExecuteApiEndpoint?: boolean;
287300

288301
/**
289302
* default stage of the api resource
290303
*/
291304
public readonly defaultStage: HttpStage | undefined;
292305

306+
private readonly _apiEndpoint: string;
307+
293308
constructor(scope: Construct, id: string, props?: HttpApiProps) {
294309
super(scope, id);
295310

296311
this.httpApiName = props?.apiName ?? id;
312+
this.disableExecuteApiEndpoint = props?.disableExecuteApiEndpoint;
297313

298314
let corsConfiguration: CfnApi.CorsProperty | undefined;
299315
if (props?.corsPreflight) {
@@ -324,11 +340,12 @@ export class HttpApi extends HttpApiBase {
324340
protocolType: 'HTTP',
325341
corsConfiguration,
326342
description: props?.description,
343+
disableExecuteApiEndpoint: this.disableExecuteApiEndpoint,
327344
};
328345

329346
const resource = new CfnApi(this, 'Resource', apiProps);
330347
this.httpApiId = resource.ref;
331-
this.apiEndpoint = resource.attrApiEndpoint;
348+
this._apiEndpoint = resource.attrApiEndpoint;
332349

333350
if (props?.defaultIntegration) {
334351
new HttpRoute(this, 'DefaultRoute', {
@@ -357,6 +374,16 @@ export class HttpApi extends HttpApiBase {
357374
}
358375
}
359376

377+
/**
378+
* Get the default endpoint for this API.
379+
*/
380+
public get apiEndpoint(): string {
381+
if (this.disableExecuteApiEndpoint) {
382+
throw new Error('apiEndpoint is not accessible when disableExecuteApiEndpoint is set to true.');
383+
}
384+
return this._apiEndpoint;
385+
}
386+
360387
/**
361388
* Get the URL to the default stage of this API.
362389
* Returns `undefined` if `createDefaultStage` is unset.

packages/@aws-cdk/aws-apigatewayv2/test/http/api.test.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,19 @@ describe('HttpApi', () => {
215215
});
216216
});
217217

218+
test('disableExecuteApiEndpoint is enabled', () => {
219+
const stack = new Stack();
220+
new HttpApi(stack, 'api', {
221+
disableExecuteApiEndpoint: true,
222+
});
223+
224+
expect(stack).toHaveResource('AWS::ApiGatewayV2::Api', {
225+
Name: 'api',
226+
ProtocolType: 'HTTP',
227+
DisableExecuteApiEndpoint: true,
228+
});
229+
});
230+
218231
test('can add a vpc links', () => {
219232
// GIVEN
220233
const stack = new Stack();
@@ -261,6 +274,17 @@ describe('HttpApi', () => {
261274
expect(api.apiEndpoint).toBeDefined();
262275
});
263276

277+
test('throws when accessing apiEndpoint and disableExecuteApiEndpoint is true', () => {
278+
const stack = new Stack();
279+
const api = new HttpApi(stack, 'api', {
280+
disableExecuteApiEndpoint: true,
281+
});
282+
283+
expect(() => api.apiEndpoint).toThrow(
284+
/apiEndpoint is not accessible when disableExecuteApiEndpoint is set to true./,
285+
);
286+
});
287+
264288
test('apiEndpoint for imported', () => {
265289
const stack = new Stack();
266290
const api = HttpApi.fromHttpApiAttributes(stack, 'imported', { httpApiId: 'api-1234' });

packages/@aws-cdk/aws-applicationautoscaling/lib/step-scaling-policy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export interface StepScalingPolicyProps extends BasicStepScalingPolicyProps {
5757
}
5858

5959
/**
60-
* Define a acaling strategy which scales depending on absolute values of some metric.
60+
* Define a scaling strategy which scales depending on absolute values of some metric.
6161
*
6262
* You can specify the scaling behavior for various values of the metric.
6363
*

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

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,44 @@ The `backends` property can be added with `node.addBackend()`. We define a virtu
241241

242242
The `backendsDefaultClientPolicy` property are added to the node while creating the virtual node. These are virtual node's service backends client policy defaults.
243243

244+
## Adding TLS to a listener
245+
246+
The `tlsCertificate` property can be added to a Virtual Node listener or Virtual Gateway listener to add TLS configuration.
247+
A certificate from AWS Certificate Manager can be incorporated or a customer provided certificate can be specified with a `certificateChain` path file and a `privateKey` file path.
248+
249+
```typescript
250+
import * as certificatemanager from '@aws-cdk/aws-certificatemanager';
251+
252+
// A Virtual Node with listener TLS from an ACM provided certificate
253+
const cert = new certificatemanager.Certificate(this, 'cert', {...});
254+
255+
const node = new appmesh.VirtualNode(stack, 'node', {
256+
mesh,
257+
dnsHostName: 'node',
258+
listeners: [appmesh.VirtualNodeListener.grpc({
259+
port: 80,
260+
tlsCertificate: appmesh.TlsCertificate.acm({
261+
certificate: cert,
262+
tlsMode: TlsMode.STRICT,
263+
}),
264+
})],
265+
});
266+
267+
// A Virtual Gateway with listener TLS from a customer provided file certificate
268+
const gateway = new appmesh.VirtualGateway(this, 'gateway', {
269+
mesh: mesh,
270+
listeners: [appmesh.VirtualGatewayListener.grpc({
271+
port: 8080,
272+
tlsCertificate: appmesh.TlsCertificate.file({
273+
certificateChain: 'path/to/certChain',
274+
privateKey: 'path/to/privateKey',
275+
tlsMode: TlsMode.STRICT,
276+
}),
277+
})],
278+
virtualGatewayName: 'gateway',
279+
});
280+
```
281+
244282
## Adding a Route
245283

246284
A `route` is associated with a virtual router, and it's used to match requests for a virtual router and distribute traffic accordingly to its associated virtual nodes.

packages/@aws-cdk/aws-appmesh/lib/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export * from './route';
55
export * from './service-discovery';
66
export * from './route-spec';
77
export * from './shared-interfaces';
8+
export * from './tls-certificate';
89
export * from './virtual-node';
910
export * from './virtual-router';
1011
export * from './virtual-router-listener';

0 commit comments

Comments
 (0)