- Newest
- Most votes
- Most comments
It appears you have 3 main tasks in your flow of processing these incoming zip files:
- Accept incoming zip files at a high rate
- Decompress and validate each zip file
- Process validated files and push data to Timestream database
For greater efficiency I'd recommend the following:
-
Use API Gateway direct integration to simply store each incoming zip file directly to an S3 bucket. This link contains patterns to explore, the first one (direct proxy) is an excellent choice:
https://aws.amazon.com/blogs/compute/patterns-for-building-an-api-to-upload-files-to-amazon-s3/ -
Setup the incoming S3 bucket trigger for new files to call a Lambda function. Create a second S3 bucket for Lambda to store validated and decompressed files. The Lambda could also delete the zip file after processing. Here is a link describing a similar flow: https://docs.aws.amazon.com/lambda/latest/dg/with-s3-tutorial.html
-
The second S3 bucket can be configured with a trigger to call a second Lambda function to process the decompressed files and store into the Timestream database.
There are other options you could explore using S3 triggers to send events to SNS topics or SQS message queues as well: https://docs.aws.amazon.com/AmazonS3/latest/userguide/ways-to-add-notification-config-to-bucket.html
Relevant content
- Accepted Answerasked 5 months ago
- asked 2 years ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
file create and delete put will cost a lot, how about processing and save to s3, then read and do other stuff