pub async fn launch_instances(
client: &Ec2Client,
ami_id: &str,
instance_type: InstanceType,
storage_size: i32,
storage_class: VolumeType,
key_name: &str,
subnets: &[(String, String)],
az_support: &BTreeMap<String, BTreeSet<String>>,
start_idx: usize,
sg_id: &str,
count: i32,
name: &str,
tag: &str,
) -> Result<(Vec<String>, String), Error>Expand description
Launches EC2 instances with specified configurations.
Filters subnets to those supporting the instance type, distributes across them starting at
start_idx, and falls back to other subnets on capacity errors.