Skip to content

Commit 83197f8

Browse files
committed
feat(amplify): support build compute type
1 parent 722520a commit 83197f8

File tree

1 file changed

+28
-0
lines changed
  • packages/@aws-cdk/aws-amplify-alpha/lib

1 file changed

+28
-0
lines changed

packages/@aws-cdk/aws-amplify-alpha/lib/app.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,13 @@ export interface AppProps {
184184
* @default undefined - a new role is created when `platform` is `Platform.WEB_COMPUTE` or `Platform.WEB_DYNAMIC`, otherwise no compute role
185185
*/
186186
readonly computeRole?: iam.IRole;
187+
188+
/**
189+
* Specifies the size of the build instance.
190+
*
191+
* @default undefined - Amplify default setting is `BuildComputeType.STANDARD_8GB`.
192+
*/
193+
readonly buildComputeType?: BuildComputeType;
187194
}
188195

189196
/**
@@ -311,6 +318,7 @@ export class App extends Resource implements IApp, iam.IGrantable {
311318
repository: sourceCodeProviderOptions?.repository,
312319
customHeaders: props.customResponseHeaders ? renderCustomResponseHeaders(props.customResponseHeaders, this) : undefined,
313320
platform: appPlatform,
321+
jobConfig: props.buildComputeType ? { buildComputeType: props.buildComputeType } : undefined,
314322
});
315323

316324
this.appId = app.attrAppId;
@@ -648,3 +656,23 @@ export enum CacheConfigType {
648656
*/
649657
AMPLIFY_MANAGED_NO_COOKIES = 'AMPLIFY_MANAGED_NO_COOKIES',
650658
}
659+
660+
/**
661+
* Specifies the size of the build instance.
662+
*/
663+
export enum BuildComputeType {
664+
/**
665+
* vCPUs: 4, Memory: 8 GiB, Disk space: 128 GB
666+
*/
667+
STANDARD_8GB = 'STANDARD_8GB',
668+
669+
/**
670+
* vCPUs: 8, Memory: 16 GiB, Disk space: 128 GB
671+
*/
672+
LARGE_16GB = 'LARGE_16GB',
673+
674+
/**
675+
* vCPUs: 36, Memory: 72 GiB, Disk space: 128 GB
676+
*/
677+
XLARGE_72GB = 'XLARGE_72GB',
678+
}

0 commit comments

Comments
 (0)