I've created a small AWS Lambda that sends an email using SES. I'm looking to hookup a contact us form from a static website to this lambda.
Best How To :
Wrote a blog post about this.
This is totally doable. It's a matter of using AWS Cognito to call that function.
- You have your lambda function in place. Grand.
- Create a new Cognito group.
- Give the unauth'ed Cognito group permissions to execute the lambda function.
- Wire it all up in the browser. I have some example code here… https://github.com/chadbaudoin/lambda-twilio/blob/master/index.html
The “hard” part is making sure that the IAM settings for the Cognito group and the Lambda function are all set up correctly. I used this tutorial pretty heavily, but used cognito to execute so I wasn't exposing keys.