PythonShellJobProps Struct
Properties for creating a Python Shell job.
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.PythonShellJob(stack, 'ImportedJob', { role, script });
Properties
connectionsIConnection[]connectionstyping.List[IConnection]connectionsList<IConnection>ConnectionsIConnection[]Connections*[]IConnection= [] - no connections are added to…#default
Default: [] - no connections are added to the job
continuousLoggingContinuousLoggingPropscontinuous_loggingContinuousLoggingPropscontinuousLoggingContinuousLoggingPropsContinuousLoggingContinuousLoggingPropsContinuousLoggingContinuousLoggingProps= continuous logging is enabled.#defaultArguments{ [key: string]: string }default_argumentstyping.Mapping[str, str]defaultArgumentsMap<String, String>DefaultArgumentsIDictionary<string, string>DefaultArguments*map[string]*string= 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.
extraPythonFilesCode[]extra_python_filestyping.List[Code]extraPythonFilesList<Code>ExtraPythonFilesCode[]ExtraPythonFiles*[]Code= no extra Python files#Only individual files are supported, directories are not supported. Equivalent to the --extra-py-files job argument.
glueVersionGlueVersionglue_versionGlueVersionglueVersionGlueVersionGlueVersionGlueVersionGlueVersionGlueVersion= determined by the job type: 4.0 …#default
Default: determined by the job type: 4.0 for ETL and Streaming, 5.0 for Flex, 3.0 for Python Shell
jobNamestringjob_namestrjobNameStringJobNamestringJobName*string= a name is automatically generate…#default
Default: a name is automatically generated
jobRunQueuingEnabledbooleanjob_run_queuing_enabledbooljobRunQueuingEnabledBooleanJobRunQueuingEnabledboolJobRunQueuingEnabled*bool= false#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.
librarySetLibrarySetlibrary_setLibrarySetlibrarySetLibrarySetLibrarySetLibrarySetLibrarySetLibrarySet= LibrarySet.ANALYTICS when runnin…#Only applies to jobs running Python 3.9. Set to LibrarySet.NONE when your libraries are custom or conflict with the pre-installed ones.
default
Default: LibrarySet.ANALYTICS when running Python 3.9, otherwise no library set is configured
maxCapacityMaxCapacitymax_capacityMaxCapacitymaxCapacityMaxCapacityMaxCapacityMaxCapacityMaxCapacityMaxCapacity= 0.0625#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.
pythonVersionPythonVersionpython_versionPythonVersionpythonVersionPythonVersionPythonVersionPythonVersionPythonVersionPythonVersion= PythonVersion.THREE_NINE#Python shell jobs only support PythonVersion.THREE_NINE. The older PythonVersion.TWO (Python 2.7) and PythonVersion.THREE (Python 3.6) runtimes have been retired by AWS Glue and are no longer available for Python shell jobs.
Can be uploaded from the local directory structure using fromAsset or referenced via S3 location using fromBucket
securityConfigurationISecurityConfigurationsecurity_configurationISecurityConfigurationsecurityConfigurationISecurityConfigurationSecurityConfigurationISecurityConfigurationSecurityConfigurationISecurityConfiguration= no security configuration.#tags{ [key: string]: string }tagstyping.Mapping[str, str]tagsMap<String, String>TagsIDictionary<string, string>Tags*map[string]*string= {} - no tags#timeoutDurationtimeoutDurationtimeoutDurationTimeoutDurationTimeoutDuration= no value set; Glue applies its s…#Specified in minutes.
default
Default: no value set; Glue applies its service default (2880 minutes for non-streaming jobs)