An Interest In:
Web News this Week
- August 17, 2024
- August 16, 2024
- August 15, 2024
- August 14, 2024
- August 13, 2024
- August 12, 2024
- August 11, 2024
Trigger a Typescript AWS Lambda on Receiving an Email with SES
In this blog post, well discuss how to trigger a Typescript AWS Lambda function when you receive an email in AWS SES. Well be using SST V2 in this example, but its easily convertible to CDK if needed.
As a prerequisite, youll need to set up a verified identity and inbound rule in Route 53 for this to work. The docs found here are pretty straightforward.
Infrastructure as Code (IAC)
First, we need to set up the stack and IAC for the inbound rule and function.
Ensure to change the inbound domain and function path to fit your project. This will route all traffic from the domain to your lambda function.
We also need to go into the console and mark this inbound rule as active. Note you can only have one active rule per region per account but nothing is stopping you from adding more domains to the recipients array. Well cover how to route to your desired operation below.
AWS Lambda Typescript Handler
Next, we need to set up the handler to perform whatever operation we need.
With this function, we can perform whatever operation we need within our Typescript code.
Thanks for reading!
Original Link: https://dev.to/kieronjmckenna/trigger-a-typescript-aws-lambda-on-receiving-an-email-with-ses-1l5m
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To