From 6c80335509c5f56bf13fc1eec1d01c2d4f896866 Mon Sep 17 00:00:00 2001 From: Shreya Date: Thu, 6 May 2021 17:25:24 +0530 Subject: [PATCH] Remove unused `get_regions`, `get_session`, and `test_client` in `common/cloud/aws/aws_service.py` --- monkey/common/cloud/aws/aws_service.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/monkey/common/cloud/aws/aws_service.py b/monkey/common/cloud/aws/aws_service.py index dd4b1cb24..2764c8238 100644 --- a/monkey/common/cloud/aws/aws_service.py +++ b/monkey/common/cloud/aws/aws_service.py @@ -2,7 +2,6 @@ import logging import boto3 import botocore -from botocore.exceptions import ClientError from common.cloud.aws.aws_instance import AwsInstance @@ -53,22 +52,6 @@ class AwsService(object): client_type, region_name=region if region is not None else AwsService.region ) - @staticmethod - def get_session(): - return boto3.session.Session() - - @staticmethod - def get_regions(): - return AwsService.get_session().get_available_regions("ssm") - - @staticmethod - def test_client(): - try: - AwsService.get_client("ssm").describe_instance_information() - return True - except ClientError: - return False - @staticmethod def get_instances(): """