aws.ec2.run_instances ​
Launch one or more EC2 instances using a CloudConnection UUID.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | Base-aws |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | Yes | — | CloudConnection UUID for the target AWS account. |
workflow_run_id | string | No | — | Engine DAG run ID stamped onto child steps. |
region | string | No | — | AWS region override. |
image_id | string | Yes | — | AMI ID to launch. |
instance_type | string | Yes | — | EC2 instance type. |
subnet_id | string | No | — | VPC subnet ID to launch into. |
security_group_ids | list | No | — | Security group IDs for the instances. |
key_name | string | No | — | EC2 key pair name for SSH access. |
min_count | integer | No | — | Minimum number of instances to launch. |
max_count | integer | No | — | Maximum number of instances to launch. |
iam_instance_profile | json | No | — | Provider-native IAM instance profile name or ARN object. |
user_data | string | No | — | Boot-time user data script or cloud-init payload. |
block_device_mappings | list | No | — | Provider-native block device mappings. |
metadata_options | json | No | — | Provider-native IMDS metadata options. |
tags | json | No | — | Provider-native TagSpecifications for RunInstances, e.g. [{"ResourceType": "instance", "Tags": [{"Key": "Name", "Value": "web"}]}]. A plain {"Key": "Value"} mapping is rejected by boto3; use aws.ec2.create_instance for key/value tag input. |
client_token | string | No | — | Idempotency token for RunInstances. Use this whenever callers may retry after a partial launch. |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | No | — | CloudConnection UUID echoed from input. |
region | string | No | — | AWS region used. |
instance_ids | list | No | — | EC2 instance IDs launched. |
instances | json | No | — | Sanitized provider instance objects without user_data. |
failure_reason | string | No | — | Human-readable failure reason. |
failed_step | string | No | — | Failed logical step. |
failed_layer | json | No | — | Failed DAG layer if engine supplies one. |
failed_at_state | string | No | — | State where failure occurred. |
error | string | No | — | Error message. |
error_type | string | No | — | Error class. |
failed_at | string | No | — | ISO failure timestamp. |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "aws.ec2.run_instances",
"initial_data": {
"connection_uuid": "value",
"image_id": "value",
"instance_type": "value"
}
}