This repository was archived by the owner on Mar 23, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
localstack-core/localstack/services Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -274,7 +274,11 @@ def forward_to_kinesis_stream(
274274 table_arn = arns .dynamodb_table_arn (table_name , account_id , region_name )
275275 records = table_records ["records" ]
276276 table_def = store .table_definitions .get (table_name ) or {}
277- destinations = store .streaming_destinations .get (table_name ) or []
277+ destinations = store .streaming_destinations .get (table_name )
278+ if not destinations :
279+ LOG .debug ("Table %s has no Kinesis streaming destinations enabled" , table_name )
280+ continue
281+
278282 stream_arn = destinations [- 1 ]["StreamArn" ]
279283 for record in records :
280284 kinesis_record = dict (
Original file line number Diff line number Diff line change 1616from localstack .services .dynamodb .v2 .provider import DynamoDBProvider
1717from localstack .services .dynamodbstreams .models import (
1818 DynamoDbStreamsStore ,
19- Stream ,
19+ StreamWrapper ,
2020 dynamodbstreams_stores ,
2121)
2222from localstack .utils .aws import arns , resources
@@ -89,7 +89,7 @@ def add_dynamodb_stream(
8989 Shards = [],
9090 StreamViewType = view_type ,
9191 )
92- store .ddb_streams [table_name ] = Stream (StreamDescription = stream )
92+ store .ddb_streams [table_name ] = StreamWrapper (StreamDescription = stream )
9393
9494
9595def get_stream_for_table (
@@ -219,7 +219,7 @@ def kinesis_shard_id(dynamodbstream_shard_id: str) -> str:
219219 return f"{ shard_params [0 ]} -{ shard_params [- 1 ]} "
220220
221221
222- def get_shard_id (stream : Stream , kinesis_shard_id : str ) -> str :
222+ def get_shard_id (stream : StreamWrapper , kinesis_shard_id : str ) -> str :
223223 ddb_stream_shard_id = stream .shards_id_map .get (kinesis_shard_id )
224224 if not ddb_stream_shard_id :
225225 ddb_stream_shard_id = shard_id (kinesis_shard_id )
Original file line number Diff line number Diff line change 55
66
77@dataclasses .dataclass
8- class Stream :
8+ class StreamWrapper :
99 """Wrapper for the API stub and additional information about a store"""
1010
1111 StreamDescription : StreamDescription
1212 shards_id_map : dict [str , str ] = dataclasses .field (default_factory = dict )
1313
1414
1515class DynamoDbStreamsStore (BaseStore ):
16- ddb_streams : dict [str , Stream ] = LocalAttribute (default = dict )
16+ ddb_streams : dict [str , StreamWrapper ] = LocalAttribute (default = dict )
1717
1818
1919dynamodbstreams_stores = AccountRegionBundle ("dynamodbstreams" , DynamoDbStreamsStore )
You can’t perform that action at this time.
0 commit comments