This is sample project for serverless contact us form. It uses AWS CDK for deployment.
- API Gateway
- Lambda
- SNS
-
git clone https://github.com/rahulrkr08/aws-sls-cdk-contact-us-form.git
-
Change your email ID in
./lib/contact-us-stack.ts
-
Deploy your stack using AWS CDK
cdk deploy
-
Confirm SNS email verification
-
curl -x POST -d '{ "message": { "Name": "Customer name", "Email": "email@email.com", "Subject": "sample subject", "Message": "sample message"}}' https://<api gateway id>.execute-api.<region>.amazonaws.com/prod/contactus
npm run build
compile typescript to jsnpm run watch
watch for changes and compilenpm run test
perform the jest unit testscdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk synth
emits the synthesized CloudFormation template