Skip to content

Commit e7fae33

Browse files
authored
Merge branch 'master' into pr/eks-k8s-network-config
2 parents 41c9619 + b6cb382 commit e7fae33

69 files changed

Lines changed: 1818 additions & 545 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.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,4 @@ yarn-error.log
4545
.nzm-*
4646

4747
/.versionrc.json
48+
RELEASE_NOTES.md

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,40 @@
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.128.0](https://github.com/aws/aws-cdk/compare/v1.127.0...v1.128.0) (2021-10-14)
6+
7+
8+
### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES
9+
10+
* **assertions:** Starting this release, the `assertions` module will be
11+
published to Maven with the name 'assertions' instead of
12+
'cdk-assertions'.
13+
14+
### Features
15+
16+
* **apigatewayv2-integrations:** http api - support for request parameter mapping ([#15630](https://github.com/aws/aws-cdk/issues/15630)) ([0452aed](https://github.com/aws/aws-cdk/commit/0452aed2f00198e05bd65b1d20246f7de0b24e20))
17+
* **cli:** hotswap deployments for ECS Services ([#16864](https://github.com/aws/aws-cdk/issues/16864)) ([ad7288f](https://github.com/aws/aws-cdk/commit/ad7288f35a17fcfbecd7080e99ece4873fa99ad2))
18+
* **codepipeline:** add support for string user parameters to the Lambda invoke action ([#16946](https://github.com/aws/aws-cdk/issues/16946)) ([e19ea31](https://github.com/aws/aws-cdk/commit/e19ea31dbf62446edaf5131c75246098ab05da6e)), closes [#16776](https://github.com/aws/aws-cdk/issues/16776)
19+
* **lambda:** docker platform for architecture ([#16858](https://github.com/aws/aws-cdk/issues/16858)) ([5c258a3](https://github.com/aws/aws-cdk/commit/5c258a30367a4922e404eb26e5aa076720846fbe))
20+
* **lambda-event-sources:** self managed kafka: support sasl/plain authentication ([#16712](https://github.com/aws/aws-cdk/issues/16712)) ([d4ad93f](https://github.com/aws/aws-cdk/commit/d4ad93f30877b26b851caa81d3a4a1d80df55164))
21+
* **stepfunctions-tasks:** AWS SDK service integrations ([#16746](https://github.com/aws/aws-cdk/issues/16746)) ([ae840ff](https://github.com/aws/aws-cdk/commit/ae840ff1abb8283a1290dae5859f5729a9cf72b1)), closes [#16780](https://github.com/aws/aws-cdk/issues/16780)
22+
23+
24+
### Bug Fixes
25+
26+
* **ecs:** add ASG capacity via Capacity Provider by not specifying machineImageType ([#16361](https://github.com/aws/aws-cdk/issues/16361)) ([93b3fdc](https://github.com/aws/aws-cdk/commit/93b3fdce80f0997d7b809f9ef7e3edd1e75e1f42)), closes [#16360](https://github.com/aws/aws-cdk/issues/16360)
27+
* **servicecatalog:** Allow users to create multiple product versions from assets. ([#16914](https://github.com/aws/aws-cdk/issues/16914)) ([958d755](https://github.com/aws/aws-cdk/commit/958d755ff7acaf016e3f8969bf5ab07d4dc2977b))
28+
* **codebuild:** add build image AMAZON_LINUX_2_ARM_2 ([#16931](https://github.com/aws/aws-cdk/issues/16931)) ([370cb31](https://github.com/aws/aws-cdk/commit/370cb310cce3fccc5381d8d53130e21b266de868)), closes [#16930](https://github.com/aws/aws-cdk/issues/16930)
29+
* **core:** asset hash is different between linux and windows ([#16945](https://github.com/aws/aws-cdk/issues/16945)) ([59950dd](https://github.com/aws/aws-cdk/commit/59950dd331635fb707aac819529614c0f3e47ee5)), closes [#14555](https://github.com/aws/aws-cdk/issues/14555) [#16928](https://github.com/aws/aws-cdk/issues/16928)
30+
* **ecs-patterns:** minScalingCapacity cannot be set to 0 ([#16961](https://github.com/aws/aws-cdk/issues/16961)) ([589f284](https://github.com/aws/aws-cdk/commit/589f284acec8530aa9824b75a5daef4632e98985)), closes [#15632](https://github.com/aws/aws-cdk/issues/15632) [#14336](https://github.com/aws/aws-cdk/issues/14336)
31+
* **ssm:** StringParameter accepts ParameterType.AWS_EC2_IMAGE_ID as type ([#16884](https://github.com/aws/aws-cdk/issues/16884)) ([2b353be](https://github.com/aws/aws-cdk/commit/2b353be5291cbcdc56a8863038eed4a5f2adc65f)), closes [#16806](https://github.com/aws/aws-cdk/issues/16806)
32+
* use registry.npmjs.com to fix shinkwrap resolves ([#16607](https://github.com/aws/aws-cdk/issues/16607)) ([8f91531](https://github.com/aws/aws-cdk/commit/8f91531c3c25900316d40d5564450566a03e27ee))
33+
34+
35+
### Miscellaneous Chores
36+
37+
* **assertions:** consistent naming in maven ([#16921](https://github.com/aws/aws-cdk/issues/16921)) ([0dcd9ec](https://github.com/aws/aws-cdk/commit/0dcd9eca3a1014c39f92d9e052b67974fc751af0))
38+
539
## [1.127.0](https://github.com/aws/aws-cdk/compare/v1.126.0...v1.127.0) (2021-10-08)
640

741

build.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,11 @@ if [ "$check_compat" == "true" ]; then
9393
/bin/bash scripts/check-api-compatibility.sh
9494
fi
9595

96+
# Create the release notes for the current version. These are ephemeral and not saved in source.
97+
# Skip this step for a "bump candidate" build, where a new, fake version number has been created
98+
# without any corresponding changelog entries.
99+
if ! ${BUMP_CANDIDATE:-false}; then
100+
node ./scripts/create-release-notes.js
101+
fi
102+
96103
touch $BUILD_INDICATOR

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

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
- [Lambda Integration](#lambda)
2222
- [HTTP Proxy Integration](#http-proxy)
2323
- [Private Integration](#private-integration)
24+
- [Request Parameters](#request-parameters)
2425
- [WebSocket APIs](#websocket-apis)
2526
- [Lambda WebSocket Integration](#lambda-websocket-integration)
2627

@@ -149,6 +150,40 @@ const httpEndpoint = new HttpApi(stack, 'HttpProxyPrivateApi', {
149150
});
150151
```
151152

153+
### Request Parameters
154+
155+
Request parameter mapping allows API requests from clients to be modified before they reach backend integrations.
156+
Parameter mapping can be used to specify modifications to request parameters. See [Transforming API requests and
157+
responses](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html).
158+
159+
The following example creates a new header - `header2` - as a copy of `header1` and removes `header1`.
160+
161+
```ts
162+
const httpEndpoint = new HttpApi(stack, 'HttpProxyPrivateApi', {
163+
defaultIntegration: new HttpAlbIntegration({
164+
// ...
165+
requestParameters: new ParameterMapping()
166+
.appendHeader('header2', MappingValue.header('header1'))
167+
.removeHeader('header1');
168+
}),
169+
}),
170+
});
171+
```
172+
173+
To add mapping keys and values not yet supported by the CDK, use the `custom()` method:
174+
175+
```ts
176+
const httpEndpoint = new HttpApi(stack, 'HttpProxyPrivateApi', {
177+
defaultIntegration: new HttpAlbIntegration({
178+
listener,
179+
requestParameters: new ParameterMapping()
180+
.custom('myKey', 'myValue'),
181+
}),
182+
}),
183+
});
184+
```
185+
186+
152187
## WebSocket APIs
153188

154189
WebSocket integrations connect a route to backend resources. The following integrations are supported in the CDK.

packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/alb.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export class HttpAlbIntegration extends HttpPrivateIntegration {
4444
connectionId: vpcLink.vpcLinkId,
4545
uri: this.props.listener.listenerArn,
4646
secureServerName: this.props.secureServerName,
47+
parameterMapping: this.props.parameterMapping,
4748
};
4849
}
4950
}

packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/base-types.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { HttpMethod, IVpcLink } from '@aws-cdk/aws-apigatewayv2';
1+
import { HttpMethod, IVpcLink, ParameterMapping } from '@aws-cdk/aws-apigatewayv2';
22

33
/**
44
* Base options for private integration
@@ -24,4 +24,11 @@ export interface HttpPrivateIntegrationOptions {
2424
*/
2525

2626
readonly secureServerName?: string;
27+
28+
/**
29+
* Specifies how to transform HTTP requests before sending them to the backend
30+
* @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html
31+
* @default undefined requests are sent to the backend unmodified
32+
*/
33+
readonly parameterMapping?: ParameterMapping;
2734
}

packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/http-proxy.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
HttpRouteIntegrationConfig,
55
HttpMethod,
66
IHttpRouteIntegration,
7+
ParameterMapping,
78
PayloadFormatVersion,
89
} from '@aws-cdk/aws-apigatewayv2';
910

@@ -21,6 +22,13 @@ export interface HttpProxyIntegrationProps {
2122
* @default HttpMethod.ANY
2223
*/
2324
readonly method?: HttpMethod;
25+
26+
/**
27+
* Specifies how to transform HTTP requests before sending them to the backend
28+
* @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html
29+
* @default undefined requests are sent to the backend unmodified
30+
*/
31+
readonly parameterMapping?: ParameterMapping;
2432
}
2533

2634
/**
@@ -36,6 +44,7 @@ export class HttpProxyIntegration implements IHttpRouteIntegration {
3644
payloadFormatVersion: PayloadFormatVersion.VERSION_1_0, // 1.0 is required and is the only supported format
3745
type: HttpIntegrationType.HTTP_PROXY,
3846
uri: this.props.url,
47+
parameterMapping: this.props.parameterMapping,
3948
};
4049
}
4150
}

packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/lambda.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
HttpRouteIntegrationConfig,
55
IHttpRouteIntegration,
66
PayloadFormatVersion,
7+
ParameterMapping,
78
} from '@aws-cdk/aws-apigatewayv2';
89
import { ServicePrincipal } from '@aws-cdk/aws-iam';
910
import { IFunction } from '@aws-cdk/aws-lambda';
@@ -24,6 +25,13 @@ export interface LambdaProxyIntegrationProps {
2425
* @default PayloadFormatVersion.VERSION_2_0
2526
*/
2627
readonly payloadFormatVersion?: PayloadFormatVersion;
28+
29+
/**
30+
* Specifies how to transform HTTP requests before sending them to the backend
31+
* @see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html
32+
* @default undefined requests are sent to the backend unmodified
33+
*/
34+
readonly parameterMapping?: ParameterMapping;
2735
}
2836

2937
/**
@@ -50,6 +58,7 @@ export class LambdaProxyIntegration implements IHttpRouteIntegration {
5058
type: HttpIntegrationType.LAMBDA_PROXY,
5159
uri: this.props.handler.functionArn,
5260
payloadFormatVersion: this.props.payloadFormatVersion ?? PayloadFormatVersion.VERSION_2_0,
61+
parameterMapping: this.props.parameterMapping,
5362
};
5463
}
5564
}

packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/nlb.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export class HttpNlbIntegration extends HttpPrivateIntegration {
4444
connectionId: vpcLink.vpcLinkId,
4545
uri: this.props.listener.listenerArn,
4646
secureServerName: this.props.secureServerName,
47+
parameterMapping: this.props.parameterMapping,
4748
};
4849
}
4950
}

packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/service-discovery.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export class HttpServiceDiscoveryIntegration extends HttpPrivateIntegration {
3434
connectionId: this.props.vpcLink.vpcLinkId,
3535
uri: this.props.service.serviceArn,
3636
secureServerName: this.props.secureServerName,
37+
parameterMapping: this.props.parameterMapping,
3738
};
3839
}
3940
}

0 commit comments

Comments
 (0)