Skip to content

Commit ecac169

Browse files
committed
Support stream ARN as direct input to DynamoDB Streams event source
When the TableName config value is already a stream ARN (starts with 'arn:' and contains '/stream/'), skip the ListStreams lookup and use it directly.
1 parent 340bc67 commit ecac169

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Tools/LambdaTestTool-v2/src/Amazon.Lambda.TestTool/Processes/DynamoDBStreamsEventSource/DynamoDBStreamsEventSourceBackgroundService.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
8181

8282
private async Task<string?> GetStreamArnForTable(CancellationToken stoppingToken)
8383
{
84+
// If the configured value is already a stream ARN, use it directly
85+
if (_config.TableName.StartsWith("arn:") && _config.TableName.Contains("/stream/"))
86+
{
87+
return _config.TableName;
88+
}
89+
8490
var response = await _streamsClient.ListStreamsAsync(new ListStreamsRequest
8591
{
8692
TableName = _config.TableName

0 commit comments

Comments
 (0)