Batch Create¶
Handler for creating and preparing AWS Batch job definitions.
AWS Batch job definition creation handlers.
Provides Lambda handlers for creating and registering AWS Batch job definitions.
CreateDefinitionAndPrepareArgsHandler
dataclass
¶
CreateDefinitionAndPrepareArgsHandler()
Bases: LambdaHandler[CreateDefinitionAndPrepareArgsRequest, CreateDefinitionAndPrepareArgsResponse]
Handler for creating AWS Batch job definitions.
Registers a job definition with AWS Batch and prepares the arguments needed for job submission.
handle ¶
handle(request)
Create a job definition and prepare submission arguments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
CreateDefinitionAndPrepareArgsRequest
|
Request containing job definition configuration. |
required |
Returns:
| Type | Description |
|---|---|
CreateDefinitionAndPrepareArgsResponse
|
Response containing the job definition ARN and submission args. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If job_queue_name is not provided. |
Source code in src/aibs_informatics_aws_lambda/handlers/batch/create.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | |
DockerImageUri ¶
Bases: ValidatedStr
Validated string representing a Docker image URI.
Validates and parses Docker image URIs from various registries including Docker Hub, ECR, and GitHub Container Registry.
Note
This class is intended to be moved to aibs-informatics-core
once it is considered stable; that refactor is tracked in the
team's external issue tracker.
Attributes:
| Name | Type | Description |
|---|---|---|
regex_pattern |
Pattern
|
Pattern for validating Docker image URIs. |
registry
property
¶
registry
Get the registry portion of the image URI.
Returns:
| Type | Description |
|---|---|
str
|
The registry hostname. |
repo_name
property
¶
repo_name
Get the repository name.
Returns:
| Type | Description |
|---|---|
str
|
The repository name. |
sha256
property
¶
sha256
Get the SHA256 digest if specified.
Returns:
| Type | Description |
|---|---|
Optional[str]
|
The SHA256 digest, or None if using a tag. |
tag
property
¶
tag
Get the image tag if specified.
Returns:
| Type | Description |
|---|---|
Optional[str]
|
The tag, or None if using a SHA digest. |