aws.ec2.create_instance_with_user_data ​
Launch one EC2 instance with boot-time user data 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. |
region | string | No | — | AWS region override. |
ami_id | string | Yes | — | AMI ID to launch. |
instance_type | string | Yes | — | EC2 instance type. |
subnet_id | string | Yes | — | VPC subnet ID to launch into. |
security_group_ids | list | Yes | — | Security group IDs for the instance. |
user_data | string | Yes | — | Boot-time user data script or cloud-init payload. |
user_data_base64_encoded | boolean | No | — | True when user_data is already base64 encoded. |
key_name | string | No | — | EC2 key pair name for SSH access. |
iam_instance_profile | json | No | — | Provider-native IAM instance profile name or ARN object. |
associate_public_ip_address | boolean | No | — | Whether to associate a public IPv4 address. |
private_ip_address | string | No | — | Optional primary private IPv4 address. |
block_device_mappings | list | No | — | Provider-native block device mappings. |
metadata_options | json | No | — | Provider-native IMDS metadata options. |
instance_initiated_shutdown_behavior | string | No | — | stop or terminate. |
tags | json | No | — | Tags to apply to the instance as a key/value map (or a native TagSpecifications list). |
client_token | string | No | — | Idempotency token for RunInstances. |
wait_until_running | boolean | No | — | Wait for running state before completing. |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | No | — | CloudConnection UUID echoed from input. |
region | string | No | — | AWS region used. |
instance_id | string | No | — | EC2 instance ID. |
state | string | No | — | EC2 instance state. |
private_ip | string | No | — | Private IPv4 address assigned to the instance. |
public_ip | string | No | — | Public IPv4 address assigned to the instance. |
image_id | string | No | — | AMI ID used. |
instance_type | string | No | — | EC2 instance type used. |
subnet_id | string | No | — | Subnet ID used. |
vpc_id | string | No | — | VPC ID reported by EC2. |
launch_time | string | No | — | Provider launch timestamp as ISO string when available. |
instance | json | No | — | Sanitized provider instance object without user_data. |
compensation_workflow | string | No | — | Suggested compensation workflow aws.ec2.terminate_instance. |
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.create_instance_with_user_data",
"initial_data": {
"connection_uuid": "value",
"ami_id": "value",
"instance_type": "value",
"subnet_id": "value"
}
}