1. What is the primary purpose of the "Get Event Attendee Report" function within the Calendar Invite Server (CIS) Dashboard?
The "Get Event Attendee Report" function automates the process of retrieving a list of attendees for a specific event. It then compiles this data into a CSV format and dispatches the report via email to the event organizer. Its main goal is to streamline attendee reporting and improve event tracking efficiency.
2. Which AWS services are essential for the operation of the "Get Event Attendee Report" function?
The function relies on several key AWS services:
AWS Lambda: Executes the code responsible for generating the report.
Amazon DynamoDB: Stores all event and attendee-related data.
Amazon SES (Simple Email Service): Handles the sending of the generated CSV report to the organizer's email.
Amazon CodeCommit: Stores the email templates used for report notifications.
3. How does the system identify the event organizer's email address to send the report?
The system attempts to determine the organizer's email in two ways:
If attendees exist: It uses the mailto field of the first attendee found for the event.
If no attendees are found: It retrieves the organizer's email directly from the event record stored in DynamoDB.
4. What information is included in the CSV report generated for event attendees?
The CSV file contains detailed information about each attendee. Specifically, it includes the following fields: email, name, status, origin, and prodid.
5. How are event and attendee records structured and stored in Amazon DynamoDB?
DynamoDB utilizes a primary key consisting of a Partition Key (pk) and a Sort Key (sk) for efficient data retrieval.
Attendee Records: The pk is formatted as event#<uid> (where <uid> is the event's unique identifier), and the sk is attendee#<email>. This record stores RSVP status, email, and other event metadata for the attendee.
Event Records: Both the pk and sk are event#<uid>. This record primarily stores the organizer's email and general event metadata.
6. What happens if there's an error during the process of generating or sending the report, such as a missing event UID or an email sending failure?
The system implements specific error handling for various scenarios:
Missing Event UID: If the API request lacks a valid uid, the system logs an error and returns an HTTP 400 Bad Request response.
DynamoDB Query Failures: If fetching the attendee list from DynamoDB fails, the error is logged, but the execution of the function continues without interruption.
SES Email Sending Failures: If there's an issue sending the email via SES, the failure is logged, but the system does not attempt to retry sending the email.
File Handling Errors: The system ensures proper cleanup of any temporary files created to prevent storage issues.
7. What are some of the environmental variables required for the "Get Event Attendee Report" function to operate correctly?
Several environmental variables configure the function's behavior:
REGION: Specifies the AWS region for DynamoDB and SES operations.
DYNAMODB_TABLE: The name of the DynamoDB table where event and attendee data are stored.
LOCAL_CSV_FILE: A path template indicating where CSV reports are temporarily stored locally.
SUBJECT: The template for the email subject line of attendee reports.
SENDER: The email address used to send the reports.
ATTENDEE_REPORT_EMAIL: The AWS CodeCommit file path for the email template.
CODECOMMIT_REPO: The AWS CodeCommit repository where email templates are stored.
8. What is the overall benefit of using the "Get Event Attendee Report" function within the Calendar Invite Server (CIS) Dashboard?
The "Get Event Attendee Report" function provides a significant benefit by automating a traditionally manual and time-consuming task. By leveraging AWS serverless and managed services, it offers an efficient, scalable, and reliable solution for event organizers to quickly access and review attendee information, thereby enhancing event tracking and overall management within the Calendar Invite Server Dashboard.