aws lambda (node or python) zip folder contents -- 2

Job ID: 36766425

Budget: $150 – $300 USD

**Job Description**:

We are looking for an experienced AWS Lambda function developer who can help us with an on-demand file compression task. The candidate should be skilled in either Python or Node.js and have a thorough understanding of AWS services, specifically AWS S3 and AWS Lambda.

**Task Description**:

The task is to develop an AWS Lambda function that, upon being triggered, compresses the contents of a specified S3 folder on-the-fly and places the resulting zip file in the same location. Due to the potential size of the files and AWS Lambda's limitations, the function must not download all files at once, but handle them one at a time (or in small chunks). We will make a github repo for your code, which should be updated during the project so my team can review as we go. We will not give access to our aws for this, we will instead handle the deployment on our side once you are done or we get to a testing phase.

to be clear you will see a folder like

.../foldername/
then you will make the zip like this
.../foldername.zip

you can assume we will invoke the lambda after all of the files are set in the folder, not using an s3 object event. you can assume we have possibly thousands of files in here. stream processing is a MUST here.

its a single zip file with all of the contents of the folder inside of it

**Key Requirements**:

1. Strong proficiency in AWS Lambda and S3 services.
2. Proficient in either Python or Node.js. Familiarity with Python's `boto3` or Node.js's `aws-sdk` is a plus.
3. Experience with file streaming and on-the-fly compression libraries, such as Python's `gzip` or `zipfile` and Node.js's `archiver` or `zlib`.
4. Optimizing for speed and minimal CPU usage over the compression ratio.
5. Robust error handling and logging capabilities, especially around file I/O operations.
6. Adherence to AWS IAM roles and permissions best practices.
7. Able to provide clear and detailed comments in the code, including a brief user manual on how to deploy and use the developed Lambda function.

**Deliverables**:

1. A fully functioning AWS Lambda function code.
2. Documentation detailing the function's deployment and usage.

**Additional Information**:

Please provide examples of your previous work with AWS Lambda functions and S3 services. Your proposal should include how you plan to approach this task and any specific libraries you would use. also include the answer to 5+4= so i know its not a spam bid.

we expect to be done with this project in 2 days max

here is sample code from chat gpt which seems roughly right
https://chat.openai.com/share/359fa027-8c48-4726-a572-7b3ae51dbdf4
the same can be done for node but there are some sample projects i found after a quick google.
Related categories: Python Amazon Web Services Node.js