My process
Everything works and there's no error but the file is uploaded to the output folder every couple of seconds until I retrigger the lambda function.
I've pinpointed the problem to be the upload_file function. I've tried adding the Config arg (use_threads = True).
try:
document.save('/tmp/'+key)
s3.upload_file('/tmp/'+newkey, bucket,'Output/'+newkey)
except Exception as e:
print(e)
raise e
I've figured out my mistake. This lambda function goes in a loop because it triggers itself from the file upload into the same bucket in step 4. Using a new bucket for the output file fixed the issue.
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.