[{"data":1,"prerenderedAt":63},["ShallowReactive",2],{"pattern-lambda-sns-terraform":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":12,"deploy":14,"description":18,"extension":19,"framework":20,"gitHub":21,"highlight":6,"introBox":27,"language":33,"level":34,"meta":35,"patternArch":36,"resources":49,"s3URL":6,"services":6,"stem":58,"testing":59,"videoId":6,"__hash__":62},"patterns\u002Fpatterns\u002Flambda-sns-terraform.json","AWS Lambda to Amazon SNS",null,{"headline":8,"text":9},"Cleanup",[10,11],"1. Delete the stack: \u003Ccode>terraform destroy\u003C\u002Fcode>.","2. Confirm the stack has been deleted: \u003Ccode>terraform show\u003C\u002Fcode>",[13],"content\u002Fcontributors\u002Fstephen-monaghan.json",{"text":15},[16,17],"terraform init","terraform apply","Create a Lambda function that publishes to an SNS topic","json","Terraform",{"template":22},{"projectFolder":23,"repoURL":24,"templateURL":25,"templateFile":26},"lambda-sns-terraform","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Flambda-sns-terraform","serverless-patterns\u002Flambda-sns-terraform","main.tf",{"headline":28,"text":29,"test":32,"text2":32},"How it works",[30,31],"The SAM template deploys a Lambda function, an SNS topic and the IAM permissions required to run the application. The Lambda function publishes a message to the SNS topic when invoked.","The AWS SAM template deploys the resources and the IAM permissions required to run the application.","","Node.js","100",{},{"icon1":37,"icon2":42,"line1":46},{"x":38,"y":39,"service":40,"label":41},20,50,"lambda","AWS Lambda",{"x":43,"y":39,"service":44,"label":45},80,"sns","SNS",{"from":47,"to":48,"label":32},"icon1","icon2",{"headline":50,"bullets":51},"Additional resources",[52,55],{"text":53,"link":54},"Choosing between messaging services for serverless applications.","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fcompute\u002Fchoosing-between-messaging-services-for-serverless-applications\u002F",{"text":56,"link":57},"Publishing Messages in Amazon SNS","https:\u002F\u002Fdocs.aws.amazon.com\u002Fsdk-for-javascript\u002Fv2\u002Fdeveloper-guide\u002Fsns-examples-publishing-messages.html","patterns\u002Flambda-sns-terraform",{"text":60},[61],"See the README in the GitHub repo for detailed testing instructions.","efGmnhyJNITeplbdSKfb5VwquQNeJMWafoOah-sJeJI",1779273337858]