Company
Date Published
Author
Raphael Londner
Word count
2235
Language
English
Hacker News points
2

Summary

The AWS Step Functions state machine integrates MongoDB Atlas, Twilio, and AWS Simple Email Service to notify users about restaurants based on search criteria provided by a calling application. The state machine uses Lambda functions to query the MongoDB Atlas database, count the number of matching restaurants, and determine whether to send an email or SMS notification to the user. The design and architecture choices include using the aggregation framework queries in MongoDB to filter the restaurants dataset, appending the result of one task to the input of another task, and overriding the InputPath parameter to make a Lambda function agnostic to any JSON schema. The state machine is created by setting up the Lambda functions, creating the Step Functions state machine JSON file, and deploying it using the AWS console.