From 30972d926a200dad1262ce220e97dff6a0806256 Mon Sep 17 00:00:00 2001 From: Shay Nehmad Date: Wed, 10 Apr 2019 16:25:39 +0300 Subject: [PATCH] Added region since amazon requires it --- monkey/common/cloud/aws_service.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/monkey/common/cloud/aws_service.py b/monkey/common/cloud/aws_service.py index 0f308f43f..a35bdf6b8 100644 --- a/monkey/common/cloud/aws_service.py +++ b/monkey/common/cloud/aws_service.py @@ -2,6 +2,8 @@ import boto3 import botocore from botocore.exceptions import ClientError +from common.cloud.aws_instance import AwsInstance + __author__ = 'itay.mizeretz' @@ -56,8 +58,8 @@ class AwsService(object): See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html#iam-role for details. :return: """ - # - local_ssm_client = boto3.client("ssm", region_name=AwsService.region) + # local_ssm_client = boto3.client("ssm", region_name=AwsService.region) + local_ssm_client = boto3.client("ssm", region_name=AwsInstance.get_region()) try: response = local_ssm_client.describe_instance_information()