Lambda function that compressess a given S3 file and saves the output back to S3.
It uses streams to download, compress and upload files, allowing it to process files larger than the lambda memory limit.
- Create an AWS account if you do not already have one and login
- Go to the app's page on the Serverless Application Repository and click "Deploy"
lambdaS3Zip
- Lambda Function Name.lambdaS3ZipArn
- Lambda Function ARN.
Input event:
{
"Bucket":STRING_VALUE, /* required */
"Key":STRING_VALUE, /* required */
"Destination":{
"Bucket":STRING_VALUE,
"Key":STRING_VALUE
}
}
If Destination
is not present, the zipped file will be saved to:
s3://{Bucket}/{Key}.zip
This code is made available under the MIT license. See the LICENSE file.