Company
Date Published
Author
Ricky Robinett
Word count
2062
Language
English
Hacker News points
None

Summary

In this post, Ricky Robinett shows how to supercharge Amazon Connect contact flows using AWS Lambda, Node.js, and Twilio. The author builds a contact flow that detects if a customer is calling from a mobile phone and sends their order details to them via SMS at the completion of the call. To achieve this, they use two Lambda functions: one for looking up the type of phone number (mobile, landline, or VoIP) using Twilio Lookup, and another for sending an SMS message with the order details. The author walks through setting up these functions, including creating a new role for each function, installing dependencies, and uploading the code to Lambda. They also cover integrating these functions into Amazon Connect contact flows in six steps: creating a new flow, playing a prompt, performing a number lookup, conditionally routing based on the type of number, sending a message, and wiring it all up. The author provides example test JSON for each function and demonstrates how to add permissions to each Lambda function using AWS CLI commands.