Skip to content

Commit

Permalink
Merge branch 'main' into feat/cloud9_imageId
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jul 19, 2022
2 parents c0e1701 + 1f0656e commit c96d2a1
Show file tree
Hide file tree
Showing 300 changed files with 13,943 additions and 1,183 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/yarn-upgrade-v1main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ jobs:
# Upgrade dependencies at repository root
ncu --upgrade --filter=@types/node,@types/fs-extra --target=minor
ncu --upgrade --filter=typescript --target=patch
ncu --upgrade --reject=@types/node,@types/fs-extra,constructs,typescript,lerna --target=minor
ncu --upgrade --reject=@types/node,@types/prettier,@types/fs-extra,constructs,typescript,lerna --target=minor
# Upgrade all the packages
lerna exec --parallel ncu -- --upgrade --filter=@types/node,@types/fs-extra --target=minor
lerna exec --parallel ncu -- --upgrade --filter=typescript --target=patch
lerna exec --parallel ncu -- --upgrade --reject='@types/node,@types/fs-extra,constructs,typescript,aws-sdk,aws-sdk-mock,${{ steps.list-packages.outputs.list }}' --target=minor
lerna exec --parallel ncu -- --upgrade --reject='@types/node,@types/prettier,@types/fs-extra,constructs,typescript,aws-sdk,aws-sdk-mock,${{ steps.list-packages.outputs.list }}' --target=minor
# This will ensure the current lockfile is up-to-date with the dependency specifications (necessary for "yarn update" to run)
- name: Run "yarn install"
Expand Down Expand Up @@ -119,7 +119,8 @@ jobs:
uses: peter-evans/create-pull-request@v4
with:
# Git commit details
branch: automation/yarn-upgrade
branch: automation/yarn-upgrade-v1
author: aws-cdk-automation <[email protected]>
commit-message: |-
chore: npm-check-updates && yarn upgrade
Ran npm-check-updates and yarn upgrade to keep the `yarn.lock` file up-to-date.
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
"fs-extra": "^9.1.0",
"graceful-fs": "^4.2.10",
"jest-junit": "^13.2.0",
"jsii-diff": "^1.60.1",
"jsii-pacmak": "^1.60.1",
"jsii-reflect": "^1.60.1",
"jsii-rosetta": "^1.60.1",
"jsii-diff": "^1.62.0",
"jsii-pacmak": "^1.62.0",
"jsii-reflect": "^1.62.0",
"jsii-rosetta": "^1.62.0",
"lerna": "^4.0.0",
"patch-package": "^6.4.7",
"semver": "^6.3.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/aws-lambda": "^8.10.99",
"@types/aws-lambda": "^8.10.101",
"@types/jest": "^27.5.2"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"version": "17.0.0",
"version": "20.0.0",
"files": {
"662d596c9f903a17e9d22652d1bd0743cc93eee9b2ab0187f59c81096e13b7f1": {
"edb3fd1d912b400f4857c41a3ff80bcc32d180595affcd6c017f72afd5959482": {
"source": {
"path": "aws-appsync-integ.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "662d596c9f903a17e9d22652d1bd0743cc93eee9b2ab0187f59c81096e13b7f1.json",
"objectKey": "edb3fd1d912b400f4857c41a3ff80bcc32d180595affcd6c017f72afd5959482.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
"ApiF70053CD",
"ApiId"
]
},
"Expires": 1658053715
}
},
"DependsOn": [
"ApiSchema510EECD7"
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"17.0.0"}
{"version":"20.0.0"}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "17.0.0",
"version": "20.0.0",
"artifacts": {
"Tree": {
"type": "cdk:tree",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"path": "Tree",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.0.9"
"version": "10.1.33"
}
},
"aws-appsync-integ": {
Expand Down Expand Up @@ -66,8 +66,7 @@
"ApiF70053CD",
"ApiId"
]
},
"expires": 1658053715
}
}
},
"constructInfo": {
Expand Down
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { join } from 'path';
import { AttributeType, BillingMode, Table } from '@aws-cdk/aws-dynamodb';
import { App, RemovalPolicy, Stack, Expiration } from '@aws-cdk/core';
import { App, RemovalPolicy, Stack } from '@aws-cdk/core';
import { AuthorizationType, GraphqlApi, MappingTemplate, PrimaryKey, Schema, Values } from '../lib';

/*
Expand Down Expand Up @@ -28,8 +28,8 @@ const api = new GraphqlApi(stack, 'Api', {
defaultAuthorization: {
authorizationType: AuthorizationType.API_KEY,
apiKeyConfig: {
// Generate a timestamp that's 365 days ahead, use atTimestamp so integ test doesn't fail
expires: Expiration.atTimestamp(1658053715000),
// Rely on default expiration date provided by the API so we have a deterministic snapshot
expires: undefined,
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@types/aws-lambda": "^8.10.99",
"@types/aws-lambda": "^8.10.101",
"@types/sinon": "^9.0.11",
"@aws-cdk/cdk-build-tools": "0.0.0",
"aws-sdk": "^2.596.0",
Expand All @@ -43,7 +43,7 @@
"jest": "^27.5.1",
"lambda-tester": "^3.6.0",
"sinon": "^9.2.4",
"nock": "^13.2.6",
"nock": "^13.2.8",
"ts-jest": "^27.1.5"
}
}
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-cloudformation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"@aws-cdk/integ-runner": "0.0.0",
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/aws-lambda": "^8.10.99",
"@types/aws-lambda": "^8.10.101",
"@types/jest": "^27.5.2",
"jest": "^27.5.1"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@
"eslint-plugin-standard": "^4.1.0",
"jest": "^27.5.1",
"lambda-tester": "^3.6.0",
"nock": "^13.2.6"
"nock": "^13.2.8"
}
}
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-dynamodb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"@aws-cdk/integ-runner": "0.0.0",
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/aws-lambda": "^8.10.99",
"@types/aws-lambda": "^8.10.101",
"@types/jest": "^27.5.2",
"@types/sinon": "^9.0.11",
"aws-sdk": "^2.848.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-ec2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"@aws-cdk/cloud-assembly-schema": "0.0.0",
"@aws-cdk/cx-api": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/aws-lambda": "^8.10.99",
"@types/aws-lambda": "^8.10.101",
"@types/jest": "^27.5.2",
"jest": "^27.5.1"
},
Expand Down
28 changes: 27 additions & 1 deletion packages/@aws-cdk/aws-ecs-patterns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,32 @@ const loadBalancedFargateService = new ecsPatterns.ApplicationLoadBalancedFargat
});
```

### Set capacityProviderStrategies for ApplicationLoadBalancedFargateService

```ts
declare const cluster: ecs.Cluster;
cluster.enableFargateCapacityProviders();

const loadBalancedFargateService = new ecsPatterns.ApplicationLoadBalancedFargateService(this, 'Service', {
cluster,
taskImageOptions: {
image: ecs.ContainerImage.fromRegistry("amazon/amazon-ecs-sample"),
},
capacityProviderStrategies: [
{
capacityProvider: 'FARGATE_SPOT',
weight: 2,
base: 0,
},
{
capacityProvider: 'FARGATE',
weight: 1,
base: 1,
},
],
});
```

### Add Schedule-Based Auto-Scaling to an ApplicationLoadBalancedFargateService

```ts
Expand Down Expand Up @@ -741,7 +767,7 @@ AWS Fargate. Enable ECS Exec, by setting `enableExecuteCommand` to `true`.

ECS Exec is supported by all Services i.e. `ApplicationLoadBalanced(Fargate|Ec2)Service`, `ApplicationMultipleTargetGroups(Fargate|Ec2)Service`, `NetworkLoadBalanced(Fargate|Ec2)Service`, `NetworkMultipleTargetGroups(Fargate|Ec2)Service`, `QueueProcessing(Fargate|Ec2)Service`. It is not supported for `ScheduledTask`s.

Read more about ECS Exec in the [ECS Developer Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-exec.html).
Read more about ECS Exec in the [ECS Developer Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-exec.html).

Example:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Certificate, CertificateValidation, ICertificate } from '@aws-cdk/aws-c
import { IVpc } from '@aws-cdk/aws-ec2';
import {
AwsLogDriver, BaseService, CloudMapOptions, Cluster, ContainerImage, DeploymentController, DeploymentCircuitBreaker,
ICluster, LogDriver, PropagatedTagSource, Secret,
ICluster, LogDriver, PropagatedTagSource, Secret, CapacityProviderStrategy,
} from '@aws-cdk/aws-ecs';
import {
ApplicationListener, ApplicationLoadBalancer, ApplicationProtocol, ApplicationProtocolVersion, ApplicationTargetGroup,
Expand Down Expand Up @@ -248,6 +248,14 @@ export interface ApplicationLoadBalancedServiceBaseProps {
*/
readonly circuitBreaker?: DeploymentCircuitBreaker;

/**
* A list of Capacity Provider strategies used to place a service.
*
* @default - undefined
*
*/
readonly capacityProviderStrategies?: CapacityProviderStrategy[];

/**
* Name of the load balancer
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { IVpc } from '@aws-cdk/aws-ec2';
import {
AwsLogDriver, BaseService, CloudMapOptions, Cluster, ContainerImage, DeploymentController, DeploymentCircuitBreaker,
ICluster, LogDriver, PropagatedTagSource, Secret,
ICluster, LogDriver, PropagatedTagSource, Secret, CapacityProviderStrategy,
} from '@aws-cdk/aws-ecs';
import { INetworkLoadBalancer, NetworkListener, NetworkLoadBalancer, NetworkTargetGroup } from '@aws-cdk/aws-elasticloadbalancingv2';
import { IRole } from '@aws-cdk/aws-iam';
Expand Down Expand Up @@ -183,6 +183,14 @@ export interface NetworkLoadBalancedServiceBaseProps {
*/
readonly circuitBreaker?: DeploymentCircuitBreaker;

/**
* A list of Capacity Provider strategies used to place a service.
*
* @default - undefined
*
*/
readonly capacityProviderStrategies?: CapacityProviderStrategy[];

/**
* Whether ECS Exec should be enabled
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ export class ApplicationLoadBalancedEc2Service extends ApplicationLoadBalancedSe
enableExecuteCommand: props.enableExecuteCommand,
placementConstraints: props.placementConstraints,
placementStrategies: props.placementStrategies,
capacityProviderStrategies: props.capacityProviderStrategies,
});
this.addServiceAsTarget(this.service);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ export class NetworkLoadBalancedEc2Service extends NetworkLoadBalancedServiceBas
enableExecuteCommand: props.enableExecuteCommand,
placementConstraints: props.placementConstraints,
placementStrategies: props.placementStrategies,
capacityProviderStrategies: props.capacityProviderStrategies,
});
this.addServiceAsTarget(this.service);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ export class ApplicationLoadBalancedFargateService extends ApplicationLoadBalanc
securityGroups: props.securityGroups,
vpcSubnets: props.taskSubnets,
enableExecuteCommand: props.enableExecuteCommand,
capacityProviderStrategies: props.capacityProviderStrategies,
});
this.addServiceAsTarget(this.service);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ export class NetworkLoadBalancedFargateService extends NetworkLoadBalancedServic
circuitBreaker: props.circuitBreaker,
vpcSubnets: props.taskSubnets,
enableExecuteCommand: props.enableExecuteCommand,
capacityProviderStrategies: props.capacityProviderStrategies,
});
this.addServiceAsTarget(this.service);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"version": "20.0.0",
"files": {
"14bdb67f7676296b9bdb5b121f8aa237cf8df54278388a53a755ffd368499b9b": {
"source": {
"path": "aws-ecs-integ.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "14bdb67f7676296b9bdb5b121f8aa237cf8df54278388a53a755ffd368499b9b.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
}
},
"dockerImages": {}
}
Loading

0 comments on commit c96d2a1

Please sign in to comment.