diff --git a/tap_dynamodb/aws_authenticators.py b/tap_dynamodb/aws_authenticators.py index 74b33af..6b46f18 100644 --- a/tap_dynamodb/aws_authenticators.py +++ b/tap_dynamodb/aws_authenticators.py @@ -109,4 +109,5 @@ def _assume_role(self, session, role_arn): aws_access_key_id=response["Credentials"]["AccessKeyId"], aws_secret_access_key=response["Credentials"]["SecretAccessKey"], aws_session_token=response["Credentials"]["SessionToken"], + region_name=self.aws_default_region, ) diff --git a/tap_dynamodb/dynamo.py b/tap_dynamodb/dynamo.py index 1e86112..5a530da 100644 --- a/tap_dynamodb/dynamo.py +++ b/tap_dynamodb/dynamo.py @@ -54,7 +54,8 @@ def get_items_iter( done = start_key is None except ClientError as err: self.logger.error( - "Couldn't scan for movies. Here's why: %s: %s", + "Couldn't scan for %s. Here's why: %s: %s", + table_name, err.response["Error"]["Code"], err.response["Error"]["Message"], ) diff --git a/tap_dynamodb/tap.py b/tap_dynamodb/tap.py index dd8f58a..b48aee6 100644 --- a/tap_dynamodb/tap.py +++ b/tap_dynamodb/tap.py @@ -83,7 +83,7 @@ def discover_streams(self) -> list[streams.TableStream]: """ obj = DynamoDB(self.config) discovered_streams = [] - for table_name in obj.list_tables(self.config.get("tables")): + for table_name in self.config.get("tables") or obj.list_tables(): try: stream = streams.TableStream( tap=self,