Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
832 views
in Technique[技术] by (71.8m points)

amazon-web-services - 有没有办法增加延迟来触发S3上传中的lambda?(Is there a way to add delay to trigger a lambda from S3 upload?)

I have a Lambda function which is triggered after put/post event of S3 bucket.

(我有一个Lambda函数,该函数在S3存储桶的put / post事件后触发。)

This works fine if there is only one file uploaded to S3 bucket.

(如果只有一个文件上传到S3存储桶,则此方法可以正常工作。)

However, at times there could be multiple files uploaded which can take upto 7 minutes to complete the upload process.

(但是,有时可能会上传多个文件,最多可能需要7分钟才能完成上传过程。)

This triggers my lambda function multiple times which adds overhead of handling this from the code.

(这会多次触发我的lambda函数,从而增加了从代码中处理该函数的开销。)

Is there any way to either trigger the lambda only once for the complete upload or add delay in the function and avoid multiple execution of Lambda function?

(有什么方法可以只触发一次lambda以完成完整上传,也可以在函数中增加延迟并避免多次执行Lambda函数吗?)

There is no specific interval when the files will be uploaded to S3 hence could not use scheduler.

(没有将文件上载到S3的特定间隔,因此无法使用调度程序。)

  ask by Nitin Malode translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It seems Multi Part Upload is being used here from the client.

(客户端似乎正在使用分段上传。)

Maybe a duplicate of this?

(也许与此重复?)

- AWS Lambda and Multipart Upload to/from S3

(- 向/到S3的AWS Lambda和分段上传)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...