Skip to content

Commit 1f78bef

Browse files
authored
fix(list-instances): add instance only with the online pingstatus (#1545)
1 parent 9e90f29 commit 1f78bef

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

aws_gate/list.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ def list_instances(
8888
instance_ids = []
8989
for response in instances_ssm_response_iterator:
9090
for instance in response["InstanceInformationList"]:
91+
if instance['PingStatus'] != 'Online':
92+
continue
9193
instance_ids.append(instance["InstanceId"])
9294

9395
instance_details = get_multiple_instance_details(instance_ids=instance_ids, ec2=ec2)

0 commit comments

Comments
 (0)