SAA-C03 practice question 25 of 35

A company is building a serverless application to process clickstream data from its website. The clickstream data is sent to an Amazon Kinesis Data…

Full set: 972 questions

Domain Design Resilient Architectures

A company is building a serverless application to process clickstream data from its website. The clickstream data is sent to an Amazon Kinesis Data Streams data stream from the application web servers. The company wants to enrich the clickstream data by joining the clickstream data with customer profile data from an Amazon Aurora Multi-AZ database. The company wants to use Amazon Redshift to analyze the enriched dat a. The solution must be highly available. Which solution will meet these requirements?
Answer options
A: Use an AWS Lambda function to process and enrich the clickstream data. Use the same Lambda function to write the clickstream data to Amazon S3. Use Amazon Redshift Spectrum to query the enriched data in Amazon S3. Correct answer
B: Use an Amazon EC2 Spot Instance to poll the data stream and enrich the clickstream data. Configure the EC2 instance to use the COPY command to send the enriched results to Amazon Redshift.
C: Use an Amazon Elastic Container Service (Amazon ECS) task with AWS Fargate Spot capacity to poll the data stream and enrich the clickstream data. Configure an Amazon EC2 instance to use the COPY command to send the enriched results to Amazon Redshift.
D: Use Amazon Kinesis Data Firehose to load the clickstream data from Kinesis Data Streams to Amazon S3. Use AWS Glue crawlers to infer the schema and populate the AWS Glue Data Catalog. Use Amazon Athena to query the raw data in Amazon S3.
Correct Answer:
A. Use an AWS Lambda function to process and enrich the clickstream data. Use the same Lambda function to write the clickstream data to Amazon S3. Use Amazon Redshift Spectrum to query the enriched data in Amazon S3.
Explanation

This solution provides a highly available and serverless architecture that meets all requirements. An AWS Lambda function is triggered by records in the Kinesis Data Stream. This function can connect to the Amazon Aurora database to fetch customer data, enrich the incoming clickstream records, and then write the resulting enriched data to an Amazon S3 bucket. Amazon Redshift Spectrum can then be used to directly query this structured data in S3 without needing to load it into Redshift storage, fulfilling the analysis requirement. This entire pipeline (Kinesis, Lambda, S3, Redshift Spectrum) is composed of managed, highly available services, aligning with the problem's constraints.

Why Incorrect

B: EC2 Spot Instances are not suitable for highly available workloads as they can be terminated with short notice, violating a core requirement. The solution is also not serverless. C: Fargate Spot capacity, similar to EC2 Spot, is for fault-tolerant workloads and is not appropriate for a highly available solution. This option also introduces unnecessary complexity. D: This option fails to perform the critical data enrichment step. It only loads raw data to S3 and uses Amazon Athena for analysis, not Amazon Redshift as required.

References

1. AWS Lambda with Kinesis: The AWS Lambda Developer Guide explains how to use Lambda to process records from an Amazon Kinesis data stream. This is a common serverless pattern for real-time stream processing.

Source: AWS Lambda Developer Guide

"Using AWS Lambda with Amazon Kinesis"

Section: "Creating a Kinesis consumer".

2. Lambda Accessing Aurora: To enrich data from Aurora

the Lambda function must be configured to access resources in the same VPC as the database.

Source: AWS Lambda Developer Guide

"Configuring a Lambda function to access resources in a VPC".

3. Amazon Redshift Spectrum: The Amazon Redshift Database Developer Guide details how Redshift Spectrum enables querying data directly from files on Amazon S3

which is the final step in the correct architecture.

Source: Amazon Redshift Database Developer Guide

"Getting started with Amazon Redshift Spectrum".

4. EC2 Spot Instances: The Amazon EC2 User Guide for Linux Instances explicitly states that Spot Instances are for fault-tolerant and flexible applications and can be interrupted.

Source: Amazon EC2 User Guide for Linux Instances

"Spot Instances"

Section: "What is a Spot Instance?".

Scroll to Top