How to exacute virus scan before uploading the file to the S3 bucket

0

Hello,

I'll upload the file to the S3 bucket as following.

  1. I open the web page and click the upload button.
  2. The Lambda function generates a presigned URL for uploading objects.(background processing)
  3. The file is uploaded to the S3 bucket.

To prevent uploading the virus file, I want to check the file before uploading to the S3 bucket. AWS has no virus scan service.(AWS support said so)

Is there any method?

Thanks,

4回答
1

You can upload to a bucket and have a policy applied that prevents use of the file until it's been scanned. Add an S3 event configuration that triggers virus scanning automatically on uploaded objects, and then either tag or move objects once confirmed virus-free so they can be used by other applications. One way of doing that virus scanning is to queue events in SQS, and consume them via virus-scanning servers running in an EC2 auto-scaling group. This can be implemented using ClamAV in Python for example. I wouldn't recommend going fully serverless for this as there is considerable overhead in loading virus definitions.

エキスパート
回答済み 2年前
0
profile pictureAWS
エキスパート
kentrad
回答済み 2年前
  • Thank you for your response.

    I watched the page 'Integrating Amazon S3 Virus Scanning into Your Application Workflow with Cloud Storage Security'. I think 'API-Driven Scanning' is the good way. Is there similar AWS service?

0

Scanning before upload is not simple to integrate. But what many of our customers do is to use two buckets—one for uploads and one for downloads. Uploads work in the exact same way as you outlined. Clean files are moved from the staging bucket to the target bucket. Infected files are deleted or quarantined. More details: https://bucketav.com/help/use-cases/user-uploads.html#staging-bucket

bucketAV scans your S3 buckets for viruses, worms, and trojans. bucketAV detects malware in real-time, periodically, on-access, or on-demand. bucketAV is available in the AWS Marketplace.

profile picture
回答済み 7ヶ月前
0

The file scan before uploading to the s3 bucket can be done through the API Server available at the marketplace:

https://aws.amazon.com/marketplace/pp/prodview-giign63hhwqo6

More information can be found at

https://docs.elmcomputing.io/ami/x86/api_virus_scan_clamav.html

回答済み 10ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ