[{"data":1,"prerenderedAt":36},["ShallowReactive",2],{"snippet-apigateway-sns-integration-mapping-template":3},{"id":4,"title":5,"contributors":6,"description":8,"extension":9,"gitHub":10,"introBox":13,"languages":21,"meta":23,"resources":24,"services":25,"snippets":28,"stem":32,"tags":33,"type":34,"__hash__":35},"snippets\u002Fsnippets\u002Fapigateway-sns-integration-mapping-template.json","Mapping template for API Gateway with SNS integration",[7],"content\u002Fcontributors\u002Fpallavi-bhat.json","Provides a mapping template for API Gateway and SNS integration","json",{"template":11},{"repoURL":12},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-snippets\u002Ftree\u002Fmain\u002Fapigateway-sns-integration-mapping-template",{"headline":14,"text":15},"How it works",[16,17,18,19,20],"This snippet can be used to publish messages to an existing SNS topic.","When creating the integration, ensure to have the below configuration to use the mapping template:","1. For Path override the value must be given as '\u002F' ","2. The header 'Content-Type' should have the value 'application\u002Fx-www-form-urlencoded' (include the single quotes in the value)","3. IAM role with appropriate sns:publish IAM permission",[22],"vtl",{},null,[26,27],"apigw","sns",[29],{"title":30,"language":22,"code":31},"Use the following mapping template","#set($topic=\"arn:aws:sns:&#60;region&#62;:&#60;account-number&#62;:&#60;topic-name&#62;\")\nAction=Publish&TopicArn=$util.urlEncode($topic)&Message=$input.json('$')","snippets\u002Fapigateway-sns-integration-mapping-template",[],"Integration","FUBbWOdwV7YHq3M1jOvrt39movQYHsVLcKWbbDk2R3k",1792578863890]