Skip to main content

02-AWS Cloud Service Architecture - rejected

Diagram

Goal

This is a fully cloud-based solution that uses AWS Step Functions to orchestrate workflows. This significantly simplifies integration, as it provides us with a robust set of monitoring and traceability tools, which are essential for supervising every step of the process.

How It Works

  • The workflow begins when a client starts an AWS Step Functions execution. The first step invokes an AWS Lambda function to validate the request data. This function ensures that the necessary information, such as the recipients' email addresses and template identifiers, is correct and complete. If the validation fails, the flow stops and Step Functions logs the error. If the data is valid, the process continues to the next step.

  • A second AWS Lambda function is triggered to retrieve the email template. It uses the template identifier provided in the initial request to search for and download the template file from an Amazon S3 bucket. This function is crucial for separating the business logic (the code) from the email content (the template), making it easier to update messages without modifying the function's code.

  • The third AWS Lambda function takes the validated data from the first step and the retrieved template from the second. With this information, it uses the Amazon Simple Email Service (SES) to compose and send the email to the recipient(s). SES handles the delivery, management of the sender's reputation, and the handling of bounces and complaints.

  • Once the email has been sent, the workflow execution advances to a final AWS Lambda function. This function logs the sending result (success, error, date, etc.) in an Amazon DynamoDB table. This event log is fundamental for traceability and allows for building a custom dashboard to monitor the status of email sends in real time.

Considerations

We should keep in mind that the complexity of this solution is high, especially for a team without prior experience in AWS Step Functions. Furthermore, it is limited by external services, which would force us to build an entire workflow with AWS services.

Cost table aproximate

AmountMonthly costTotal 12 months cost
1000$ 51.29$ 795.48
10000$ 276.29$ 3,495.48
100000$ 2,526.29$ 30,495.48