ComputeEnvironment
Source:
src/AWS/Batch/ComputeEnvironment.ts
An AWS Batch managed compute environment backed by Fargate (or Fargate Spot) capacity. Fargate compute environments provision in seconds and require no instance management.
Creating Compute Environments
Section titled “Creating Compute Environments”Default Fargate Compute Environment
// Uses the default VPC's subnets and default security group.const ce = yield* Batch.ComputeEnvironment("JobsCE", {});Unmanaged Compute Environment
const ce = yield* Batch.ComputeEnvironment("ExternalCapacity", { managementType: "UNMANAGED", unmanagedvCpus: 8,});Fargate Spot with explicit networking
const ce = yield* Batch.ComputeEnvironment("SpotCE", { type: "FARGATE_SPOT", maxvCpus: 16, subnets: [subnetA.subnetId, subnetB.subnetId], securityGroupIds: [sg.groupId],});Composing the Batch chain
Section titled “Composing the Batch chain”const ce = yield* Batch.ComputeEnvironment("JobsCE", {});const queue = yield* Batch.JobQueue("JobsQueue", { computeEnvironments: [ce.computeEnvironmentArn],});