interface WorkerConfiguration
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Glue.Alpha.WorkerConfiguration |
Go | github.com/aws/aws-cdk-go/awscdkgluealpha/v2#WorkerConfiguration |
Java | software.amazon.awscdk.services.glue.alpha.WorkerConfiguration |
Python | aws_cdk.aws_glue_alpha.WorkerConfiguration |
TypeScript (source) | @aws-cdk/aws-glue-alpha ยป WorkerConfiguration |
The worker configuration for a Spark job.
The worker type and the number of workers are set together: providing this configuration requires both values, so a Spark job can never be given one without the other.
Example
import * as cdk from 'aws-cdk-lib';
import * as iam from 'aws-cdk-lib/aws-iam';
declare const stack: cdk.Stack;
declare const role: iam.IRole;
declare const script: glue.Code;
new glue.PySparkEtlJob(stack, 'PySparkETLJob', {
jobName: 'PySparkETLJobCustomName',
description: 'This is a description',
role,
script,
glueVersion: glue.GlueVersion.V5_1,
continuousLogging: { enabled: false },
workerConfiguration: {
workerType: glue.WorkerType.G_2X,
numberOfWorkers: 2,
},
maxConcurrentRuns: 100,
timeout: cdk.Duration.hours(2),
connections: [glue.Connection.fromConnectionName(stack, 'Connection', 'connectionName')],
securityConfiguration: glue.SecurityConfiguration.fromSecurityConfigurationName(stack, 'SecurityConfig', 'securityConfigName'),
tags: {
FirstTagName: 'FirstTagValue',
SecondTagName: 'SecondTagValue',
XTagName: 'XTagValue',
},
maxRetries: 2,
});
Properties
| Name | Type | Description |
|---|---|---|
| number | number | The number of workers of the given workerType that are allocated when a job runs. |
| worker | Worker | The type of predefined worker that is allocated when a job runs. |
numberOfWorkers
Type:
number
The number of workers of the given workerType that are allocated when a job runs.
workerType
Type:
Worker
The type of predefined worker that is allocated when a job runs.
Enum options: Standard, G_1X, G_2X, G_025X, G_4X, G_8X, Z_2X

.NET
Go
Java
Python
TypeScript (