CLF-C02 practice question 32 of 35

A company needs to run code in response to an event notification that occurs when objects are uploaded to an Amazon S3 bucket. Which AWS service will integrate directly with the event notification?

Full set: 924 questions

Domain Cloud Technology and Services

Answer options
A: AWS Lambda Correct answer
B: Amazon EC2
C: Amazon Elastic Container Registry (Amazon ECR)
D: AWS Elastic Beanstalk
Correct Answer:
A. AWS Lambda
Explanation

AWS Lambda is a serverless, event-driven compute service that lets you run code for virtually any type of application or backend service without provisioning or managing servers. It is designed to integrate directly with other AWS services as event sources. Amazon S3 can be configured to publish event notifications (such as s3:ObjectCreated:) that directly invoke a Lambda function. This allows the company to automatically run code in response to an object being uploaded to an S3 bucket, which perfectly matches the requirement.

Why Incorrect

B. Amazon EC2: Amazon EC2 provides virtual servers. It does not have a direct, built-in integration to automatically run code based on S3 event notifications. A complex workaround would be needed.
C. Amazon Elastic Container Registry (Amazon ECR): Amazon ECR is a managed container image registry service. Its purpose is to store and manage container images, not to execute code in response to events.
D. AWS Elastic Beanstalk: AWS Elastic Beanstalk is a platform-as-a-service (PaaS) for deploying and scaling web applications. It does not directly trigger code execution from an S3 event notification. ---

References

1. AWS Lambda Developer Guide: "Lambda is an event-driven compute service... You can also build serverless applications that are triggered by other AWS services such as Amazon S3 and Amazon DynamoDB."

Source: AWS Lambda Developer Guide

"What is AWS Lambda?"

Introduction.

2. Amazon S3 User Guide: This guide explicitly lists the destinations for S3 event notifications. "Amazon S3 can send event notification messages to the following destinations. You specify the Amazon Resource Name (ARN) of the destination in the notification configuration.

Amazon Simple Notification Service (Amazon SNS) topic

Amazon Simple Queue Service (Amazon SQS) queue

AWS Lambda function"

Source: Amazon S3 User Guide

"Amazon S3 Event Notifications"

Section: "Event notification destinations".

3. AWS Lambda Developer Guide: "You can use Amazon S3 to trigger a Lambda function to process object-created events." This document details the direct

push-based invocation model where S3 invokes the Lambda function.

Source: AWS Lambda Developer Guide

"Using AWS Lambda with Amazon S3".

Scroll to Top