James McCool
Update score cutoff in chunk_name_matching function and add PowerShell scripts for instance management
7f942a8
# Get instance IPs from Auto Scaling Group | |
$instanceIds = aws autoscaling describe-auto-scaling-groups --auto-scaling-group-names portfolio-manager-asg --query 'AutoScalingGroups[0].Instances[?HealthStatus==`Healthy`].InstanceId' --output text | |
if (-not $instanceIds) { exit 1 } | |
$instanceIdArray = $instanceIds -split "`t" | |
$global:instances = @() | |
foreach ($id in $instanceIdArray) { | |
$ip = aws ec2 describe-instances --instance-ids $id --query 'Reservations[0].Instances[0].PublicIpAddress' --output text | |
if ($ip -and $ip -ne "None") { | |
$global:instances += $ip | |
} | |
} | |
$global:instances | |