Protect Your S3 Against Malware Using Amazon GuardDuty

Protect Your S3 Against Malware Using Amazon GuardDuty
Protect Your S3 Against Malware Using Amazon GuardDuty

CLOUD LABS



Protect Your S3 Against Malware Using Amazon GuardDuty

In this Cloud Lab, you’ll gain insights into building a malware detection pipeline with Amazon GuardDuty to scan an uploaded file, remove malicious files, notify stakeholders, and securely transfer clean data using S3, Lambda, EventBridge, and SNS.

9 Tasks

intermediate

1hr 30m

Certificate of Completion

Desktop OnlyDevice is not compatible.
No Setup Required
Amazon Web Services

Learning Objectives

An understanding of how to configure and integrate Amazon GuardDuty with supporting services like S3, Lambda, EventBridge, and SNS
Hands-on experience creating event-driven workflows that respond to GuardDuty findings in real time
The ability to build a serverless malware detection and remediation pipeline that scans, cleans, and secures file uploads in S3

Technologies
EventBridge logoEventBridge
GuardDuty
Lambda logoLambda
SNS logoSNS
S3 logoS3
Cloud Lab Overview

Amazon GuardDuty is an intelligent threat detection service that uses machine learning, anomaly detection, and integrated threat intelligence to continuously monitor AWS accounts, workloads, and data stored in services like S3. It automatically identifies potential threats such as unauthorized access, data exfiltration, or malware, and provides actionable security findings to help protect your environment.

In this Cloud Lab, you’ll build a complete malware detection and response workflow using Amazon GuardDuty Malware Protection. The goal is to scan uploaded files, remove malicious objects, notify users, and securely transfer clean files for use.

You’ll start by creating two Amazon S3 buckets: one for raw file uploads (to be scanned) and one for clean files (malware-free data). Next, you’ll configure Amazon GuardDuty to automatically scan new files in the raw bucket. You’ll then create an Amazon SNS topic with an email subscription to deliver real-time alerts when malware is detected. Next, you’ll build a Lambda function that processes GuardDuty findings. If malware is detected, the file is deleted, and an SNS notification is sent. If no malware is detected, the file is copied to the clean bucket for safe usage. Finally, you’ll define an Amazon EventBridge rule to automatically invoke the Lambda function whenever GuardDuty generates a finding, ensuring your workflow is fully automated and event-driven.

By the end of this Cloud Lab, you will have created a serverless security automation pipeline that detects malware in S3 buckets, removes infected files, alerts stakeholders, and safely moves clean data—leveraging Amazon GuardDuty, Lambda, EventBridge, SNS, and S3.

The given is the high-level architecture diagram of the infrastructure you’ll create in this Cloud Lab:

Malware detection using Amazon GuardDuty
Malware detection using Amazon GuardDuty

Cloud Lab Tasks
1.Introduction
Getting Started
2.Set Up Malware Detection Components
Create S3 Buckets
Configure the Amazon GuardDuty
Create and Configure SNS Topic
3.Automate and Test the Workflow
Create a Lambda Function
Create an EventBridge Rule
Test the Malware Detection System
4.Conclusion
Clean Up
Wrap Up
Labs Rules Apply
Stay within resource usage requirements.
Do not engage in cryptocurrency mining.
Do not engage in or encourage activity that is illegal.

Relevant Course

Use the following content to review prerequisites or explore specific concepts in detail.

Hear what others have to say
Join 1.4 million developers working at companies like