exam questions

Exam AWS Certified Solutions Architect - Professional SAP-C02 All Questions

View all questions & answers for the AWS Certified Solutions Architect - Professional SAP-C02 exam

Exam AWS Certified Solutions Architect - Professional SAP-C02 topic 1 question 266 discussion

A company’s interactive web application uses an Amazon CloudFront distribution to serve images from an Amazon S3 bucket. Occasionally, third-party tools ingest corrupted images into the S3 bucket. This image corruption causes a poor user experience in the application later. The company has successfully implemented and tested Python logic to detect corrupt images.

A solutions architect must recommend a solution to integrate the detection logic with minimal latency between the ingestion and serving.

Which solution will meet these requirements?

  • A. Use a Lambda@Edge function that is invoked by a viewer-response event.
  • B. Use a Lambda@Edge function that is invoked by an origin-response event.
  • C. Use an S3 event notification that invokes an AWS Lambda function.
  • D. Use an S3 event notification that invokes an AWS Step Functions state machine.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
i_am_robot
Highly Voted 1 year, 10 months ago
Selected Answer: C
The requirement here is to catch and deal with the corruption at the time of ingestion. Hence, the logical place to put the check would be where the ingestion is actually happening, which is when the image is put into the S3 bucket. Amazon S3 can be configured to send an event notification when a new object is created (i.e., put into the bucket). This event can then trigger a Lambda function that uses the Python logic to check the image for corruption. This way, you are catching and dealing with any issues as soon as the image is ingested.
upvoted 18 times
...
874def1
Most Recent 1 week, 6 days ago
Selected Answer: C
If you are tempted to go with D - remember that S3 event notificaitons can ONLY be sent to : SQS, Lambda, SNS Topic, Event Bridge. You cannot DIRECTLY invoke a Step function as part of the S3 notification. You can use Event bridge to do that. But that is not mentioned here.
upvoted 1 times
...
Peaches35
4 months ago
Selected Answer: C
Option B would add unnecessary latency by running the detection logic every time an image is fetched from the origin
upvoted 2 times
...
0b43291
5 months, 1 week ago
Selected Answer: B
By using a Lambda@Edge function triggered by an origin-response event, you can inspect and process the images as soon as they are retrieved from the S3 bucket, before they are cached and served to the end-users. This allows you to detect and handle corrupted images with minimal latency, ensuring a better user experience in the web application. Option C (S3 event notification invoking a Lambda function) would introduce additional latency, as the Lambda function would run after the image has been ingested into the S3 bucket, and the detection logic would not be integrated with the serving process.
upvoted 1 times
0b43291
5 months, 1 week ago
Ignore this. You want to detect before serving. So C is correct
upvoted 1 times
...
...
duriselvan
1 year, 2 months ago
https://docs.aws.amazon.com/lambda/latest/dg/with-s3.html Using AWS Lambda with Amazon S3 PDF RSS You can use Lambda to process event notifications from Amazon Simple Storage Service. Amazon S3 can send an event to a Lambda function when an object is created or deleted. You configure notification settings on a bucket, and grant Amazon S3 permission to invoke a function on the function's resource-based permissions policy.
upvoted 1 times
...
duriselvan
1 year, 4 months ago
Lambda@Edge triggered by origin-response event: Pros: Detects corrupted images closer to the origin, minimizing impact. Avoids processing overhead for valid images. Cons: Corrupted images might still be partially downloaded by users before detection.
upvoted 1 times
...
career360guru
1 year, 5 months ago
Selected Answer: C
Option C
upvoted 1 times
...
NikkyDicky
1 year, 9 months ago
Selected Answer: C
its a C
upvoted 2 times
...
pupsik
1 year, 10 months ago
Selected Answer: C
Take care of corrupted images as soon as they get uploaded to S3
upvoted 2 times
...
gd1
1 year, 10 months ago
Selected Answer: C
D is for more complex and multiple sets of Lambda.
upvoted 1 times
...
shree2023
1 year, 10 months ago
Selected Answer: C
A&B is too late, D is unnecessary C is correct
upvoted 3 times
AloraCloud
7 months, 1 week ago
How is A&B too late if they are done at the edge before the upload?
upvoted 1 times
...
...
PhuocT
1 year, 10 months ago
C is correct.
upvoted 1 times
...
psyx21
1 year, 10 months ago
Selected Answer: C
Correct Answer is C
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago