cfn/aqua-rt-stps.yml [840:847]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
              def get_instance_state(ec2_client, instance_id):
                  response = ec2_client.describe_instance_status(InstanceIds=[instance_id], IncludeAllInstances=True)
                  instance_statuses = response.get("InstanceStatuses", {})
                  assert len(instance_statuses) == 1

                  instance_state = instance_statuses[0].get("InstanceState", {}).get("Name")
                  logger.info(f"Instance {instance_id} state is {instance_state}")
                  return instance_state
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



cfn/ipopp-instance.yml [252:259]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
              def get_instance_state(ec2_client, instance_id):
                  response = ec2_client.describe_instance_status(InstanceIds=[instance_id], IncludeAllInstances=True)
                  instance_statuses = response.get("InstanceStatuses", {})
                  assert len(instance_statuses) == 1

                  instance_state = instance_statuses[0].get("InstanceState", {}).get("Name")
                  logger.info(f"Instance {instance_id} state is {instance_state}")
                  return instance_state
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



