Search code examples
amazon-web-servicesaws-lambdalarge-data

AWS lambda extract large data and upload to s3


I am trying to write a nodeJS lambda function to query data from our database cluster and upload this to s3, we require this for further analysis. But my doubt is, if the data to be queried from the db is large (9GB), how does the lambda function handle this as the memory limit is 3008 MB ?


Solution

  • There is also a disk storage limit of 500MB.

    Therefore, you would need to stream the result to Amazon S3 as it is coming in from the database.

    You might also run into a time limit of 15 minutes for a Lambda function, depending upon how fast the database can query and transfer that quantity of information.

    You might consider an alternative strategy, such as having the Lambda function call Amazon Athena to query the database. The results of an Athena query are automatically saved to Amazon S3, which would avoid the need to transfer the data.