Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .tools/test/stacks/config/targets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ import { parse } from "yaml";
interface AccountConfig {
account_id: string;
status: "enabled" | "disabled";
vcpus?: string;
memory?: string;
// https://docs.aws.amazon.com/batch/latest/APIReference/API_ResourceRequirement.html
vcpus?: string; // Count
memory?: string; // MiB, but limited based on vCPU count, see docs
storage?: string; // GiB, 20GiB to 200GiB
}

interface AccountConfigs {
Expand Down
10 changes: 8 additions & 2 deletions .tools/test/stacks/plugin/typescript/plugin_stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class PluginStack extends cdk.Stack {
private adminAccountId: string;
private batchMemory: string;
private batchVcpus: string;
private batchStorage: string;

constructor(scope: Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
Expand All @@ -40,8 +41,10 @@ class PluginStack extends cdk.Stack {
const sqsQueue = new sqs.Queue(this, `BatchJobQueue-${toolName}`);
if (acctConfig[`${toolName}`].status === "enabled") {
this.initSubscribeSns(sqsQueue, snsTopic);
this.batchMemory = acctConfig[`${toolName}`]?.memory ?? "16384";
this.batchVcpus = acctConfig[`${toolName}`]?.vcpus ?? "4";
// https://docs.aws.amazon.com/batch/latest/APIReference/API_ResourceRequirement.html
this.batchMemory = acctConfig[`${toolName}`]?.memory ?? "16384"; // MiB
this.batchVcpus = acctConfig[`${toolName}`]?.vcpus ?? "4"; // CPUs
this.batchStorage = acctConfig[`${toolName}`]?.storage ?? "20"; // GiB
}

const [jobDefinition, jobQueue] = this.initBatchFargate();
Expand Down Expand Up @@ -137,6 +140,9 @@ class PluginStack extends cdk.Stack {
value: this.batchMemory,
},
],
ephemeralStorage: {
sizeInGib: this.batchStorage,
},
environment: variableConfigJson,
},
platformCapabilities: ["FARGATE"],
Expand Down
Loading