简体   繁体   中英

AWS lambda function & S3

I'm trying to write a lambda function in Node.js 6.10 on AWS that gets triggered when an object is uploaded into S3 and I have no idea where to even begin. Can someone please help?

Below is the post from AWS guys on the same scenario.
https://docs.aws.amazon.com/lambda/latest/dg/with-s3.html

The idea is simple, You need to configure events on the S3 bucket to invoke your lambda. These events for your case should be put and multi-part complete.

Below is the screenshot of event configuration

在此处输入图片说明

You can find events under properties tab of the S3 bucket

Use SAM (Serverless Application Model). Here's some info: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#s3

Here's where you can find an actual example of the code and the SAM template: https://github.com/awslabs/serverless-application-model/tree/develop/examples/apps/s3-get-object

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM