Skip to content

Agent: an S3 toolkit, and s3_triggers joining S3 and Lambda - #89

Merged
utkarsh5026 merged 1 commit into
mainfrom
ccr-29333bbc-mkqczw
Oct 17, 2026
Merged

utkarsh5026 merged 1 commit into
mainfrom
ccr-29333bbc-mkqczw

Conversation

@utkarsh5026

Copy link
Copy Markdown
Owner

The agent now covers Amazon S3 beside Lambda, and the bucket events that
invoke functions. AgentView().ask("Were last night's uploads to acme-raw
processed?") calls s3_triggers, which reads the bucket's event
notifications, lists the files written in the window, checks the function
is there and lets the bucket invoke it, and reads its runs and failures
from CloudWatch for the same window. Its findings name what broke the
link: a suffix filter that misses '.CSV', a multipart upload that a
PUT-only notification ignores, a missing function or permission (with
the add-permission command), or no file arriving at all.

  • toolkits/s3_tools.py: S3Toolkit over S3Analyzer with find_buckets,
    bucket_details, list_folder, find_files, folder_summary and file_info
    (headers only: no tool reads a file's content), and s3_triggers when
    the agent also has the Lambda toolkit (Toolkit.peer()). Pure
    summarize_*, count_arrivals and trigger_findings.
  • DEFAULT_TOOLKITS is now ("lambda", "s3"); AgentAnalyzer(s3_core=).
  • s3.py: S3Analyzer.notifications() and the pure parse_notifications /
    EventNotification (GetBucketNotificationConfiguration).
  • Guard: attach() swaps the analyzer's session for a _GuardedSession, so
    every client it makes (S3Analyzer's regional S3, CloudWatch, STS, S3
    Control clients) is hooked; Head* reads are allowed; hooks de-duplicate
    on the client's emitter (unique_id) rather than id(), which can be
    reused once a short-lived client is collected.
  • Budget.s3_keys caps one listing (100,000 keys); the report counts S3
    request cost next to CloudWatch's, and shows the keys read.
  • Tool calls leave out arguments equal to the tool's defaults (LangChain
    passes them all) and write the first required one positionally; next
    steps leave out None arguments (LambdaView().functions(None, ...)).
  • README, docs/agent.md, docs/s3.md, CHANGELOG, CLAUDE.md, rules.py
    (s3 in COMPANIONS["agent"], s3:GetBucketNotification).

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_018djcHAPxWHwcvV7sVFpJbx

The agent now covers Amazon S3 beside Lambda, and the bucket events that
invoke functions. AgentView().ask("Were last night's uploads to acme-raw
processed?") calls s3_triggers, which reads the bucket's event
notifications, lists the files written in the window, checks the function
is there and lets the bucket invoke it, and reads its runs and failures
from CloudWatch for the same window. Its findings name what broke the
link: a suffix filter that misses '.CSV', a multipart upload that a
PUT-only notification ignores, a missing function or permission (with
the add-permission command), or no file arriving at all.

- toolkits/s3_tools.py: S3Toolkit over S3Analyzer with find_buckets,
  bucket_details, list_folder, find_files, folder_summary and file_info
  (headers only: no tool reads a file's content), and s3_triggers when
  the agent also has the Lambda toolkit (Toolkit.peer()). Pure
  summarize_*, count_arrivals and trigger_findings.
- DEFAULT_TOOLKITS is now ("lambda", "s3"); AgentAnalyzer(s3_core=).
- s3.py: S3Analyzer.notifications() and the pure parse_notifications /
  EventNotification (GetBucketNotificationConfiguration).
- Guard: attach() swaps the analyzer's session for a _GuardedSession, so
  every client it makes (S3Analyzer's regional S3, CloudWatch, STS, S3
  Control clients) is hooked; Head* reads are allowed; hooks de-duplicate
  on the client's emitter (unique_id) rather than id(), which can be
  reused once a short-lived client is collected.
- Budget.s3_keys caps one listing (100,000 keys); the report counts S3
  request cost next to CloudWatch's, and shows the keys read.
- Tool calls leave out arguments equal to the tool's defaults (LangChain
  passes them all) and write the first required one positionally; next
  steps leave out None arguments (LambdaView().functions(None, ...)).
- README, docs/agent.md, docs/s3.md, CHANGELOG, CLAUDE.md, rules.py
  (s3 in COMPANIONS["agent"], s3:GetBucketNotification).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018djcHAPxWHwcvV7sVFpJbx
@utkarsh5026
utkarsh5026 merged commit 228da88 into main Oct 17, 2026
4 of 10 checks passed
@utkarsh5026
utkarsh5026 deleted the ccr-29333bbc-mkqczw branch October 17, 2026 15:13
@utkarsh5026 utkarsh5026 mentioned this pull request Oct 18, 2026
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.

2 participants