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.
Here are a couple of blog posts that cover how to do this:
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?
Relevant questions
Upload to S3 from Lambda doesn't create file in bucket, no error
asked a year agoDoes the AmazonS3 class from the AWS JavaSDK use the public internet to upload a file to an s3 bucket?
Accepted Answerasked 7 months agoXlsx Upload - Failed to scan your file
Accepted Answerasked 6 months agoHow can customers find out the S3 bucket with the highest cost or sort the cost for each S3 bucket?
Accepted Answerasked 2 years agoUsing S3 bucket as a file server for the public
asked 2 months agoUploading a Dataframe to AWS S3 Bucket from SageMaker
Accepted Answerasked 3 years agoS3 upload issues through the AWS console
asked 5 months agoHow to exacute virus scan before uploading the file to the S3 bucket
asked 2 months agoUnable to upload file to bucket due to network error
Accepted Answerasked a year agoWhere can I found the uri of my Bucket to connect my Symfony application with S3 and upload files?
asked 5 months ago
Thank you for your response.
Is the method that you said the following? https://github.com/bluesentry/bucket-antivirus-function#deny-to-download-the-object-if-not-clean
By this method is it impossible to prevent uploadig the virus file to the S3 bucket?