Add documentation for AWS S3 event integration - #606
Conversation
|
Warning Review limit reached
Next review available in: 29 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR adds a guide for configuring S3 object-created notifications through SQS and consuming them with a Ballerina AWS SQS listener. It includes AWS setup, record definitions, listener configuration, message parsing, verification, troubleshooting, and sidebar registration. ChangesS3 and SQS integration guide
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant S3
participant SQS
participant SQSListener
participant BallerinaService
S3->>SQS: Send object-created notification
SQSListener->>SQS: Poll queue
SQS-->>SQSListener: Return message
SQSListener->>BallerinaService: Invoke onMessage
BallerinaService->>BallerinaService: Parse S3Notification
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 8
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@en/docs/guides/howtoguides/s3-events-via-sqs-listener.md`:
- Line 37: Update the IAM credential prerequisite sentence in the S3 events via
SQS listener guide to use “an IAM user who has” instead of “an IAM user that
has,” preserving the rest of the sentence unchanged.
- Around line 307-310: Update the verification sample around S3Notification and
eventRecord so the displayed output matches what the implementation actually
prints. Replace the fabricated timestamp, named fields, and “Processing:” line
with the real eventRecord output, unless the corresponding field-level logging
is explicitly added to the implementation.
- Around line 305-308: Update the S3 event examples near the Visual Designer
instructions and remote function onMessage to parse message.body with
fromJsonStringWithType(S3Notification) instead of calling
message.cloneWithType(S3Notification). Preserve the existing notification and
event-record processing after deserialization.
- Around line 284-297: Update the S3/SQS setup to define one configurable AWS
region and reuse it consistently for the bucket, queue, Config.toml/runtime
configuration, and the sqs:Listener region instead of hardcoding us-east-1.
Ensure the documented queue-region selection and listener configuration use the
same value so the S3 event notification and SQS queue remain in one Region.
- Around line 303-315: Update the SQS sample configuration to use the configured
queueUrl variable instead of the placeholder URL, and align deletion behavior
with the surrounding setup. Prefer setting autoDelete: false and updating
onMessage to accept caller and perform the documented caller-based delete path
for test events; otherwise keep automatic deletion enabled and remove the
manual-delete troubleshooting guidance.
- Around line 33-37: Update the prerequisites and credential guidance in the S3
events via SQS listener guide to require only queue-scoped SQS permissions for
the polling and event-metadata logging flow. Remove S3 read access from the
initial runtime requirements, add it only in the “Read the CSV from S3”
next-step, and recommend the AWS default credential chain instead of requiring a
long-lived IAM user with broad S3 and SQS permissions.
- Around line 20-22: Add language identifiers to both fenced code blocks in the
S3 events guide: use a supported diagram language for the architecture diagram
and label the console-output fence as bash. Apply the same updates to the
additional fenced block around the referenced later section.
- Around line 276-278: Update the S3 notification handling around S3Notification
and cloneWithType(S3Notification) to detect top-level Event: "s3:TestEvent"
before parsing or requiring Records. Acknowledge/delete the test message through
the same discard flow already documented, while preserving normal S3Notification
processing for messages containing Records.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 268966fb-7b15-4b37-a0cc-b21542200764
⛔ Files ignored due to path filters (7)
en/static/img/guides/usecases/s3-events-via-sqs-listener/add-sqs-handler.pngis excluded by!**/*.pngen/static/img/guides/usecases/s3-events-via-sqs-listener/declare-s3-variable.pngis excluded by!**/*.pngen/static/img/guides/usecases/s3-events-via-sqs-listener/s3-and-sqs-integration.pngis excluded by!**/*.pngen/static/img/guides/usecases/s3-events-via-sqs-listener/s3-declare-foreach-loop.pngis excluded by!**/*.pngen/static/img/guides/usecases/s3-events-via-sqs-listener/s3-println.pngis excluded by!**/*.pngen/static/img/guides/usecases/s3-events-via-sqs-listener/sqs-trigger-configurations.pngis excluded by!**/*.pngen/static/img/guides/usecases/s3-events-via-sqs-listener/vector-store-add.pngis excluded by!**/*.png
📒 Files selected for processing (2)
en/docs/guides/howtoguides/s3-events-via-sqs-listener.mden/sidebars.ts
Broken links, images & orphan pages
Links/images come from one crawl of the production build (baseUrl-aware). Orphans are docs not referenced by Summary
Broken links & imagesIntroduced by this PRNo new broken link(s)/image(s) introduced by this PR. ✅ Already on
|
Purpose
Summary by CodeRabbit