@@ -24,6 +24,7 @@ class PluginStack extends cdk.Stack {
2424 private adminAccountId : string ;
2525 private batchMemory : string ;
2626 private batchVcpus : string ;
27+ private batchStorage : string ;
2728
2829 constructor ( scope : Construct , id : string , props ?: cdk . StackProps ) {
2930 super ( scope , id , props ) ;
@@ -40,8 +41,10 @@ class PluginStack extends cdk.Stack {
4041 const sqsQueue = new sqs . Queue ( this , `BatchJobQueue-${ toolName } ` ) ;
4142 if ( acctConfig [ `${ toolName } ` ] . status === "enabled" ) {
4243 this . initSubscribeSns ( sqsQueue , snsTopic ) ;
43- this . batchMemory = acctConfig [ `${ toolName } ` ] ?. memory ?? "16384" ;
44- this . batchVcpus = acctConfig [ `${ toolName } ` ] ?. vcpus ?? "4" ;
44+ // https://docs.aws.amazon.com/batch/latest/APIReference/API_ResourceRequirement.html
45+ this . batchMemory = acctConfig [ `${ toolName } ` ] ?. memory ?? "16384" ; // MiB
46+ this . batchVcpus = acctConfig [ `${ toolName } ` ] ?. vcpus ?? "4" ; // CPUs
47+ this . batchStorage = acctConfig [ `${ toolName } ` ] ?. storage ?? "20" ; // GiB
4548 }
4649
4750 const [ jobDefinition , jobQueue ] = this . initBatchFargate ( ) ;
@@ -137,6 +140,9 @@ class PluginStack extends cdk.Stack {
137140 value : this . batchMemory ,
138141 } ,
139142 ] ,
143+ ephemeralStorage : {
144+ sizeInGib : this . batchStorage ,
145+ } ,
140146 environment : variableConfigJson ,
141147 } ,
142148 platformCapabilities : [ "FARGATE" ] ,
0 commit comments