Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to perform antivirus scan on aws s3

I am having a web application where user will upload file and web server will save it to S3 and then later on process it without copying it to local server.
Now my question is how can i perform virus scan on files stored in S3 before processing them.
Requirement is to use well established antivirus applications.

Update:10/April/2018
Till date there is no professional antivirus system that can do scan on s3 bucket directly. We ended up installing antivirus on our windows/linux box and creating a flow where we copy files first to a temporary folder and then copying back to S3 once scan is done.

like image 935
Anshul Nigam Avatar asked May 18 '17 13:05

Anshul Nigam


Video Answer


2 Answers

I would try to establish a workflow with Lambdas. Upon S3 upload, automatically trigger a Lambda which copies the file to a /tmp/ folder somewhere (assuming it fits), virus scan it, and then if it passes the virus scan, re-upload into a separate bucket/folder in S3.

like image 97
Henry Avatar answered Oct 05 '22 15:10

Henry


You could use the Virus Total service. Or you could use an open-source solution

like image 40
Shimon Tolts Avatar answered Oct 05 '22 16:10

Shimon Tolts