Ravindra BagaleCourses & study guides मराठी Track your progress

Ravi Sir's Cards › AWS

Contact form API with SNS

What is a VPC: your own private network inside one AWS Region, example ThreeTierVpc 10.0.0.0/16.

Contact form API with SNS Every business site has a Contact Us box. Email-only forms lose messages; you want a saved row plus an alert. API Gateway accepts POST. Lambda writes the message to DynamoDB and publishes to an SNS topic that emails you. Create table (PK messageId), SNS topic + email subscription, Lambda with PutItem + sns:Publish, HTTP API POST /contact. curl POST {
Contact form API with SNS · Download PNG
Read card text

What this card says

Why do we need it?

Every business site has a Contact Us box. Email-only forms lose messages; you want a saved row plus an alert.

What is it?

API Gateway accepts POST. Lambda writes the message to DynamoDB and publishes to an SNS topic that emails you.

How to do it

Create table (PK messageId), SNS topic + email subscription, Lambda with PutItem + sns:Publish, HTTP API POST /contact.

yourname-contact

Example

curl POST {"name":"Ravi","email":"a@b.com","msg":"Hi"} → 201, DynamoDB row, and an email in your inbox.

See all AWS revision cards