diff --git a/awsfindingsmanagerlib/__init__.py b/awsfindingsmanagerlib/__init__.py index 1f21226..48b3252 100755 --- a/awsfindingsmanagerlib/__init__.py +++ b/awsfindingsmanagerlib/__init__.py @@ -27,7 +27,7 @@ """ from ._version import __version__ from .awsfindingsmanagerlib import FindingsManager, Rule, Finding -from .backends import Http +from .backends import Http, S3 __author__ = '''Marwin Baumann , Costas Tyfoxylos ''' __docformat__ = '''google''' @@ -46,3 +46,4 @@ assert Finding assert Http +assert S3 diff --git a/awsfindingsmanagerlib/backends.py b/awsfindingsmanagerlib/backends.py index 878e0e7..117f100 100644 --- a/awsfindingsmanagerlib/backends.py +++ b/awsfindingsmanagerlib/backends.py @@ -120,7 +120,7 @@ def __init__(self, bucket_name, file_name): @staticmethod def _get_file_contents(bucket_name, file_name): s3 = boto3.resource('s3') - return s3.Object(s3.Bucket(bucket_name), file_name).get()['Body'].read() + return s3.Object(bucket_name, file_name).get()['Body'].read() def _get_rules(self): data = yaml.safe_load(self._file_contents)