Skip to content

Commit 039ee95

Browse files
authored
Merge branch 'aws:main' into imagebuilder-container-recipe
2 parents 4bf6b5c + c6881e9 commit 039ee95

File tree

10 files changed

+40
-62
lines changed

10 files changed

+40
-62
lines changed

packages/aws-cdk-lib/aws-autoscaling/lib/auto-scaling-group.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import { Construct } from 'constructs';
32
import { AutoScalingGroupRequireImdsv2Aspect } from './aspects';
43
import { CfnAutoScalingGroup, CfnAutoScalingGroupProps, CfnLaunchConfiguration } from './autoscaling.generated';
@@ -2610,7 +2609,7 @@ function synthesizeBlockDeviceMappings(construct: Construct, blockDevices: Block
26102609
const { iops, volumeType, throughput } = ebs;
26112610

26122611
if (throughput) {
2613-
const throughputRange = { Min: 125, Max: 1000 };
2612+
const throughputRange = { Min: 125, Max: 2000 };
26142613
const { Min, Max } = throughputRange;
26152614

26162615
if (volumeType != EbsDeviceVolumeType.GP3) {

packages/aws-cdk-lib/aws-autoscaling/lib/volume.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export interface EbsDeviceOptionsBase {
7171

7272
/**
7373
* The throughput that the volume supports, in MiB/s
74-
* Takes a minimum of 125 and maximum of 1000.
74+
* Takes a minimum of 125 and maximum of 2000.
7575
* @see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html
7676
* @default - 125 MiB/s. Only valid on gp3 volumes.
7777
*/

packages/aws-cdk-lib/aws-autoscaling/test/auto-scaling-group.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,7 @@ describe('auto scaling group', () => {
11701170
}).toThrow(/maxInstanceLifetime must be between 1 and 365 days \(inclusive\)/);
11711171
});
11721172

1173-
test.each([124, 1001])('throws if throughput is set less than 125 or more than 1000', (throughput) => {
1173+
test.each([124, 2001])('throws if throughput is set less than 125 or more than 2000', (throughput) => {
11741174
const stack = new cdk.Stack();
11751175
const vpc = mockVpc(stack);
11761176

@@ -1188,7 +1188,7 @@ describe('auto scaling group', () => {
11881188
}),
11891189
}],
11901190
});
1191-
}).toThrow(/throughput property takes a minimum of 125 and a maximum of 1000/);
1191+
}).toThrow(/throughput property takes a minimum of 125 and a maximum of 2000/);
11921192
});
11931193

11941194
test.each([

packages/aws-cdk-lib/aws-ec2/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1907,7 +1907,7 @@ You can configure [tag propagation on volume creation](https://docs.aws.amazon.c
19071907

19081908
#### Throughput on GP3 Volumes
19091909

1910-
You can specify the `throughput` of a GP3 volume from 125 (default) to 1000.
1910+
You can specify the `throughput` of a GP3 volume from 125 (default) to 2000.
19111911

19121912
```ts
19131913
new ec2.Volume(this, 'Volume', {

packages/aws-cdk-lib/aws-ec2/lib/private/ebs-util.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ function synthesizeBlockDeviceMappings<RT, NDT>(construct: Construct, blockDevic
4343
throw new ValidationError(`'throughput' must be an integer, got: ${throughput}.`, construct);
4444
}
4545

46-
if (throughput < 125 || throughput > 1000) {
47-
throw new ValidationError(`'throughput' must be between 125 and 1000, got ${throughput}.`, construct);
46+
if (throughput < 125 || throughput > 2000) {
47+
throw new ValidationError(`'throughput' must be between 125 and 2000, got ${throughput}.`, construct);
4848
}
4949

5050
const maximumThroughputRatio = 0.25;

packages/aws-cdk-lib/aws-ec2/lib/volume.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export interface EbsDeviceOptionsBase {
8888
/**
8989
* The throughput to provision for a `gp3` volume.
9090
*
91-
* Valid Range: Minimum value of 125. Maximum value of 1000.
91+
* Valid Range: Minimum value of 125. Maximum value of 2000.
9292
*
9393
* `gp3` volumes deliver a consistent baseline throughput performance of 125 MiB/s.
9494
* You can provision additional throughput for an additional cost at a ratio of 0.25 MiB/s per provisioned IOPS.
@@ -475,7 +475,7 @@ export interface VolumeProps {
475475

476476
/**
477477
* The throughput that the volume supports, in MiB/s
478-
* Takes a minimum of 125 and maximum of 1000.
478+
* Takes a minimum of 125 and maximum of 2000.
479479
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-volume.html#cfn-ec2-volume-throughput
480480
* @default - 125 MiB/s. Only valid on gp3 volumes.
481481
*/
@@ -756,7 +756,7 @@ export class Volume extends VolumeBase {
756756
// Enforce minimum & maximum IOPS:
757757
// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-volume.html
758758
const iopsRanges: { [key: string]: { Min: number; Max: number } } = {};
759-
iopsRanges[EbsDeviceVolumeType.GENERAL_PURPOSE_SSD_GP3] = { Min: 3000, Max: 16000 };
759+
iopsRanges[EbsDeviceVolumeType.GENERAL_PURPOSE_SSD_GP3] = { Min: 3000, Max: 80000 };
760760
iopsRanges[EbsDeviceVolumeType.PROVISIONED_IOPS_SSD] = { Min: 100, Max: 64000 };
761761
iopsRanges[EbsDeviceVolumeType.PROVISIONED_IOPS_SSD_IO2] = { Min: 100, Max: 256000 };
762762
const { Min, Max } = iopsRanges[volumeType];
@@ -818,7 +818,7 @@ export class Volume extends VolumeBase {
818818
}
819819

820820
if (props.throughput) {
821-
const throughputRange = { Min: 125, Max: 1000 };
821+
const throughputRange = { Min: 125, Max: 2000 };
822822
const { Min, Max } = throughputRange;
823823
if (props.volumeType != EbsDeviceVolumeType.GP3) {
824824
throw new ValidationError(

packages/aws-cdk-lib/aws-ec2/test/launch-template.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ describe('LaunchTemplate', () => {
408408
},
409409
});
410410
});
411-
test.each([124, 1001])('throws if throughput is set less than 125 or more than 1000', (throughput) => {
411+
test.each([124, 2001])('throws if throughput is set less than 125 or more than 2000', (throughput) => {
412412
expect(() => {
413413
new LaunchTemplate(stack, 'LaunchTemplate', {
414414
blockDevices: [{
@@ -419,7 +419,7 @@ describe('LaunchTemplate', () => {
419419
}),
420420
}],
421421
});
422-
}).toThrow(/'throughput' must be between 125 and 1000, got/);
422+
}).toThrow(/'throughput' must be between 125 and 2000, got/);
423423
});
424424
test('throws if throughput is not an integer', () => {
425425
expect(() => {

packages/aws-cdk-lib/aws-ec2/test/volume.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,7 +1297,7 @@ describe('volume', () => {
12971297

12981298
// Test: iops in range
12991299
for (const testData of [
1300-
[EbsDeviceVolumeType.GENERAL_PURPOSE_SSD_GP3, 3000, 16000],
1300+
[EbsDeviceVolumeType.GENERAL_PURPOSE_SSD_GP3, 3000, 80000],
13011301
[EbsDeviceVolumeType.PROVISIONED_IOPS_SSD, 100, 64000],
13021302
[EbsDeviceVolumeType.PROVISIONED_IOPS_SSD_IO2, 100, 256000],
13031303
]) {
@@ -1475,7 +1475,7 @@ describe('volume', () => {
14751475
}
14761476
});
14771477

1478-
test.each([124, 1001])('throws if throughput is set less than 125 or more than 1000', (throughput) => {
1478+
test.each([124, 2001])('throws if throughput is set less than 125 or more than 2000', (throughput) => {
14791479
const stack = new cdk.Stack();
14801480
expect(() => {
14811481
new Volume(stack, 'Volume', {
@@ -1484,7 +1484,7 @@ describe('volume', () => {
14841484
volumeType: EbsDeviceVolumeType.GP3,
14851485
throughput,
14861486
});
1487-
}).toThrow(/throughput property takes a minimum of 125 and a maximum of 1000/);
1487+
}).toThrow(/throughput property takes a minimum of 125 and a maximum of 2000/);
14881488
});
14891489

14901490
test.each([

packages/aws-cdk-lib/aws-ecs/lib/base/service-managed-volume.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,8 @@ export class ServiceManagedVolume extends Construct {
301301
if (throughput !== undefined) {
302302
if (volumeType !== ec2.EbsDeviceVolumeType.GP3) {
303303
throw new ValidationError(`'throughput' can only be configured with gp3 volume type, got ${volumeType}`, this);
304-
} else if (!Token.isUnresolved(throughput) && throughput > 1000) {
305-
throw new ValidationError(`'throughput' must be less than or equal to 1000 MiB/s, got ${throughput} MiB/s`, this);
304+
} else if (!Token.isUnresolved(throughput) && throughput > 2000) {
305+
throw new ValidationError(`'throughput' must be less than or equal to 2000 MiB/s, got ${throughput} MiB/s`, this);
306306
}
307307
}
308308

@@ -320,7 +320,7 @@ export class ServiceManagedVolume extends Construct {
320320

321321
// Validate IOPS range if specified.
322322
const iopsRanges: { [key: string]: { min: number; max: number } } = {};
323-
iopsRanges[ec2.EbsDeviceVolumeType.GP3]= { min: 3000, max: 16000 };
323+
iopsRanges[ec2.EbsDeviceVolumeType.GP3]= { min: 3000, max: 80000 };
324324
iopsRanges[ec2.EbsDeviceVolumeType.IO1]= { min: 100, max: 64000 };
325325
iopsRanges[ec2.EbsDeviceVolumeType.IO2]= { min: 100, max: 256000 };
326326
if (iops !== undefined && !Token.isUnresolved(iops)) {

packages/aws-cdk-lib/aws-ecs/test/fargate/fargate-service.test.ts

Lines changed: 21 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2328,48 +2328,6 @@ describe('fargate service', () => {
23282328
}).toThrow(/'throughput' can only be configured with gp3 volume type, got gp2/);
23292329
});
23302330

2331-
test('throw an error if throughput is greater tahn 1000 for volume type gp3', ()=> {
2332-
// WHEN
2333-
container.addMountPoints({
2334-
containerPath: '/var/lib',
2335-
readOnly: false,
2336-
sourceVolume: 'nginx-vol',
2337-
});
2338-
2339-
expect(() => {
2340-
service.addVolume(new ServiceManagedVolume(stack, 'EBS Volume', {
2341-
name: 'nginx-vol',
2342-
managedEBSVolume: {
2343-
fileSystemType: ecs.FileSystemType.XFS,
2344-
volumeType: ec2.EbsDeviceVolumeType.GP3,
2345-
size: cdk.Size.gibibytes(10),
2346-
throughput: 10001,
2347-
},
2348-
}));
2349-
}).toThrow("'throughput' must be less than or equal to 1000 MiB/s, got 10001 MiB/s");
2350-
});
2351-
2352-
test('throw an error if throughput is greater tahn 1000 for volume type gp3', ()=> {
2353-
// WHEN
2354-
container.addMountPoints({
2355-
containerPath: '/var/lib',
2356-
readOnly: false,
2357-
sourceVolume: 'nginx-vol',
2358-
});
2359-
2360-
expect(() => {
2361-
service.addVolume(new ServiceManagedVolume(stack, 'EBS Volume', {
2362-
name: 'nginx-vol',
2363-
managedEBSVolume: {
2364-
fileSystemType: ecs.FileSystemType.XFS,
2365-
volumeType: ec2.EbsDeviceVolumeType.GP3,
2366-
size: cdk.Size.gibibytes(10),
2367-
throughput: 10001,
2368-
},
2369-
}));
2370-
}).toThrow("'throughput' must be less than or equal to 1000 MiB/s, got 10001 MiB/s");
2371-
});
2372-
23732331
test('throw an error if iops is not supported for volume type sc1', ()=> {
23742332
// WHEN
23752333
container.addMountPoints({
@@ -2580,6 +2538,27 @@ describe('fargate service', () => {
25802538
],
25812539
});
25822540
});
2541+
2542+
test('throw an error if throughput is greater than 2000 for volume type gp3', () => {
2543+
// WHEN
2544+
container.addMountPoints({
2545+
containerPath: '/var/lib',
2546+
readOnly: false,
2547+
sourceVolume: 'nginx-vol',
2548+
});
2549+
2550+
expect(() => {
2551+
service.addVolume(new ServiceManagedVolume(stack, 'EBS Volume', {
2552+
name: 'nginx-vol',
2553+
managedEBSVolume: {
2554+
fileSystemType: ecs.FileSystemType.XFS,
2555+
volumeType: ec2.EbsDeviceVolumeType.GP3,
2556+
size: cdk.Size.gibibytes(10),
2557+
throughput: 2001,
2558+
},
2559+
}));
2560+
}).toThrow("'throughput' must be less than or equal to 2000 MiB/s, got 2001 MiB/s");
2561+
});
25832562
});
25842563

25852564
describe('When setting up a health check', () => {

0 commit comments

Comments
 (0)