Question #1070
A company operates a REST API that tracks daily sales data. They need to generate a report every evening, format it into HTML, and distribute it via email to multiple recipients. Which combination of steps should be taken to meet these requirements? (Choose two.)
Configure the API to send data to Amazon Kinesis Data Firehose for delivery to Amazon S3.
Use Amazon SES to format the report and send emails.
Schedule an AWS Glue job via Amazon EventBridge to fetch data from the API.
Use Amazon EventBridge to trigger a Lambda function that retrieves data from the API.
Store data in Amazon S3 and use an SNS topic to notify subscribers via email.
Explanation
To meet the requirements:
- D (EventBridge triggers Lambda): A scheduled EventBridge rule can invoke a Lambda function daily. The Lambda retrieves data from the REST API, processes it into a report, and formats it as HTML.
- B (SES sends emails): SES handles email distribution, including HTML content. Lambda uses SES to send the formatted report to recipients.
Why others are incorrect:
- A: Kinesis Firehose is for real-time streaming, not batch processing.
- C: Glue is better for ETL on stored data (e.g., S3), not directly fetching from APIs.
- E: SNS sends notifications but cannot distribute HTML reports via email.
Key Points:
- Use EventBridge for scheduling.
- Lambda handles API interaction and processing.
- SES manages email distribution with HTML support.
Answer
The correct answer is: BD