Application
Source:
src/AWS/EMRServerless/Application.ts
An Amazon EMR Serverless application — a serverless Spark or Hive
environment that automatically provisions and scales workers per job,
with no cluster to manage. An application in the CREATED or STOPPED
state costs nothing; billing only occurs for workers while the application
is started (including any pre-initialized initialCapacity).
Creating Applications
Section titled “Creating Applications”Spark Application
import * as AWS from "alchemy/AWS";
const app = yield* AWS.EMRServerless.Application("Spark", { releaseLabel: "emr-7.9.0",});// app.applicationId is passed to StartJobRunHive Application with Auto-Stop Tuning
const app = yield* AWS.EMRServerless.Application("Hive", { type: "HIVE", releaseLabel: "emr-7.9.0", autoStartConfiguration: { enabled: true }, autoStopConfiguration: { enabled: true, idleTimeout: "5 minutes" },});Capacity
Section titled “Capacity”const app = yield* AWS.EMRServerless.Application("Warm", { releaseLabel: "emr-7.9.0", initialCapacity: { Driver: { workerCount: 1, workerConfiguration: { cpu: "2 vCPU", memory: "4 GB" }, }, Executor: { workerCount: 2, workerConfiguration: { cpu: "2 vCPU", memory: "4 GB" }, }, }, maximumCapacity: { cpu: "16 vCPU", memory: "64 GB" },});Networking
Section titled “Networking”const app = yield* AWS.EMRServerless.Application("InVpc", { releaseLabel: "emr-7.9.0", networkConfiguration: { subnetIds: [subnet.subnetId], securityGroupIds: [securityGroup.securityGroupId], },});