3

I am envisioning this use case where I can upload a file to Amazon S3, and when that's completed, S3 can make a RESTful to an endpoint on my server that will then fetch the S3 file to be processed.

Is this something possible with S3? I don't see this in the S3 documentation

Thanks

1
  • Did you look into event triggers in AWS Lambda ?
    – Kush Vyas
    Commented Nov 28, 2017 at 6:57

1 Answer 1

5

Amazon S3 supports events. You can create events on create, write or delete type events but not on read events. For destinations of the events, you can select SNS, SQS or Lambda. Calling a REST endpoint is not supported.

For your use case, you can create a Lambda function that is invoked by S3 when a new file is copied to S3. Your Lambda function can then do what you want, for example, calling your REST endpoint.

This tutorial will show you step-by-step how to setup Lambda invoked by S3:

Tutorial: Using AWS Lambda with Amazon S3

There are lots of examples on the Internet. The above example is node (JavaScript) but many languages are supported: Python, C#, etc.

1
  • In 2023, an SNS subscription can be configured to deliver messages directly to HTTP/S endpoints, without having to use Lambda as a bridge. Commented Sep 26, 2023 at 12:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.