Skip to content

Function for AWS Lambda to extract zip files uploaded to S3

License

Notifications You must be signed in to change notification settings

Wasca/aws-lambda-unzip

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aws-lambda-unzip

Java 8 Function for AWS Lambda to extract zip files uploaded to S3

Files are extracted in place in the same bucket as where the zip file was uploaded. Any files present with the same name are overwritten. The zip file is deleted at the end of the operation.

Necessary permissions

In order to remove the uploaded zip file, the role configured in your Lambda function should have a policy looking like this:

{
        "Effect": "Allow",
        "Action": [
            "s3:GetObject",
            "s3:PutObject",
            "s3:DeleteObject"
        ],
        "Resource": [
            "arn:aws:s3:::mybucket"
	]
}

Handler Configuration

Handler property should be configured to kornell.S3EventProcessorUnzip::handleRequest

Packaging for deployment

Maven is already configured to package the .jar file correctly for deployment into Lambda. Just run

mvn clean package

The packaged file will be present in your target/ folder.

About

Function for AWS Lambda to extract zip files uploaded to S3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%