From acabc835d458e55ca10ec95b7cc6f2f468996368 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 9 May 2022 09:22:33 -0400 Subject: [PATCH] Island: Add run_agent_on_managed_instances() to AWSService --- monkey/monkey_island/cc/services/aws_service.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/monkey/monkey_island/cc/services/aws_service.py b/monkey/monkey_island/cc/services/aws_service.py index fe7f51487..1c15bb6d5 100644 --- a/monkey/monkey_island/cc/services/aws_service.py +++ b/monkey/monkey_island/cc/services/aws_service.py @@ -1,5 +1,5 @@ import logging -from typing import Optional +from typing import Iterable, Optional import boto3 import botocore @@ -26,6 +26,13 @@ class AWSService: def island_aws_instance(self) -> AWSInstance: return self._aws_instance + def run_agent_on_managed_instances(self, instance_ids: Iterable[str]): + for id_ in instance_ids: + self._run_agent_on_managed_instance(id_) + + def _run_agent_on_managed_instance(self, instance_id: str): + pass + def filter_instance_data_from_aws_response(response): return [