RayJobProps Struct
Properties for creating a Ray Glue job.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as glue_alpha from '@aws-cdk/aws-glue-alpha';
import * as cdk from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';
import { aws_logs as logs } from 'aws-cdk-lib';
declare const code: glue_alpha.Code;
declare const connection: glue_alpha.Connection;
declare const logGroup: logs.LogGroup;
declare const role: iam.Role;
declare const securityConfiguration: glue_alpha.SecurityConfiguration;
const rayJobProps: glue_alpha.RayJobProps = {
role: role,
script: code,
// the properties below are optional
connections: [connection],
continuousLogging: {
enabled: false,
// the properties below are optional
conversionPattern: 'conversionPattern',
logGroup: logGroup,
logStreamPrefix: 'logStreamPrefix',
quiet: false,
},
defaultArguments: {
defaultArgumentsKey: 'defaultArguments',
},
description: 'description',
enableMetrics: false,
enableObservabilityMetrics: false,
glueVersion: glue_alpha.GlueVersion.V0_9,
jobName: 'jobName',
jobRunQueuingEnabled: false,
maxConcurrentRuns: 123,
maxRetries: 123,
numberOfWorkers: 123,
runtime: glue_alpha.Runtime.RAY_TWO_FOUR,
securityConfiguration: securityConfiguration,
tags: {
tagsKey: 'tags',
},
timeout: cdk.Duration.minutes(30),
};
Properties
connectionsIConnection[]connectionstyping.List[IConnection]connectionsList<IConnection>ConnectionsIConnection[]Connections*[]IConnection#Default: [] - no connections are added to the job
continuousLoggingContinuousLoggingPropscontinuous_loggingContinuousLoggingPropscontinuousLoggingContinuousLoggingPropsContinuousLoggingContinuousLoggingPropsContinuousLoggingContinuousLoggingProps#Default: continuous logging is enabled.
defaultArguments{ [key: string]: string }default_argumentstyping.Mapping[str, str]defaultArgumentsMap<String, String>DefaultArgumentsIDictionary<string, string>DefaultArguments*map[string]*string#Default: no arguments
notes
This map is the escape hatch for Glue job arguments that this construct does not model. It MUST NOT be used to set arguments that already have a dedicated prop — configure those through the corresponding prop instead (continuousLogging, enableMetrics, enableObservabilityMetrics, sparkUI, className, extraJars, extraJarsFirst, extraPythonFiles, extraFiles). Passing a construct-managed argument (e.g. --enable-continuous-cloudwatch-log, --enable-metrics, --enable-spark-ui, --job-language) or a Glue-reserved argument (--debug, --mode, --JOB_NAME, --endpoint) here throws at synthesis time, so there is exactly one way to express each intent.
Also note that these are emitted verbatim into the CloudFormation template, so avoid placing secrets here in plaintext. Pass secrets to the job at runtime through AWS Secrets Manager instead. A synthesis-time warning is emitted when an argument key looks like a credential and holds a plaintext literal.
Default: no value
enableMetricsbooleanenable_metricsboolenableMetricsBooleanEnableMetricsboolEnableMetrics*bool= true#When enabled, adds '--enable-metrics' to job arguments.
enableObservabilityMetricsbooleanenable_observability_metricsboolenableObservabilityMetricsBooleanEnableObservabilityMetricsboolEnableObservabilityMetrics*bool= true#When enabled, adds '--enable-observability-metrics': 'true' to job arguments.
glueVersionGlueVersionglue_versionGlueVersionglueVersionGlueVersionGlueVersionGlueVersionGlueVersionGlueVersion#Default: determined by the job type: 4.0 for ETL and Streaming, 5.0 for Flex, 3.0 for Python Shell
Default: a name is automatically generated
jobRunQueuingEnabledbooleanjob_run_queuing_enabledbooljobRunQueuingEnabledBooleanJobRunQueuingEnabledboolJobRunQueuingEnabled*bool#Default: no job run queuing
notes
A value of true means job run queuing is enabled for the job runs. If false or not populated, the job runs will not be considered for queueing. If this field does not match the value set in the job run, then the value from the job run field will be used. This property must be set to false for flex jobs. If this property is enabled, maxRetries must be set to zero.
maxConcurrentRunsnumbermax_concurrent_runsint | floatmaxConcurrentRunsNumberMaxConcurrentRunsdoubleMaxConcurrentRuns*float64= 1#An error is returned when this threshold is reached. The maximum value you can specify is controlled by a service limit.
numberOfWorkersnumbernumber_of_workersint | floatnumberOfWorkersNumberNumberOfWorkersdoubleNumberOfWorkers*float64= 3#Ray jobs only support the Z.2X worker type, so the worker type is not configurable.
Default: Runtime version will default to Ray2.4
Can be uploaded from the local directory structure using fromAsset or referenced via S3 location using fromBucket
securityConfigurationISecurityConfigurationsecurity_configurationISecurityConfigurationsecurityConfigurationISecurityConfigurationSecurityConfigurationISecurityConfigurationSecurityConfigurationISecurityConfiguration#Default: no security configuration.
tags{ [key: string]: string }tagstyping.Mapping[str, str]tagsMap<String, String>TagsIDictionary<string, string>Tags*map[string]*string#Default: {} - no tags