Skip to content
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

Add ability to filter events before they reach inflight function for Buckets #7169

Open
boyney123 opened this issue Sep 25, 2024 · 0 comments
Labels
✨ enhancement New feature or request 🎨 sdk SDK

Comments

@boyney123
Copy link
Contributor

boyney123 commented Sep 25, 2024

Use Case

I'm uploading files to my bucket, I want the ability to filter events before my inflight function is triggered.

bucket.onCreate(inflight (key: str) => {
     // inflight function is triggered for all files in the bucket 
});

Proposed Solution

bucket.onCreate(inflight (key: str) => {
     // inflight function is only triggered on matches
}, { prefix: 'uploads/', suffix: '.png' });

When setting a Lambda destination for S3 events, you can filter by the prefix or suffix. Our abstraction could use the same functionality, although I'm not sure how Azure or Google would handle this!?

Random other note, but maybe filters with code would be useful here too? Ability to filter events before the inflight is triggered? Although when it compiles into the cloud I'm not actually sure how this would work....

Implementation Notes

No response

Component

No response

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.
  • If this issue is labeled needs-discussion, it means the spec has not been finalized yet. Please reach out on the #dev channel in the Wing Discord.
@boyney123 boyney123 added ✨ enhancement New feature or request needs-discussion Further discussion is needed prior to impl labels Sep 25, 2024
@monadabot monadabot added this to Wing Sep 25, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New - not properly defined in Wing Sep 25, 2024
@boyney123 boyney123 added the 🛠️ compiler Compiler label Sep 25, 2024
@Chriscbr Chriscbr added 🎨 sdk SDK and removed 🛠️ compiler Compiler needs-discussion Further discussion is needed prior to impl labels Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request 🎨 sdk SDK
Projects
Status: 🆕 New - not properly defined
Development

No branches or pull requests

2 participants