in services/read-gauge.py [0:0]
def get_image(url,bucket_name,image_key):
# download the image, convert it to a NumPy array, and then read
# it into OpenCV format
s3 = boto3.client("s3", region_name=os.environ['AWS_REGION'])
# s3 = boto3.client("s3", region_name="us-east-1")
file_obj = s3.get_object(Bucket=bucket_name, Key=image_key)
# reading the file content in bytes
file_content = file_obj["Body"].read()
# creating 1D array from bytes data range between[0,255]
np_array = np.frombuffer(file_content, np.uint8)
# decoding array
image = cv2.imdecode(np_array, cv2.IMREAD_COLOR)
return image