Ends in
00
days
00
hrs
00
mins
00
secs
SHOP NOW

AWS Cloud Practitioner Sale - Get a Chance to Win FREE Access to our new DEA Practice Exams

Guided Lab: Automated File Processing with S3 Event Notifications and Lambda function

Description

You can turn on S3 event notifications to send notifications on S3-related events, such as object uploads or deletions. These notifications can be configured to target AWS services like Lambda functions, SQS queues, or SNS topics.

In this lab, you’ll set up an S3 bucket to generate an event notification, which in turn will trigger a Lambda function to process the uploaded file. This combination of S3 events and Lambda functions is a common pattern in serverless architectures.

Prerequisites

This lab assumes you have some prior experience with the basic creation of S3 buckets and Lambda functions.

If you find any gaps in your knowledge, consider going through the following labs:

  • Creating an Amazon S3 bucket
  • Creating an AWS Lambda function

Objectives

Imagine you’re a solutions architect at a financial company. Your job is to provide the audit team with the transaction records they need for their checks. But there’s a catch due to privacy rules: they can’t see full credit card numbers. So, your challenge is to make sure they only get to see the last four digits of each card number. This way, they have just enough information to do their job without compromising customer data.

In this lab, you’ll set up this system. You’ll create an S3 bucket, configure its event notifications to trigger a Lambda function, and write the function logic to process and store a redacted version of the uploaded file in a designated folder within the same bucket.

In this lab, you will:

  • Learn how to enable S3 event notifications to invoke a Lambda function
  • Learn how to read from and upload files to an S3 bucket using the AWS SDK for Python (Boto3)