Q68 — AWS SAA-C03 Ch.16
Question 68 of 100 | ← Chapter 16
Q1268. 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 data. The solution must be highly available.Which solution will meet these requirements?
- 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. ✓
- 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 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
The most suitable solution for processing clickstream data from Kinesis, enriching it with customer data from Aurora, and analyzing it in Redshift while ensuring high availability (HA) and serverless efficiency is:Correct Answer: A. Use an AWS Lambda function to process and enrich the clickstream data. Use the same Lambda function to write the enriched data to Amazon S3. Use Amazon Redshift Spectrum to query the enriched data in Amazon S3.Why Option A is Best:Serverless & Highly Available:AWS Lambda is inherently HA (runs across multiple AZs) and scales automatically with Kinesis throughput. No server management required (unlike EC2 Spot or ECS Fargate Spot, which can be interrupted).Efficient Data Enrichment:Lambda can poll Kinesis Data Streams, fetch customer profile data from Aurora Multi-AZ (via RDS Proxy for connection pooling), and enrich the clickstream records. Enriched data is written to Amazon S3 (durable, scalable, and cost-effective).Seamless Redshift Analysis:Redshift Spectrum allows querying S3 data directly without loading into Redshift clusters (reduces storage costs).If deeper analytics are needed, enriched data can be loaded into Redshift via COPY commands (though Spectrum is sufficient for many use cases).Cost-Effective:Pay-per-use pricing (Lambda, S3, Spectrum) avoids idle resource costs.No need for always-on EC2/ECS instances.Why Other Options Are Less Suitable: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. Not HA: Spot instances can be terminated abruptly, risking data loss or requiring complex retry logic. Operational overhead: Manual management of scaling, failover, and Aurora connections. Higher cost if running 24/7 (vs. Lambda's pay-per-use model). C. Use an 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.Spot interruptions risk HA: Fargate Spot can be terminated, requiring checkpointing/restart logic. Mixed architecture: Using ECS + EC2 adds complexity (vs. fully serverless Lambda). Still requires manual scaling/management for the EC2 COPY step. D. Use Amazon 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.No enrichment step: Firehose cannot join data with Aurora customer profiles (requires Lambda for enrichment).Athena vs. Redshift: The requirement specifies Redshift for analysis, not Athena (though Spectrum in Option A bridges this gap).Less efficient for joined datasets: Athena queries raw S3 data, which may lack enriched context.High Availability Considerations:ComponentOption A (HA?)Option B/C (HA?)Data ProcessingLambda (multi-AZ) Spot (risk of termination) Data StorageS3 (multi-AZ)Redshift (Multi-AZ) Query LayerSpectrum (serverless) Depends on Redshift uptimeConclusionOption A is the best choice because:Fully serverless & HA (Lambda + S3 + Spectrum).Efficiently enriches data by joining Kinesis and Aurora.Cost-effective (pay only for compute used).Meets Redshift analysis requirement (via Spectrum or optional COPY to Redshift).Final Answer: A