Skip to content

Commit

Permalink
Merge branch 'master' into gluegrant
Browse files Browse the repository at this point in the history
  • Loading branch information
kaizencc authored Dec 10, 2021
2 parents 8178c76 + 3a9f206 commit c9b530b
Show file tree
Hide file tree
Showing 735 changed files with 25,758 additions and 7,653 deletions.
2 changes: 2 additions & 0 deletions .gitallowed
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ account: '919830735681' #cn-northwest-1
account: '297356227824'
# partition aws-cn
account: '193023089310'
# partition aws-us-gov
account: '023102451235'
40 changes: 20 additions & 20 deletions .github/workflows/issue-label-assign.yml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions .github/workflows/yarn-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/checkout@v2

- name: Set up Node
uses: actions/setup-node@v2.4.1
uses: actions/setup-node@v2.5.0
with:
node-version: 12

Expand All @@ -27,7 +27,7 @@ jobs:
run: echo "::set-output name=dir::$(yarn cache dir)"

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

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.134.0](https://github.com/aws/aws-cdk/compare/v1.133.0...v1.134.0) (2021-11-23)


### Features

* **apigatewayv2:** domain endpoint type, security policy and endpoint migration ([#17518](https://github.com/aws/aws-cdk/issues/17518)) ([261b331](https://github.com/aws/aws-cdk/commit/261b331e89be01dc996d153c91b4018e7ddfda29))
* **cfnspec:** cloudformation spec v49.0.0 ([#17621](https://github.com/aws/aws-cdk/issues/17621)) ([ce638b4](https://github.com/aws/aws-cdk/commit/ce638b407ac9efc6a3ee4d5ecd22c68ab68b8e58))
* **docdb:** add option to set the name of the generated Secret ([#17574](https://github.com/aws/aws-cdk/issues/17574)) ([18c9ef7](https://github.com/aws/aws-cdk/commit/18c9ef713717fcb2f84e687c1e34c887a50264bd)), closes [#17572](https://github.com/aws/aws-cdk/issues/17572)
* **eks:** ALB Controller ([#17618](https://github.com/aws/aws-cdk/issues/17618)) ([1faf31d](https://github.com/aws/aws-cdk/commit/1faf31d1ec7ffec4c6323a050126b0b054094c63))
* **msk:** add Kafka version 2.6.2 ([#17497](https://github.com/aws/aws-cdk/issues/17497)) ([5f1f476](https://github.com/aws/aws-cdk/commit/5f1f4762e964345741426fa1242320a5fc117338))


### Bug Fixes

* **assets:** add missing SAM asset metadata information ([#17591](https://github.com/aws/aws-cdk/issues/17591)) ([55df760](https://github.com/aws/aws-cdk/commit/55df760fdd9514384de019e5ce338d5250c7df97)), closes [#14593](https://github.com/aws/aws-cdk/issues/14593)
* **aws-ecs:** check for invalid capacityProviderName ([#17291](https://github.com/aws/aws-cdk/issues/17291)) ([6e2fde4](https://github.com/aws/aws-cdk/commit/6e2fde452de73c51011ddb14ede40ca0471d3663)), closes [#17321](https://github.com/aws/aws-cdk/issues/17321)
* **opensearch:** correctly validate ebs configuration against instance types ([#16911](https://github.com/aws/aws-cdk/issues/16911)) ([34af598](https://github.com/aws/aws-cdk/commit/34af5988b7c1ff003d10612150191803f762a79f)), closes [#11898](https://github.com/aws/aws-cdk/issues/11898)

## [1.133.0](https://github.com/aws/aws-cdk/compare/v1.132.0...v1.133.0) (2021-11-19)


Expand Down
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,12 @@ contain three slashes to achieve the same effect:
For a practical example of how making sample code compilable works, see the
`aws-ec2` package.

> ⚠️ NOTE: README files often contain code snippets that refer to modules that are consumers
> of the current module, and hence not present in the current module's dependency closure.
> Compilation of these snippets will fail if the module referenced has not been built.
> For the best experience when working on snippets, a full build of the CDK repo is required.
> However, it may be prudent to "build up" these modules as required.
#### Recommendations

In order to offer a consistent documentation style throughout the AWS CDK
Expand Down
11 changes: 0 additions & 11 deletions DEPRECATED_APIs.md
Original file line number Diff line number Diff line change
Expand Up @@ -600,20 +600,10 @@
| @aws-cdk/aws-dynamodb | Table.​grantListStreams() | Use {@link #grantTableListStreams} for more granular permission |
| @aws-cdk/aws-dynamodb | Table.​metricSystemErrors() | use `metricSystemErrorsForOperations`. |
| @aws-cdk/aws-dynamodb | TableOptions.​serverSideEncryption | This property is deprecated. In order to obtain the same behavior as enabling this, set the `encryption` property to `TableEncryption.AWS_MANAGED` instead. |
| @aws-cdk/aws-rds | Credentials.​fromUsername() | use `fromGeneratedSecret()` or `fromPassword()` for new Clusters and Instances. Note that switching from `fromUsername()` to `fromGeneratedSecret()` or `fromPassword()` for already deployed Clusters or Instances will result in their replacement! |
| @aws-cdk/aws-rds | CredentialsFromUsernameOptions | supporting API `fromUsername()` has been deprecated. See deprecation notice of the API. |
| @aws-cdk/aws-rds | CredentialsFromUsernameOptions.​password | supporting API `fromUsername()` has been deprecated. See deprecation notice of the API. |
| @aws-cdk/aws-rds | DatabaseInstanceEngine.​MARIADB | using unversioned engines is an availability risk. We recommend using versioned engines created using the {@link mariaDb()} method |
| @aws-cdk/aws-rds | DatabaseInstanceEngine.​MYSQL | using unversioned engines is an availability risk. We recommend using versioned engines created using the {@link mysql()} method |
| @aws-cdk/aws-rds | DatabaseInstanceEngine.​ORACLE_​EE | using unversioned engines is an availability risk. We recommend using versioned engines created using the {@link oracleEe()} method |
| @aws-cdk/aws-rds | DatabaseInstanceEngine.​ORACLE_​SE | instances can no longer be created with this engine. See https://forums.aws.amazon.com/ann.jspa?annID=7341 |
| @aws-cdk/aws-rds | DatabaseInstanceEngine.​ORACLE_​SE1 | instances can no longer be created with this engine. See https://forums.aws.amazon.com/ann.jspa?annID=7341 |
| @aws-cdk/aws-rds | DatabaseInstanceEngine.​ORACLE_​SE2 | using unversioned engines is an availability risk. We recommend using versioned engines created using the {@link oracleSe2()} method |
| @aws-cdk/aws-rds | DatabaseInstanceEngine.​POSTGRES | using unversioned engines is an availability risk. We recommend using versioned engines created using the {@link postgres()} method |
| @aws-cdk/aws-rds | DatabaseInstanceEngine.​SQL_​SERVER_​EE | using unversioned engines is an availability risk. We recommend using versioned engines created using the {@link sqlServerEe()} method |
| @aws-cdk/aws-rds | DatabaseInstanceEngine.​SQL_​SERVER_​EX | using unversioned engines is an availability risk. We recommend using versioned engines created using the {@link sqlServerEx()} method |
| @aws-cdk/aws-rds | DatabaseInstanceEngine.​SQL_​SERVER_​SE | using unversioned engines is an availability risk. We recommend using versioned engines created using the {@link sqlServerSe()} method |
| @aws-cdk/aws-rds | DatabaseInstanceEngine.​SQL_​SERVER_​WEB | using unversioned engines is an availability risk. We recommend using versioned engines created using the {@link sqlServerWeb()} method |
| @aws-cdk/aws-rds | DatabaseInstanceEngine.​oracleSe() | instances can no longer be created with this engine. See https://forums.aws.amazon.com/ann.jspa?annID=7341 |
| @aws-cdk/aws-rds | DatabaseInstanceEngine.​oracleSe1() | instances can no longer be created with this engine. See https://forums.aws.amazon.com/ann.jspa?annID=7341 |
| @aws-cdk/aws-rds | DatabaseInstanceNewProps.​vpcPlacement | use `vpcSubnets` |
Expand Down Expand Up @@ -751,7 +741,6 @@
| @aws-cdk/aws-ecs | BaseService.​configureAwsVpcNetworking() | use configureAwsVpcNetworkingWithSecurityGroups instead. |
| @aws-cdk/aws-ecs | BaseServiceOptions.​propagateTaskTagsFrom | Use `propagateTags` instead. |
| @aws-cdk/aws-ecs | Cluster.​addAutoScalingGroup() | Use {@link Cluster.addAsgCapacityProvider} instead. |
| @aws-cdk/aws-ecs | Cluster.​addCapacity() | Use {@link Cluster.addAsgCapacityProvider} instead. |
| @aws-cdk/aws-ecs | Cluster.​addCapacityProvider() | Use {@link enableFargateCapacityProviders} instead. |
| @aws-cdk/aws-ecs | ClusterProps.​capacityProviders | Use {@link ClusterProps.enableFargateCapacityProviders} instead. |
| @aws-cdk/aws-ecs | Ec2ServiceProps.​securityGroup | use securityGroups instead. |
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ this capability, please see the

## More Resources
* [CDK Workshop](https://cdkworkshop.com/)
* [Construct Hub](https://constructs.dev) - Find and use open-source Cloud Development Kit (CDK) libraries
* **[CDK Construction Zone](https://www.twitch.tv/collections/9kCOGphNZBYVdA)** - A Twitch live coding series hosted by the CDK team, season one episodes:
* 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:
* [S1E1](https://www.twitch.tv/videos/917691798): Triggers (part 1); **Participants:** @NetaNir, @eladb, @richardhboyd
Expand Down
11 changes: 0 additions & 11 deletions deprecated_apis.txt
Original file line number Diff line number Diff line change
Expand Up @@ -599,17 +599,8 @@ constructs.Node#uniqueId
@aws-cdk/aws-rds.Credentials#fromUsername
@aws-cdk/aws-rds.CredentialsFromUsernameOptions
@aws-cdk/aws-rds.CredentialsFromUsernameOptions#password
@aws-cdk/aws-rds.DatabaseInstanceEngine#MARIADB
@aws-cdk/aws-rds.DatabaseInstanceEngine#MYSQL
@aws-cdk/aws-rds.DatabaseInstanceEngine#ORACLE_EE
@aws-cdk/aws-rds.DatabaseInstanceEngine#ORACLE_SE
@aws-cdk/aws-rds.DatabaseInstanceEngine#ORACLE_SE1
@aws-cdk/aws-rds.DatabaseInstanceEngine#ORACLE_SE2
@aws-cdk/aws-rds.DatabaseInstanceEngine#POSTGRES
@aws-cdk/aws-rds.DatabaseInstanceEngine#SQL_SERVER_EE
@aws-cdk/aws-rds.DatabaseInstanceEngine#SQL_SERVER_EX
@aws-cdk/aws-rds.DatabaseInstanceEngine#SQL_SERVER_SE
@aws-cdk/aws-rds.DatabaseInstanceEngine#SQL_SERVER_WEB
@aws-cdk/aws-rds.DatabaseInstanceEngine#oracleSe
@aws-cdk/aws-rds.DatabaseInstanceEngine#oracleSe1
@aws-cdk/aws-rds.DatabaseInstanceNewProps#vpcPlacement
Expand Down Expand Up @@ -721,7 +712,6 @@ constructs.Node#uniqueId
@aws-cdk/aws-rds.PostgresEngineVersion#VER_9_6_6
@aws-cdk/aws-rds.PostgresEngineVersion#VER_9_6_8
@aws-cdk/aws-rds.PostgresEngineVersion#VER_9_6_9
@aws-cdk/aws-rds.SnapshotCredentials#fromGeneratedPassword
@aws-cdk/aws-rds.SqlServerEngineVersion#VER_15_00_4043_23_V1
@aws-cdk/aws-autoscaling.BlockDevice#mappingEnabled
@aws-cdk/aws-autoscaling.CommonAutoScalingGroupProps#notificationsTopic
Expand All @@ -747,7 +737,6 @@ constructs.Node#uniqueId
@aws-cdk/aws-ecs.BaseService#configureAwsVpcNetworking
@aws-cdk/aws-ecs.BaseServiceOptions#propagateTaskTagsFrom
@aws-cdk/aws-ecs.Cluster#addAutoScalingGroup
@aws-cdk/aws-ecs.Cluster#addCapacity
@aws-cdk/aws-ecs.Cluster#addCapacityProvider
@aws-cdk/aws-ecs.ClusterProps#capacityProviders
@aws-cdk/aws-ecs.Ec2ServiceProps#securityGroup
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
"fs-extra": "^9.1.0",
"graceful-fs": "^4.2.8",
"jest-junit": "^13.0.0",
"jsii-diff": "^1.46.0",
"jsii-pacmak": "^1.46.0",
"jsii-reflect": "^1.46.0",
"jsii-rosetta": "^1.46.0",
"jsii-diff": "^1.47.0",
"jsii-pacmak": "^1.47.0",
"jsii-reflect": "^1.47.0",
"jsii-rosetta": "^1.47.0",
"lerna": "^4.0.0",
"patch-package": "^6.4.7",
"standard-version": "^9.3.2",
Expand Down
35 changes: 33 additions & 2 deletions packages/@aws-cdk-containers/ecs-service-extensions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,11 +392,42 @@ For setting up a topic-specific queue subscription, you can provide a custom que

```ts
nameDescription.add(new QueueExtension({
queue: myEventsQueue,
eventsQueue: myEventsQueue,
subscriptions: [new TopicSubscription({
topic: new sns.Topic(stack, 'my-topic'),
// `myTopicQueue` will subscribe to the `my-topic` instead of `eventsQueue`
queue: myTopicQueue,
topicSubscriptionQueue: {
queue: myTopicQueue,
},
}],
}));
```

### Configuring auto scaling based on SQS Queues

You can scale your service up or down to maintain an acceptable queue latency by tracking the backlog per task. It configures a target tracking scaling policy with target value (acceptable backlog per task) calculated by dividing the `acceptableLatency` by `messageProcessingTime`. For example, if the maximum acceptable latency for a message to be processed after its arrival in the SQS Queue is 10 mins and the average processing time for a task is 250 milliseconds per message, then `acceptableBacklogPerTask = 10 * 60 / 0.25 = 2400`. Therefore, each queue can hold up to 2400 messages before the service starts to scale up. For this, a target tracking policy will be attached to the scaling target for your service with target value `2400`. For more information, please refer: https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-using-sqs-queue.html .

You can configure auto scaling based on SQS Queue for your service as follows:

```ts
nameDescription.add(new QueueExtension({
eventsQueue: myEventsQueue,
// Need to specify `scaleOnLatency` to configure auto scaling based on SQS Queue
scaleOnLatency: {
acceptableLatency: cdk.Duration.minutes(10),
messageProcessingTime: cdk.Duration.millis(250),
},
subscriptions: [new TopicSubscription({
topic: new sns.Topic(stack, 'my-topic'),
// `myTopicQueue` will subscribe to the `my-topic` instead of `eventsQueue`
topicSubscriptionQueue: {
queue: myTopicQueue,
// Optionally provide `scaleOnLatency` for configuring separate autoscaling for `myTopicQueue`
scaleOnLatency: {
acceptableLatency: cdk.Duration.minutes(10),
messageProcessingTime: cdk.Duration.millis(250),
}
},
}],
}));
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export * from './cloudwatch-agent';
export * from './scale-on-cpu-utilization';
export * from './xray';
export * from './assign-public-ip';
export * from './queue';
export * from './queue/queue';
export * from './injecter';
Loading

0 comments on commit c9b530b

Please sign in to comment.