Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit fd64bf3

Browse files
authoredAug 23, 2024··
Merge branch 'main' into vpcv2_readme
2 parents bed6b06 + c629172 commit fd64bf3

File tree

18 files changed

+202
-73
lines changed

18 files changed

+202
-73
lines changed
 

‎CHANGELOG.v2.alpha.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
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+
## [2.154.1-alpha.0](https://github.com/aws/aws-cdk/compare/v2.154.0-alpha.0...v2.154.1-alpha.0) (2024-08-23)
6+
57
## [2.154.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.153.0-alpha.0...v2.154.0-alpha.0) (2024-08-22)
68

79

‎CHANGELOG.v2.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
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+
## [2.154.1](https://github.com/aws/aws-cdk/compare/v2.154.0...v2.154.1) (2024-08-23)
6+
7+
8+
### Features
9+
10+
* update L1 CloudFormation resource definitions ([#31193](https://github.com/aws/aws-cdk/issues/31193)) ([aa97525](https://github.com/aws/aws-cdk/commit/aa975253fe7f21f20c1d0a92f0b9c4fd28ed3236))
11+
* update L1 CloudFormation resource definitions ([#31194](https://github.com/aws/aws-cdk/issues/31194)) ([2191264](https://github.com/aws/aws-cdk/commit/2191264491dbf373c0678f6984a1beab7d913d5f))
12+
13+
14+
### Bug Fixes
15+
16+
* **cloudfront:** requirement of domainNames prevents moving a domain name between distributions ([#31001](https://github.com/aws/aws-cdk/issues/31001)) ([1255ce3](https://github.com/aws/aws-cdk/commit/1255ce3b68341755f1bd8f44d68d0da8558a1a5e)), closes [#29960](https://github.com/aws/aws-cdk/issues/29960) [#29329](https://github.com/aws/aws-cdk/issues/29329)
17+
518
## [2.154.0](https://github.com/aws/aws-cdk/compare/v2.153.0...v2.154.0) (2024-08-22)
619

720

@@ -28,7 +41,6 @@ All notable changes to this project will be documented in this file. See [standa
2841

2942
### Bug Fixes
3043

31-
* **cloudfront:** requirement of domainNames prevents moving a domain name between distributions ([#31001](https://github.com/aws/aws-cdk/issues/31001)) ([acdf7d3](https://github.com/aws/aws-cdk/commit/acdf7d3a1ffe2cbc8239cd0b788dc47b99e35184)), closes [#29960](https://github.com/aws/aws-cdk/issues/29960) [#29329](https://github.com/aws/aws-cdk/issues/29329)
3244
* **elasticloadbalancingv2-targets:** add AlbListenerTarget for NLBs, deprecate AlbTarget due to ALB listener race conditions ([#17208](https://github.com/aws/aws-cdk/issues/17208)) ([#30396](https://github.com/aws/aws-cdk/issues/30396)) ([1fca1e5](https://github.com/aws/aws-cdk/commit/1fca1e5b92ba760a33652f39c2345f6aa1eaa9f7)), closes [/github.com/aws/aws-cdk/issues/17208#issuecomment-1681475590](https://github.com/aws//github.com/aws/aws-cdk/issues/17208/issues/issuecomment-1681475590)
3345
* **lambda:** validate localMountPath format and length ([#31019](https://github.com/aws/aws-cdk/issues/31019)) ([c159e77](https://github.com/aws/aws-cdk/commit/c159e77ab34701fc6780b9501f1692fbf2366b04))
3446
* **vpc-v2:** fixing default scope id ([#31102](https://github.com/aws/aws-cdk/issues/31102)) ([0007a29](https://github.com/aws/aws-cdk/commit/0007a29714cf04abb307845874dde27c813d45dd))

‎packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/aws-sfn-tasks-ecs-fargate-run-task.assets.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/aws-sfn-tasks-ecs-fargate-run-task.template.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,7 @@
828828
"GroupId"
829829
]
830830
},
831-
"\"]}},\"Overrides\":{\"ContainerOverrides\":[{\"Name\":\"TheContainer\",\"Environment\":[{\"Name\":\"SOME_KEY\",\"Value.$\":\"$.SomeKey\"}]}]},\"LaunchType\":\"FARGATE\",\"PlatformVersion\":\"1.4.0\"}},\"FargateTaskSetRevisionNumber\":{\"Next\":\"FargateTaskWithPropagatedTag\",\"Type\":\"Task\",\"Resource\":\"arn:",
831+
"\"]}},\"Overrides\":{\"Cpu\":\"1024\",\"Memory\":\"2048\",\"ContainerOverrides\":[{\"Name\":\"TheContainer\",\"Environment\":[{\"Name\":\"SOME_KEY\",\"Value.$\":\"$.SomeKey\"}]}]},\"LaunchType\":\"FARGATE\",\"PlatformVersion\":\"1.4.0\"}},\"FargateTaskSetRevisionNumber\":{\"Next\":\"FargateTaskWithPropagatedTag\",\"Type\":\"Task\",\"Resource\":\"arn:",
832832
{
833833
"Ref": "AWS::Partition"
834834
},

‎packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/manifest.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/tree.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.ts

+2
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ const definition = new sfn.Pass(stack, 'Start', {
5757
platformVersion: ecs.FargatePlatformVersion.VERSION1_4,
5858
}),
5959
taskTimeout: sfn.Timeout.at('$.Timeout'),
60+
cpu: '1024',
61+
memoryMiB: '2048',
6062
}),
6163
).next(
6264
new tasks.EcsRunTask(stack, 'FargateTaskSetRevisionNumber', {

‎packages/@aws-cdk/cloudformation-diff/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
},
2424
"license": "Apache-2.0",
2525
"dependencies": {
26-
"@aws-cdk/aws-service-spec": "^0.1.18",
27-
"@aws-cdk/service-spec-types": "^0.0.86",
26+
"@aws-cdk/aws-service-spec": "^0.1.20",
27+
"@aws-cdk/service-spec-types": "^0.0.87",
2828
"chalk": "^4",
2929
"diff": "^5.2.0",
3030
"fast-deep-equal": "^3.1.3",

‎packages/@aws-cdk/integ-runner/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"@aws-cdk/cloud-assembly-schema": "^36.0.5",
7575
"@aws-cdk/cloudformation-diff": "0.0.0",
7676
"@aws-cdk/cx-api": "0.0.0",
77-
"@aws-cdk/aws-service-spec": "^0.1.18",
77+
"@aws-cdk/aws-service-spec": "^0.1.20",
7878
"cdk-assets": "^2.151.2",
7979
"@aws-cdk/cdk-cli-wrapper": "0.0.0",
8080
"aws-cdk": "0.0.0",

‎packages/aws-cdk-lib/assertions/lib/annotations.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class Annotations {
2525
/**
2626
* Assert that an error with the given message exists in the synthesized CDK `Stack`.
2727
*
28-
* @param constructPath the construct path to the error. Provide `'*'` to match all errors in the template.
28+
* @param constructPath the construct path to the error, provide `'*'` to match all errors in the template.
2929
* @param message the error message as should be expected. This should be a string or Matcher object.
3030
*/
3131
public hasError(constructPath: string, message: any): void {
@@ -38,7 +38,7 @@ export class Annotations {
3838
/**
3939
* Assert that an error with the given message does not exist in the synthesized CDK `Stack`.
4040
*
41-
* @param constructPath the construct path to the error. Provide `'*'` to match all errors in the template.
41+
* @param constructPath the construct path to the error, provide `'*'` to match all errors in the template.
4242
* @param message the error message as should be expected. This should be a string or Matcher object.
4343
*/
4444
public hasNoError(constructPath: string, message: any): void {
@@ -51,7 +51,7 @@ export class Annotations {
5151
/**
5252
* Get the set of matching errors of a given construct path and message.
5353
*
54-
* @param constructPath the construct path to the error. Provide `'*'` to match all errors in the template.
54+
* @param constructPath the construct path to the error, provide `'*'` to match all errors in the template.
5555
* @param message the error message as should be expected. This should be a string or Matcher object.
5656
*/
5757
public findError(constructPath: string, message: any): SynthesisMessage[] {
@@ -61,7 +61,7 @@ export class Annotations {
6161
/**
6262
* Assert that an warning with the given message exists in the synthesized CDK `Stack`.
6363
*
64-
* @param constructPath the construct path to the warning. Provide `'*'` to match all warnings in the template.
64+
* @param constructPath the construct path to the warning, provide `'*'` to match all warnings in the template.
6565
* @param message the warning message as should be expected. This should be a string or Matcher object.
6666
*/
6767
public hasWarning(constructPath: string, message: any): void {
@@ -74,7 +74,7 @@ export class Annotations {
7474
/**
7575
* Assert that an warning with the given message does not exist in the synthesized CDK `Stack`.
7676
*
77-
* @param constructPath the construct path to the warning. Provide `'*'` to match all warnings in the template.
77+
* @param constructPath the construct path to the warning, provide `'*'` to match all warnings in the template.
7878
* @param message the warning message as should be expected. This should be a string or Matcher object.
7979
*/
8080
public hasNoWarning(constructPath: string, message: any): void {
@@ -87,7 +87,7 @@ export class Annotations {
8787
/**
8888
* Get the set of matching warning of a given construct path and message.
8989
*
90-
* @param constructPath the construct path to the warning. Provide `'*'` to match all warnings in the template.
90+
* @param constructPath the construct path to the warning, provide `'*'` to match all warnings in the template.
9191
* @param message the warning message as should be expected. This should be a string or Matcher object.
9292
*/
9393
public findWarning(constructPath: string, message: any): SynthesisMessage[] {
@@ -97,7 +97,7 @@ export class Annotations {
9797
/**
9898
* Assert that an info with the given message exists in the synthesized CDK `Stack`.
9999
*
100-
* @param constructPath the construct path to the info. Provide `'*'` to match all info in the template.
100+
* @param constructPath the construct path to the info, provide `'*'` to match all info in the template.
101101
* @param message the info message as should be expected. This should be a string or Matcher object.
102102
*/
103103
public hasInfo(constructPath: string, message: any): void {
@@ -110,7 +110,7 @@ export class Annotations {
110110
/**
111111
* Assert that an info with the given message does not exist in the synthesized CDK `Stack`.
112112
*
113-
* @param constructPath the construct path to the info. Provide `'*'` to match all info in the template.
113+
* @param constructPath the construct path to the info, provide `'*'` to match all info in the template.
114114
* @param message the info message as should be expected. This should be a string or Matcher object.
115115
*/
116116
public hasNoInfo(constructPath: string, message: any): void {
@@ -123,7 +123,7 @@ export class Annotations {
123123
/**
124124
* Get the set of matching infos of a given construct path and message.
125125
*
126-
* @param constructPath the construct path to the info. Provide `'*'` to match all infos in the template.
126+
* @param constructPath the construct path to the info, provide `'*'` to match all infos in the template.
127127
* @param message the info message as should be expected. This should be a string or Matcher object.
128128
*/
129129
public findInfo(constructPath: string, message: any): SynthesisMessage[] {

‎packages/aws-cdk-lib/assertions/lib/template.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ export class Template {
168168
* Assert that a Parameter with the given properties exists in the CloudFormation template.
169169
* By default, performs partial matching on the parameter, via the `Match.objectLike()`.
170170
* To configure different behavior, use other matchers in the `Match` class.
171-
* @param logicalId the name of the parameter. Provide `'*'` to match all parameters in the template.
171+
* @param logicalId the name of the parameter, provide `'*'` to match all parameters in the template.
172172
* @param props the parameter as should be expected in the template.
173173
*/
174174
public hasParameter(logicalId: string, props: any): void {
@@ -180,7 +180,7 @@ export class Template {
180180

181181
/**
182182
* Get the set of matching Parameters that match the given properties in the CloudFormation template.
183-
* @param logicalId the name of the parameter. Provide `'*'` to match all parameters in the template.
183+
* @param logicalId the name of the parameter, provide `'*'` to match all parameters in the template.
184184
* @param props by default, matches all Parameters in the template.
185185
* When a literal object is provided, performs a partial match via `Match.objectLike()`.
186186
* Use the `Match` APIs to configure a different behaviour.
@@ -193,7 +193,7 @@ export class Template {
193193
* Assert that an Output with the given properties exists in the CloudFormation template.
194194
* By default, performs partial matching on the resource, via the `Match.objectLike()`.
195195
* To configure different behavior, use other matchers in the `Match` class.
196-
* @param logicalId the name of the output. Provide `'*'` to match all outputs in the template.
196+
* @param logicalId the name of the output, provide `'*'` to match all outputs in the template.
197197
* @param props the output as should be expected in the template.
198198
*/
199199
public hasOutput(logicalId: string, props: any): void {
@@ -205,7 +205,7 @@ export class Template {
205205

206206
/**
207207
* Get the set of matching Outputs that match the given properties in the CloudFormation template.
208-
* @param logicalId the name of the output. Provide `'*'` to match all outputs in the template.
208+
* @param logicalId the name of the output, provide `'*'` to match all outputs in the template.
209209
* @param props by default, matches all Outputs in the template.
210210
* When a literal object is provided, performs a partial match via `Match.objectLike()`.
211211
* Use the `Match` APIs to configure a different behaviour.
@@ -218,7 +218,7 @@ export class Template {
218218
* Assert that a Mapping with the given properties exists in the CloudFormation template.
219219
* By default, performs partial matching on the resource, via the `Match.objectLike()`.
220220
* To configure different behavior, use other matchers in the `Match` class.
221-
* @param logicalId the name of the mapping. Provide `'*'` to match all mappings in the template.
221+
* @param logicalId the name of the mapping, provide `'*'` to match all mappings in the template.
222222
* @param props the output as should be expected in the template.
223223
*/
224224
public hasMapping(logicalId: string, props: any): void {
@@ -230,7 +230,7 @@ export class Template {
230230

231231
/**
232232
* Get the set of matching Mappings that match the given properties in the CloudFormation template.
233-
* @param logicalId the name of the mapping. Provide `'*'` to match all mappings in the template.
233+
* @param logicalId the name of the mapping, provide `'*'` to match all mappings in the template.
234234
* @param props by default, matches all Mappings in the template.
235235
* When a literal object is provided, performs a partial match via `Match.objectLike()`.
236236
* Use the `Match` APIs to configure a different behaviour.
@@ -243,7 +243,7 @@ export class Template {
243243
* Assert that a Condition with the given properties exists in the CloudFormation template.
244244
* By default, performs partial matching on the resource, via the `Match.objectLike()`.
245245
* To configure different behavior, use other matchers in the `Match` class.
246-
* @param logicalId the name of the mapping. Provide `'*'` to match all conditions in the template.
246+
* @param logicalId the name of the mapping, provide `'*'` to match all conditions in the template.
247247
* @param props the output as should be expected in the template.
248248
*/
249249
public hasCondition(logicalId: string, props: any): void {
@@ -255,7 +255,7 @@ export class Template {
255255

256256
/**
257257
* Get the set of matching Conditions that match the given properties in the CloudFormation template.
258-
* @param logicalId the name of the condition. Provide `'*'` to match all conditions in the template.
258+
* @param logicalId the name of the condition, provide `'*'` to match all conditions in the template.
259259
* @param props by default, matches all Conditions in the template.
260260
* When a literal object is provided, performs a partial match via `Match.objectLike()`.
261261
* Use the `Match` APIs to configure a different behaviour.

‎packages/aws-cdk-lib/aws-stepfunctions-tasks/README.md

+33
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,39 @@ const runTask = new tasks.EcsRunTask(this, 'RunFargate', {
701701
});
702702
```
703703

704+
#### Override CPU and Memory Parameter
705+
706+
By setting the property cpu or memoryMiB, you can override the Fargate or EC2 task instance size at runtime.
707+
708+
see: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TaskOverride.html
709+
710+
```ts
711+
const vpc = ec2.Vpc.fromLookup(this, 'Vpc', {
712+
isDefault: true,
713+
});
714+
const cluster = new ecs.Cluster(this, 'ECSCluster', { vpc });
715+
716+
const taskDefinition = new ecs.TaskDefinition(this, 'TD', {
717+
compatibility: ecs.Compatibility.FARGATE,
718+
cpu: '256',
719+
memoryMiB: '512'
720+
});
721+
722+
taskDefinition.addContainer('TheContainer', {
723+
image: ecs.ContainerImage.fromRegistry('foo/bar'),
724+
});
725+
726+
const runTask = new tasks.EcsRunTask(this, 'Run', {
727+
integrationPattern: sfn.IntegrationPattern.RUN_JOB,
728+
cluster,
729+
taskDefinition,
730+
launchTarget: new tasks.EcsFargateLaunchTarget(),
731+
cpu: '1024',
732+
memoryMiB: '1048'
733+
});
734+
```
735+
736+
704737
#### ECS enable Exec
705738

706739
By setting the property [`enableExecuteCommand`](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RunTask.html#ECS-RunTask-request-enableExecuteCommand) to `true`, you can enable the [ECS Exec feature](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-exec.html) for the task for either Fargate or EC2 launch types.

0 commit comments

Comments
 (0)
Please sign in to comment.