create_session
async
¶
create_session(
id: NameString,
role: OrchestrationRoleArn,
command: SessionCommand,
*,
config_overrides: Optional[AsyncGlueClientConfig] = None,
description: Optional[DescriptionString] = None,
timeout: Optional[Timeout] = None,
idle_timeout: Optional[Timeout] = None,
default_arguments: Optional[OrchestrationArgumentsMap] = None,
connections: Optional[ConnectionsList] = None,
max_capacity: Optional[NullableDouble] = None,
number_of_workers: Optional[NullableInteger] = None,
worker_type: Optional[WorkerType] = None,
security_configuration: Optional[NameString] = None,
glue_version: Optional[GlueVersionString] = None,
tags: Optional[TagsMap] = None,
request_origin: Optional[OrchestrationNameString] = None,
session_type: Optional[SessionType] = None,
) -> CreateSessionResponse
Creates a new session.
Parameters:
-
id(NameString) –The ID of the session request.
-
description(Optional[DescriptionString], default:None) –The description of the session.
-
role(OrchestrationRoleArn) –The IAM Role ARN
-
command(SessionCommand) –The
SessionCommandthat runs the job. -
timeout(Optional[Timeout], default:None) –The number of minutes before session times out. Default for Spark ETL jobs is 48 hours (2880 minutes). Consult the documentation for other job types.
-
idle_timeout(Optional[Timeout], default:None) –The number of minutes when idle before session times out. Default for Spark ETL jobs is value of Timeout. Consult the documentation for other job types.
-
default_arguments(Optional[OrchestrationArgumentsMap], default:None) –A map array of key-value pairs. Max is 75 pairs.
-
connections(Optional[ConnectionsList], default:None) –The number of connections to use for the session.
-
max_capacity(Optional[NullableDouble], default:None) –The number of Glue data processing units (DPUs) that can be allocated when the job runs. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB memory.
-
number_of_workers(Optional[NullableInteger], default:None) –The number of workers of a defined
WorkerTypeto use for the session. -
worker_type(Optional[WorkerType], default:None) –The type of predefined worker that is allocated when a job runs. Accepts a value of G.1X, G.2X, G.4X, G.8X, G.12X, G.16X, R.1X, R.2X, R.4X, or R.8X for Spark jobs. Accepts the value Z.2X for Ray notebooks.
-
For the
G.1Xworker type, each worker maps to 1 DPU (4 vCPUs, 16 GB of memory) with 94GB disk, and provides 1 executor per worker. We recommend this worker type for workloads such as data transforms, joins, and queries, to offers a scalable and cost effective way to run most jobs. -
For the
G.2Xworker type, each worker maps to 2 DPU (8 vCPUs, 32 GB of memory) with 138GB disk, and provides 1 executor per worker. We recommend this worker type for workloads such as data transforms, joins, and queries, to offers a scalable and cost effective way to run most jobs. -
For the
G.4Xworker type, each worker maps to 4 DPU (16 vCPUs, 64 GB of memory) with 256GB disk, and provides 1 executor per worker. We recommend this worker type for jobs whose workloads contain your most demanding transforms, aggregations, joins, and queries. This worker type is available only for Glue version 3.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see Configuring job properties for Spark jobs in the developer guide. -
For the
G.8Xworker type, each worker maps to 8 DPU (32 vCPUs, 128 GB of memory) with 512GB disk, and provides 1 executor per worker. We recommend this worker type for jobs whose workloads contain your most demanding transforms, aggregations, joins, and queries. This worker type is available only for Glue version 3.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see Configuring job properties for Spark jobs in the developer guide. -
For the
G.12Xworker type, each worker maps to 12 DPU (48 vCPUs, 192 GB of memory) with 768GB disk, and provides 1 executor per worker. We recommend this worker type for jobs with very large workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see Configuring job properties for Spark jobs in the developer guide. -
For the
G.16Xworker type, each worker maps to 16 DPU (64 vCPUs, 256 GB of memory) with 1024GB disk, and provides 1 executor per worker. We recommend this worker type for jobs with very large workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see Configuring job properties for Spark jobs in the developer guide. -
For the
R.1Xworker type, each worker maps to 1 M-DPU (4 vCPUs, 32 GB of memory) with 94GB disk, and provides 1 executor per worker. We recommend this worker type for memory-intensive workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see Configuring job properties for Spark jobs in the developer guide. -
For the
R.2Xworker type, each worker maps to 2 M-DPU (8 vCPUs, 64 GB of memory) with 138GB disk, and provides 1 executor per worker. We recommend this worker type for memory-intensive workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see Configuring job properties for Spark jobs in the developer guide. -
For the
R.4Xworker type, each worker maps to 4 M-DPU (16 vCPUs, 128 GB of memory) with 256GB disk, and provides 1 executor per worker. We recommend this worker type for memory-intensive workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see Configuring job properties for Spark jobs in the developer guide. -
For the
R.8Xworker type, each worker maps to 8 M-DPU (32 vCPUs, 256 GB of memory) with 512GB disk, and provides 1 executor per worker. We recommend this worker type for memory-intensive workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see Configuring job properties for Spark jobs in the developer guide. -
For the
Z.2Xworker type, each worker maps to 2 M-DPU (8vCPUs, 64 GB of memory) with 128 GB disk, and provides up to 8 Ray workers based on the autoscaler.
-
-
security_configuration(Optional[NameString], default:None) –The name of the SecurityConfiguration structure to be used with the session
-
glue_version(Optional[GlueVersionString], default:None) –The Glue version determines the versions of Apache Spark and Python that Glue supports. The GlueVersion must be greater than 2.0.
-
tags(Optional[TagsMap], default:None) –The map of key value pairs (tags) belonging to the session.
-
request_origin(Optional[OrchestrationNameString], default:None) –The origin of the request.
-
session_type(Optional[SessionType], default:None) –The type of session to create.
Raises:
-
AccessDeniedException–Access to a resource was denied.
-
AlreadyExistsException–A resource to be created or added already exists.
-
IdempotentParameterMismatchException–The same unique identifier was associated with two different records.
-
InternalServiceException–An internal service error occurred.
-
InvalidInputException–The input provided was not valid.
-
OperationNotSupportedException–The operation is not available in the region.
-
OperationTimeoutException–The operation timed out.
-
ResourceNumberLimitExceededException–A resource numerical limit was exceeded.
-
ValidationException–A value could not be validated.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_glue/_services/async_glue.py
4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 | |