Skip to content

add error replacement for DynamoDBStreams v2 #11887

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 22, 2024
Merged

Conversation

bentsku
Copy link
Contributor

@bentsku bentsku commented Nov 20, 2024

Motivation

As reported by a user, we had a red herring regarding some raised DynamoDB Streams error when used with ESM (with non default account and region):

2024-11-19T14:51:15.731 ERROR --- [functhread29] l.s.l.e.esm_worker     : Error while polling messages for event source arn:aws:dynamodb:us-west-2: 000000000001:table/<table-name>/stream/2024-11-18T14:36:43.932: An error occurred (ResourceNotFoundException) when calling the DescribeStream operation: Requested resource not found: Stream: arn:aws:dynamodb:ddblocal:000000000000:table/<table-name>/stream/2024-11-18T14:36:43.932 not found

Which made it look like we were not properly formatting the ARN or something related to DDB Local.

The issue was that we were not replacing the ARN value in the exception as it was directly raised by DDB-local, but our headers were correct for the namespacing.

Also, made a quick fix to start DDB-local in DynamoDB Streams v2 because if you targeted the dynamodbstreams service before doing a request to dynamodb, you would get a connection refused error as we'd try to send a request to it. I'm not adding all the hooks related to persistence because those services are very intertwined and this would only happen at startup with a fresh instance.

Changes

  • add more regex replacement on raised exception on DDB
  • add a test for this specific issue, and do a quick format fix for v1

@bentsku bentsku added aws:dynamodbstreams AWS DynamoDB Streams semver: patch Non-breaking changes which can be included in patch releases labels Nov 20, 2024
@bentsku bentsku added this to the 4.1 milestone Nov 20, 2024
@bentsku bentsku self-assigned this Nov 20, 2024
Copy link

LocalStack Community integration with Pro

    2 files      2 suites   57m 0s ⏱️
1 384 tests 1 309 ✅ 75 💤 0 ❌
1 386 runs  1 309 ✅ 77 💤 0 ❌

Results for commit dbe4e44.

Copy link
Member

@viren-nadkarni viren-nadkarni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✔️

@bentsku bentsku merged commit ac6f897 into master Nov 22, 2024
45 checks passed
@bentsku bentsku deleted the improve-ddb-stream-v2 branch November 22, 2024 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:dynamodbstreams AWS DynamoDB Streams semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants