Hey I have setup file upload on my app, it works well but I’m not an expert with that. At work with AWS, every time a user upload to S3 it triggers a Lambda function to update our DB with the new upload file.
How can I achieve this with Tigris?
Should I do it this way?
The user get a signed url
Then, the user upload the file to the signed url
Then, the front end call an endpoint to get the last uploaded file and get the informations to be save in the DB (GetObjectCommand)
Another way is to have an upload server that you upload files to, then the server processes the file and uploads to Tigris.
Ingress bandwidth is free and egress bandwidth to Tigris is free so you won’t pay any extra in bandwidth, only for server costs. Using autostop/autostart you can reduce server costs further.
You can achieve it the way you have mentioned, or what @charsleysa has suggested.
We are working on a feature specifically for this type of use case Object Notifications. That would allow you to register a webhook that can then be configured to be called anytime an object is uploaded.