Skip to content

fix(aws_S3 source): Add timeout for s3 operations. Add more error logging when get object fails. #25873

Open
petere-datadog wants to merge 5 commits into
masterfrom
peter.ehik/aws-read-timeout
Open

fix(aws_S3 source): Add timeout for s3 operations. Add more error logging when get object fails. #25873
petere-datadog wants to merge 5 commits into
masterfrom
peter.ehik/aws-read-timeout

Conversation

@petere-datadog

Copy link
Copy Markdown
Contributor

Summary

  • Update amazon_s3 source to add reasonable timeouts for s3 errors
  • Add error logs for keys that fail to download

Change Type

  • Bug fix
  • New feature
  • Dependencies
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

References

Notes

  • Please read our Vector contributor resources.
  • Do not hesitate to use @vectordotdev/vector to reach out to us regarding this PR.
  • Some CI checks run only after we manually approve them.
    • We recommend adding a pre-push hook, please see this template.
    • Alternatively, we recommend running the following locally before pushing to the remote branch:
      • make fmt
      • make check-clippy (if there are failures it's possible some of them can be fixed with make clippy-fix)
      • make test
  • After a review is requested, please avoid force pushes to help us review incrementally.
    • Feel free to push as many commits as you want. They will be squashed into one before merging.
    • For example, you can run git merge origin master and git push.
  • If this PR introduces changes Vector dependencies (modifies Cargo.lock), please
    run make build-licenses to regenerate the license inventory and commit the changes (if any). More details on the dd-rust-license-tool.

taylorchandleryoung and others added 3 commits July 16, 2026 15:55
The aws_s3 source created its S3 client with no read or operation timeout
(only the SDK-default ~3.1s connect timeout). A half-open or silently
dropped connection -- for example one reaped by a NAT gateway idle
timeout -- could therefore hang a polling task indefinitely on the
GetObject response-body read, stopping SQS polling entirely and stalling
S3-based ingestion until the process was restarted. Retries are disabled
on this client, so there was no recovery.

Apply default S3 client timeouts (connect_timeout_seconds=5,
read_timeout_seconds=30) and expose them as source configuration. The
read timeout is applied per-read, so a slow but steadily progressing
transfer of a large object is not cut off; no operation timeout is set by
default to avoid capping legitimately long transfers. This mirrors the
existing SQS client timeout support on the same source.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Error logs for failed S3 events only included the SQS message ID, making it
hard to tell which S3 object actually failed without cross-referencing.
Log the object key (when known) alongside the error at error level.
@petere-datadog
petere-datadog requested a review from a team as a code owner July 16, 2026 16:31
@github-actions github-actions Bot added the domain: sources Anything related to the Vector's sources label Jul 16, 2026
@datadog-vectordotdev

datadog-vectordotdev Bot commented Jul 16, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 273a0fd | Docs | Give us feedback!

@petere-datadog petere-datadog changed the title fix(aws_S3): Add timeout for s3 operations. Add more error logging when get object fails. fix(aws_S3 source): Add timeout for s3 operations. Add more error logging when get object fails. Jul 16, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 644e4cd109

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/sources/aws_s3/mod.rs
@petere-datadog
petere-datadog requested a review from a team as a code owner July 16, 2026 18:22
@github-actions github-actions Bot added docs review on hold The documentation team reviews PRs only after a PR is approved by the COSE team. domain: external docs Anything related to Vector's external, public documentation labels Jul 16, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 273a0fd98a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/sources/aws_s3/mod.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs review on hold The documentation team reviews PRs only after a PR is approved by the COSE team. domain: external docs Anything related to Vector's external, public documentation domain: sources Anything related to the Vector's sources

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants