Skip to content

[aws-lambda] Add retryable_status_codes option to retry transient HTTP status codes - #7165

Merged
dlvenable merged 1 commit into
opensearch-project:mainfrom
LuisNorman:aws-lambda-retryable-status-codes
Oct 2, 2026
Merged

dlvenable merged 1 commit into
opensearch-project:mainfrom
LuisNorman:aws-lambda-retryable-status-codes

Conversation

@LuisNorman

Copy link
Copy Markdown
Contributor

Description

Adds an opt-in retryable_status_codes client option to the aws_lambda processor/sink. When set, the Lambda client's retry policy also retries responses carrying those HTTP status codes (via RetryOnStatusCodeCondition), in addition to the existing retryable-exception handling.

Transient Lambda gateway errors (e.g. 502 Bad Gateway, 504 Gateway Timeout) surface as a generic LambdaException that the current CustomLambdaRetryCondition does not match, so they are not retried today. Making them retryable — for idempotent functions — avoids forwarding the failed batch downstream on a transient error.

  • New client.retryable_status_codes (default: empty → current behavior; opt-in, intended for idempotent functions).
  • LambdaClientFactory composes CustomLambdaRetryCondition with RetryOnStatusCodeCondition when the set is non-empty.
  • No behavior change unless configured.

Issues Resolved

Relates to #5491

Check List

  • New functionality includes testing.
  • Commits are signed per the DCO using --signoff.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

…P status codes

Signed-off-by: LuisNorman <lunorman@amazon.com>
@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🧪 PR contains tests
🔒 No security concerns identified
✅ No TODO sections
🔀 No multiple PR themes
⚡ No major issues detected

@graytaylor0 graytaylor0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for adding this feature! It looks good to me. Please follow up with a documentation PR when you get a chance: https://github.com/opensearch-project/documentation-website/blob/main/_data-prepper/pipelines/configuration/processors/aws-lambda.md

LuisNorman pushed a commit to LuisNorman/documentation-website that referenced this pull request Oct 1, 2026
Documents the opt-in retryable_status_codes client option added in opensearch-project/data-prepper#7165, which retries transient Lambda invocation 5xx errors instead of forwarding the failed batch.

Signed-off-by: LuisNorman <lunorman@amazon.com>
@dlvenable
dlvenable merged commit 50d2bae into opensearch-project:main Oct 2, 2026
73 checks passed
kolchfa-aws pushed a commit to opensearch-project/documentation-website that referenced this pull request Oct 5, 2026
Documents the opt-in retryable_status_codes client option added in opensearch-project/data-prepper#7165, which retries transient Lambda invocation 5xx errors instead of forwarding the failed batch.

Signed-off-by: LuisNorman <lunorman@amazon.com>
Co-authored-by: LuisNorman <lunorman@amazon.com>
kolchfa-aws pushed a commit to opensearch-project/documentation-website that referenced this pull request Oct 5, 2026
… (#13228)

Documents the opt-in retryable_status_codes client option added in opensearch-project/data-prepper#7165, which retries transient Lambda invocation 5xx errors instead of forwarding the failed batch.



(cherry picked from commit 759c28b)

Signed-off-by: LuisNorman <lunorman@amazon.com>
Signed-off-by: opensearch-ci-bot <opensearch-infra@amazon.com>
Co-authored-by: Luis Norman <lanorman14@gmail.com>
Co-authored-by: LuisNorman <lunorman@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants