Skip to content

Commit

Permalink
Merge branch 'master' into fix/r5ad
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Apr 21, 2021
2 parents 94d9ea9 + 016611d commit 1f0589b
Show file tree
Hide file tree
Showing 230 changed files with 3,820 additions and 1,058 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/yarn-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Restore Yarn cache
uses: actions/cache@v2.1.4
uses: actions/cache@v2.1.5
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
Expand Down
50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,56 @@

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.

## [1.100.0](https://github.com/aws/aws-cdk/compare/v1.99.0...v1.100.0) (2021-04-20)


### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES

* **appmesh:** HTTP2 `VirtualNodeListener`s must be now created with `Http2VirtualNodeListenerOptions`
* **appmesh**: HTTP2 `VirtualGatewayListener`s must be now created with `Http2VirtualGatewayListenerOptions`
* **codepipeline-actions:** the Action `ServiceCatalogDeployAction` has been renamed to `ServiceCatalogDeployActionBeta1`
* **codepipeline-actions**: the type `ServiceCatalogDeployActionProps` has been renamed to `ServiceCatalogDeployActionBeta1Props`
* **events-targets:** The `BatchJob` integration now requires the arn and the Resource for the `jobQueue` and the `jobDefinition`
* **lambda-event-sources:** `cluster` was removed from `ManagedKafkaEventSourceProps` and replaced with `clusterArn`
* **route53-targets:** `ApiGatewayv2Domain` was replaced with `ApiGatewayv2DomainProperties` which accepts `regionalDomainName` and `regionalHostedZoneId`
* **stepfunctions-tasks:** `CallApiGatewayHttpApiEndpoint` API now requires the `apiId` and it's containing `Stack`
* **stepfunctions-tasks:** `BatchSubmitJob` now accept `jobDefinitionArn`, `jobQueueArn` and their respective `Resource`
* **stepfunctions-tasks:** `RunBatchJob` now accept `jobDefinitionArn`, `jobQueueArn` and their respective `Resource`

### Features

* **apigateway:** integration timeout ([#14154](https://github.com/aws/aws-cdk/issues/14154)) ([d02770e](https://github.com/aws/aws-cdk/commit/d02770ead89d87e55d36490f5d1fa2a4b8a591f2)), closes [#14123](https://github.com/aws/aws-cdk/issues/14123)
* **appmesh:** add Connection Pools for VirtualNode and VirtualGateway ([#13917](https://github.com/aws/aws-cdk/issues/13917)) ([8a949dc](https://github.com/aws/aws-cdk/commit/8a949dc24b13f8b7da17c102501050bac7323bf7)), closes [#11647](https://github.com/aws/aws-cdk/issues/11647)
* **certificatemanager:** allow tagging DnsValidatedCertificate ([#13990](https://github.com/aws/aws-cdk/issues/13990)) ([8360feb](https://github.com/aws/aws-cdk/commit/8360feb58fdc7b1150eca87767e3b71a5e30f50d)), closes [#12382](https://github.com/aws/aws-cdk/issues/12382) [#12382](https://github.com/aws/aws-cdk/issues/12382)
* **codebuild:** allow setting concurrent build limit ([#14185](https://github.com/aws/aws-cdk/issues/14185)) ([3107d03](https://github.com/aws/aws-cdk/commit/3107d03ed2de331ba0eae8ca028aa9a7dbf5a881))
* **codepipeline:** introduce the Action abstract class ([#14009](https://github.com/aws/aws-cdk/issues/14009)) ([4b6a6cc](https://github.com/aws/aws-cdk/commit/4b6a6cc0e11fd2057b9e23105791098b47c5ca35))
* **ecs:** add support for elastic inference accelerators in ECS task defintions ([#13950](https://github.com/aws/aws-cdk/issues/13950)) ([23986d7](https://github.com/aws/aws-cdk/commit/23986d70c5cd69ce212b5ffdc1bcf059f438f15b)), closes [#12460](https://github.com/aws/aws-cdk/issues/12460)
* **eks:** Pass bootstrap.sh args to avoid DescribeCluster call and make nodes join the cluster faster ([#12659](https://github.com/aws/aws-cdk/issues/12659)) ([f5616cc](https://github.com/aws/aws-cdk/commit/f5616cc4692975b22db5db4625562dfd0d641045))
* **secretsmanager:** replicate secrets to multiple regions ([#14266](https://github.com/aws/aws-cdk/issues/14266)) ([b3c288d](https://github.com/aws/aws-cdk/commit/b3c288d7c5781ecb5de90c962a2b68191ed072e1)), closes [#14061](https://github.com/aws/aws-cdk/issues/14061)


### Bug Fixes

* **codepipeline:** incorrect determination of the Action's account when using an imported resource ([#14224](https://github.com/aws/aws-cdk/issues/14224)) ([d88e915](https://github.com/aws/aws-cdk/commit/d88e915c45378cac6a1c7eb31b015391e74f6503)), closes [#14165](https://github.com/aws/aws-cdk/issues/14165)
* **core:** `toJsonString()` does not deal correctly with list tokens ([#14138](https://github.com/aws/aws-cdk/issues/14138)) ([1a6d39f](https://github.com/aws/aws-cdk/commit/1a6d39fc3f22e2fc36949226e8a07f59a92a0bbf)), closes [#14088](https://github.com/aws/aws-cdk/issues/14088)
* **pipelines:** incorrect BuildSpec in synth step if synthesized with `--output` ([#14211](https://github.com/aws/aws-cdk/issues/14211)) ([0f5c74f](https://github.com/aws/aws-cdk/commit/0f5c74f76ad023b163777b8b95f8dbc357994087)), closes [#13303](https://github.com/aws/aws-cdk/issues/13303)
* **rds:** database instances cannot be to be referenced in a different region ([#13865](https://github.com/aws/aws-cdk/issues/13865)) ([74c7fff](https://github.com/aws/aws-cdk/commit/74c7ffffb48fe5578a405b319cc0df973ceb9989)), closes [#13832](https://github.com/aws/aws-cdk/issues/13832)

## [1.99.0](https://github.com/aws/aws-cdk/compare/v1.98.0...v1.99.0) (2021-04-13)


### Features

* **elasticloadbalancing:** rename 'sslCertificateId' property of LB listener to 'sslCertificateArn'; deprecate sslCertificateId property ([#13766](https://github.com/aws/aws-cdk/issues/13766)) ([1a30272](https://github.com/aws/aws-cdk/commit/1a30272c8bd99a919bde695b5b1b1f5cb458cb64)), closes [#9303](https://github.com/aws/aws-cdk/issues/9303) [#9303](https://github.com/aws/aws-cdk/issues/9303)


### Bug Fixes

* **aws-cloudfront:** distribution comment length not validated ([#14020](https://github.com/aws/aws-cdk/issues/14020)) ([#14094](https://github.com/aws/aws-cdk/issues/14094)) ([54fddc6](https://github.com/aws/aws-cdk/commit/54fddc64c7b541f9192fb904fa9a3b44b8aacf90))
* **aws-ecs-patterns:** fixes [#11123](https://github.com/aws/aws-cdk/issues/11123) allow for https listeners to use non Route 53 DNS if a certificate is provided ([#14004](https://github.com/aws/aws-cdk/issues/14004)) ([e6c85e4](https://github.com/aws/aws-cdk/commit/e6c85e4167cdb38ed056eda17b869e179a6dd1c5))
* **cfn-include:** allow deploy-time values in Parameter substitutions in Fn::Sub expressions ([#14068](https://github.com/aws/aws-cdk/issues/14068)) ([111d26a](https://github.com/aws/aws-cdk/commit/111d26a30d220a319bbb7b1b1696aafac865e009)), closes [#14047](https://github.com/aws/aws-cdk/issues/14047)
* **fsx:** Weekday.SUNDAY incorrectly evaluates to 0 (should be 7) ([#14081](https://github.com/aws/aws-cdk/issues/14081)) ([708f23e](https://github.com/aws/aws-cdk/commit/708f23e78fb0eff2aa17593c530500eb0b94067a)), closes [#14080](https://github.com/aws/aws-cdk/issues/14080)

## [1.98.0](https://github.com/aws/aws-cdk/compare/v1.97.0...v1.98.0) (2021-04-12)


Expand Down
13 changes: 13 additions & 0 deletions allowed-breaking-changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,16 @@ weakened:@aws-cdk/cloud-assembly-schema.FileSource
# These are fine, since they shouldn't be widely used.
weakened:@aws-cdk/core.FileAssetLocation
weakened:@aws-cdk/aws-events.RuleTargetConfig

# replace interface with untyped properties to order to break stable to experimental dependencies
removed:@aws-cdk/aws-stepfunctions-tasks.CallApiGatewayHttpApiEndpointProps.api
strengthened:@aws-cdk/aws-stepfunctions-tasks.CallApiGatewayHttpApiEndpointProps
removed:@aws-cdk/aws-route53-targets.ApiGatewayv2Domain
removed:@aws-cdk/aws-stepfunctions-tasks.RunBatchJobProps.jobDefinition
removed:@aws-cdk/aws-stepfunctions-tasks.RunBatchJobProps.jobDefinition
removed:@aws-cdk/aws-stepfunctions-tasks.RunBatchJobProps.jobQueue
removed:@aws-cdk/aws-stepfunctions-tasks.BatchSubmitJobProps.jobQueue
removed:@aws-cdk/aws-stepfunctions-tasks.BatchSubmitJobProps.jobDefinition
strengthened:@aws-cdk/aws-stepfunctions-tasks.BatchSubmitJobProps
removed:@aws-cdk/aws-lambda-event-sources.ManagedKafkaEventSourceProps.cluster
strengthened:@aws-cdk/aws-lambda-event-sources.ManagedKafkaEventSourceProps
8 changes: 0 additions & 8 deletions packages/@aws-cdk/aws-apigateway/lib/api-definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ import { Construct } from '@aws-cdk/core';

/**
* Represents an OpenAPI definition asset.
* @experimental
*/
export abstract class ApiDefinition {
/**
* Creates an API definition from a specification file in an S3 bucket
* @experimental
*/
public static fromBucket(bucket: s3.IBucket, key: string, objectVersion?: string): S3ApiDefinition {
return new S3ApiDefinition(bucket, key, objectVersion);
Expand Down Expand Up @@ -70,7 +68,6 @@ export abstract class ApiDefinition {

/**
* Loads the API specification from a local disk asset.
* @experimental
*/
public static fromAsset(file: string, options?: s3_assets.AssetOptions): AssetApiDefinition {
return new AssetApiDefinition(file, options);
Expand All @@ -88,7 +85,6 @@ export abstract class ApiDefinition {

/**
* S3 location of the API definition file
* @experimental
*/
export interface ApiDefinitionS3Location {
/** The S3 bucket */
Expand All @@ -104,7 +100,6 @@ export interface ApiDefinitionS3Location {

/**
* Post-Binding Configuration for a CDK construct
* @experimental
*/
export interface ApiDefinitionConfig {
/**
Expand All @@ -124,7 +119,6 @@ export interface ApiDefinitionConfig {

/**
* OpenAPI specification from an S3 archive.
* @experimental
*/
export class S3ApiDefinition extends ApiDefinition {
private bucketName: string;
Expand Down Expand Up @@ -152,7 +146,6 @@ export class S3ApiDefinition extends ApiDefinition {

/**
* OpenAPI specification from an inline JSON object.
* @experimental
*/
export class InlineApiDefinition extends ApiDefinition {
constructor(private definition: any) {
Expand All @@ -176,7 +169,6 @@ export class InlineApiDefinition extends ApiDefinition {

/**
* OpenAPI specification from a local file.
* @experimental
*/
export class AssetApiDefinition extends ApiDefinition {
private asset?: s3_assets.Asset;
Expand Down
11 changes: 0 additions & 11 deletions packages/@aws-cdk/aws-apigateway/lib/apigatewayv2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,6 @@ export class CfnApiV2 extends cdk.CfnResource implements cdk.IInspectable {
*
* @param inspector - tree inspector to collect and process attributes
*
* @stability experimental
*/
public inspect(inspector: cdk.TreeInspector) {
inspector.addAttribute('aws:cdk:cloudformation:type', CfnApiV2.CFN_RESOURCE_TYPE_NAME);
Expand Down Expand Up @@ -637,7 +636,6 @@ export class CfnApiMappingV2 extends cdk.CfnResource implements cdk.IInspectable
*
* @param inspector - tree inspector to collect and process attributes
*
* @stability experimental
*/
public inspect(inspector: cdk.TreeInspector) {
inspector.addAttribute('aws:cdk:cloudformation:type', CfnApiMappingV2.CFN_RESOURCE_TYPE_NAME);
Expand Down Expand Up @@ -869,7 +867,6 @@ export class CfnAuthorizerV2 extends cdk.CfnResource implements cdk.IInspectable
*
* @param inspector - tree inspector to collect and process attributes
*
* @stability experimental
*/
public inspect(inspector: cdk.TreeInspector) {
inspector.addAttribute('aws:cdk:cloudformation:type', CfnAuthorizerV2.CFN_RESOURCE_TYPE_NAME);
Expand Down Expand Up @@ -1065,7 +1062,6 @@ export class CfnDeploymentV2 extends cdk.CfnResource implements cdk.IInspectable
*
* @param inspector - tree inspector to collect and process attributes
*
* @stability experimental
*/
public inspect(inspector: cdk.TreeInspector) {
inspector.addAttribute('aws:cdk:cloudformation:type', CfnDeploymentV2.CFN_RESOURCE_TYPE_NAME);
Expand Down Expand Up @@ -1212,7 +1208,6 @@ export class CfnDomainNameV2 extends cdk.CfnResource implements cdk.IInspectable
*
* @param inspector - tree inspector to collect and process attributes
*
* @stability experimental
*/
public inspect(inspector: cdk.TreeInspector) {
inspector.addAttribute('aws:cdk:cloudformation:type', CfnDomainNameV2.CFN_RESOURCE_TYPE_NAME);
Expand Down Expand Up @@ -1576,7 +1571,6 @@ export class CfnIntegrationV2 extends cdk.CfnResource implements cdk.IInspectabl
*
* @param inspector - tree inspector to collect and process attributes
*
* @stability experimental
*/
public inspect(inspector: cdk.TreeInspector) {
inspector.addAttribute('aws:cdk:cloudformation:type', CfnIntegrationV2.CFN_RESOURCE_TYPE_NAME);
Expand Down Expand Up @@ -1786,7 +1780,6 @@ export class CfnIntegrationResponseV2 extends cdk.CfnResource implements cdk.IIn
*
* @param inspector - tree inspector to collect and process attributes
*
* @stability experimental
*/
public inspect(inspector: cdk.TreeInspector) {
inspector.addAttribute('aws:cdk:cloudformation:type', CfnIntegrationResponseV2.CFN_RESOURCE_TYPE_NAME);
Expand Down Expand Up @@ -1959,7 +1952,6 @@ export class CfnModelV2 extends cdk.CfnResource implements cdk.IInspectable {
*
* @param inspector - tree inspector to collect and process attributes
*
* @stability experimental
*/
public inspect(inspector: cdk.TreeInspector) {
inspector.addAttribute('aws:cdk:cloudformation:type', CfnModelV2.CFN_RESOURCE_TYPE_NAME);
Expand Down Expand Up @@ -2233,7 +2225,6 @@ export class CfnRouteV2 extends cdk.CfnResource implements cdk.IInspectable {
*
* @param inspector - tree inspector to collect and process attributes
*
* @stability experimental
*/
public inspect(inspector: cdk.TreeInspector) {
inspector.addAttribute('aws:cdk:cloudformation:type', CfnRouteV2.CFN_RESOURCE_TYPE_NAME);
Expand Down Expand Up @@ -2475,7 +2466,6 @@ export class CfnRouteResponseV2 extends cdk.CfnResource implements cdk.IInspecta
*
* @param inspector - tree inspector to collect and process attributes
*
* @stability experimental
*/
public inspect(inspector: cdk.TreeInspector) {
inspector.addAttribute('aws:cdk:cloudformation:type', CfnRouteResponseV2.CFN_RESOURCE_TYPE_NAME);
Expand Down Expand Up @@ -2784,7 +2774,6 @@ export class CfnStageV2 extends cdk.CfnResource implements cdk.IInspectable {
*
* @param inspector - tree inspector to collect and process attributes
*
* @stability experimental
*/
public inspect(inspector: cdk.TreeInspector) {
inspector.addAttribute('aws:cdk:cloudformation:type', CfnStageV2.CFN_RESOURCE_TYPE_NAME);
Expand Down
14 changes: 13 additions & 1 deletion packages/@aws-cdk/aws-apigateway/lib/integration.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as iam from '@aws-cdk/aws-iam';
import { Lazy } from '@aws-cdk/core';
import { Lazy, Duration } from '@aws-cdk/core';
import { Method } from './method';
import { IVpcLink, VpcLink } from './vpc-link';

Expand Down Expand Up @@ -80,6 +80,14 @@ export interface IntegrationOptions {
*/
readonly requestTemplates?: { [contentType: string]: string };

/**
* The maximum amount of time an integration will run before it returns without a response.
* Must be between 50 milliseconds and 29 seconds.
*
* @default Duration.seconds(29)
*/
readonly timeout?: Duration;

/**
* The response that API Gateway provides after a method's backend completes
* processing a request. API Gateway intercepts the response from the
Expand Down Expand Up @@ -193,6 +201,10 @@ export class Integration {
if (options.connectionType === ConnectionType.INTERNET && options.vpcLink !== undefined) {
throw new Error('cannot set \'vpcLink\' where \'connectionType\' is INTERNET');
}

if (options.timeout && !options.timeout.isUnresolved() && (options.timeout.toMilliseconds() < 50 || options.timeout.toMilliseconds() > 29000)) {
throw new Error('Integration timeout must be between 50 milliseconds and 29 seconds.');
}
}

/**
Expand Down
1 change: 1 addition & 0 deletions packages/@aws-cdk/aws-apigateway/lib/method.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ export class Method extends Resource {
connectionType: options.connectionType,
connectionId: options.vpcLink ? options.vpcLink.vpcLinkId : undefined,
credentials,
timeoutInMillis: options.timeout?.toMilliseconds(),
};
}

Expand Down
3 changes: 0 additions & 3 deletions packages/@aws-cdk/aws-apigateway/lib/restapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ export interface RestApiProps extends RestApiOptions {

/**
* Props to instantiate a new SpecRestApi
* @experimental
*/
export interface SpecRestApiProps extends RestApiBaseProps {
/**
Expand Down Expand Up @@ -587,7 +586,6 @@ export abstract class RestApiBase extends Resource implements IRestApi {
* By default, the API will automatically be deployed and accessible from a
* public endpoint.
*
* @experimental
*
* @resource AWS::ApiGateway::RestApi
*/
Expand Down Expand Up @@ -680,7 +678,6 @@ export class RestApi extends RestApiBase {

/**
* Import an existing RestApi that can be configured with additional Methods and Resources.
* @experimental
*/
public static fromRestApiAttributes(scope: Construct, id: string, attrs: RestApiAttributes): IRestApi {
class Import extends RestApiBase {
Expand Down
46 changes: 46 additions & 0 deletions packages/@aws-cdk/aws-apigateway/test/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,4 +184,50 @@ describe('integration', () => {
},
});
});

test('validates timeout is valid', () => {

expect(() => new apigw.Integration({
type: apigw.IntegrationType.HTTP_PROXY,
integrationHttpMethod: 'ANY',
options: {
timeout: cdk.Duration.millis(2),
},
})).toThrow(/Integration timeout must be between 50 milliseconds and 29 seconds/);

expect(() => new apigw.Integration({
type: apigw.IntegrationType.HTTP_PROXY,
integrationHttpMethod: 'ANY',
options: {
timeout: cdk.Duration.seconds(50),
},
})).toThrow(/Integration timeout must be between 50 milliseconds and 29 seconds/);
});

test('sets timeout', () => {

// GIVEN
const stack = new cdk.Stack();
const api = new apigw.RestApi(stack, 'restapi');

// WHEN
const integration = new apigw.Integration({
type: apigw.IntegrationType.HTTP_PROXY,
integrationHttpMethod: 'ANY',
options: {
timeout: cdk.Duration.seconds(1),
},
});
api.root.addMethod('ANY', integration);

// THEN
expect(stack).toHaveResourceLike('AWS::ApiGateway::Method', {
HttpMethod: 'ANY',
Integration: {
TimeoutInMillis: 1000,
},
});

});

});
32 changes: 32 additions & 0 deletions packages/@aws-cdk/aws-appmesh/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,38 @@ const node = mesh.addVirtualNode('virtual-node', {
});
```

## Adding a connection pool to a listener

The `connectionPool` property can be added to a Virtual Node listener or Virtual Gateway listener to add a request connection pool. There are different
connection pool properties per listener protocol types.

```typescript
// A Virtual Node with a gRPC listener with a connection pool set
const node = new appmesh.VirtualNode(stack, 'node', {
mesh,
dnsHostName: 'node',
listeners: [appmesh.VirtualNodeListener.http({
port: 80,
connectionPool: {
maxConnections: 100,
maxPendingRequests: 10,
},
})],
});

// A Virtual Gateway with a gRPC listener with a connection pool set
const gateway = new appmesh.VirtualGateway(this, 'gateway', {
mesh: mesh,
listeners: [appmesh.VirtualGatewayListener.grpc({
port: 8080,
connectionPool: {
maxRequests: 10,
},
})],
virtualGatewayName: 'gateway',
});
```

## Adding a Route

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.
Expand Down
Loading

0 comments on commit 1f0589b

Please sign in to comment.