Over a million developers have joined DZone.

Antivirus for S3 Buckets

Are you looking for a solution to ensure that your S3 buckets are virus free? Look no further.

· Cloud Zone

Download this eBook outlining the critical components of success for SaaS companies - and the new rules you need to play by.  Brought to you in partnership with NuoDB.

Many of our AWS consultancy clients ask me:

"How can we make sure that the files that we store on S3 are virus free?"

As always, our clients are looking for simple and cheap solutions. That's why I developed S3 VirusScan. Every file that is added to an S3 bucket is automatically scanned.

Features

  • Uses ClamAV to scan newly added files on S3 buckets
  • Updates ClamAV database every 3 hours automatically
  • Scales EC2 instance workers to distribute workload
  • Publishes a message to SNS in case of a finding
  • Can optionally delete compromised files automatically
  • Logs to CloudWatch Logs

How Does It Work

A picture is worth a thousand words:

Architecture

  1. S3 VirusScan uses an SQS queue to decouple scan jobs from the ClamAV workers. Each S3 bucket can fire events to that SQS queue in case of new objects. This feature of S3 is called S3 Event Notifications.
  2. The SQS queue is consumed by a fleet of EC2 instances running in an Auto Scaling Group. If the number of outstanding scan jobs reaches a threshold a new ClamAV worker is automatically added. If the queue is mostly empty, workers are removed.
  3. The ClamAV workers run a simple Ruby script that executes the clamscan command. In the background, the virus database is updated every three hours.
  4. If clamscan finds a virus the file is directly deleted (you can configure that) and an SNS notification is published.

Installation & Configuration

Read more about S3 VirusScan and learn how to install and configure our solution in minutes.

Read on

Feedback

Anything missing? Looking forward to your feedback! @hellomichibye or michael@widdix.de.

Learn how moving from a traditional, on-premises delivery model to a cloud-based, software-as-a-service (SaaS) strategy is a high-stakes, bet-the-company game for independent software vendors. Brought to you in partnership with NuoDB.

Topics:
s3 ,bucket ,virus

Published at DZone with permission of Michael Wittig, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}