简体   繁体   中英

AWS Lambda/DynamoDB

My Lambda is invoking other lambda, First lambda will be inserting the data into DynamoDB from S3 and second lambda get invoked. The second lambda will read the data from DynamoDb and create excel file in S3. While inserting 100's records it worked good but while inserting 1500 + records, the first lambda is inserting the data correctly into DynamoDb and invoking the second lambda but the second lambda creates two files, one with correct number of records which expected and the other one is duplicated with less number than expected.

I tried increasing the time out for both lambda but did not work.

While i am not sure why your code will generate duplicate excels, i want to give some insights on application/architecture perspectives:

Why you need to insert something to ddb first, then use another process to read data back from ddb to generate excels? It seems to me the process can be done in a single lambda, that the lambda function read data from source S3 into local tmp directory or memory of lambda, and then insert data the ddb, and then use the local data to generate the excels in target S3.

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