[{"data":1,"prerenderedAt":68},["ShallowReactive",2],{"pattern-appsync-sns-cdk":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":13,"deploy":15,"description":20,"extension":21,"framework":22,"gitHub":23,"highlight":6,"introBox":32,"language":36,"level":37,"meta":38,"patternArch":39,"resources":52,"s3URL":6,"services":61,"stem":62,"testing":63,"videoId":31,"__hash__":67},"patterns\u002Fpatterns\u002Fappsync-sns-cdk.json","AWS AppSync to Amazon SNS",null,{"headline":8,"text":9},"Cleanup",[10,11,12],"1. Delete the stack: \u003Ccode>npx cdk destroy\u003C\u002Fcode>.","2. Confirm the stack has been deleted: \u003Ccode>aws cloudformation list-stacks --query \"StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus\"\u003C\u002Fcode>.","3. You see a message confirming DELETE_COMPLETE.",[14],"content\u002Fcontributors\u002Fbrice-pelle.json",{"text":16},[17,18,19],"npm i","npm run build","cdk deploy","Create an AppSync GraphQl API that sends messages to an SNS topic","json","AWS CDK",{"template":24,"payloads":29},{"projectFolder":25,"repoURL":26,"templateURL":27,"templateFile":28},"cdk-appsync-sns","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fcdk-appsync-sns","serverless-patterns\u002Fcdk-appsync-sns","cdk\u002Flib\u002Fmain.ts",[30],{"headline":31,"payloadURL":31},"",{"headline":33,"text":34},"How it works",[35],"The CDK template creates an AppSync API with an Amazon SNS as HTTP data source. An SNS topic is created, along with an IAM role that provides the AppSync API permission to publish messages to that specific topic. Using the publish query, you can add a message to the topic.","Node.js","300",{},{"icon1":40,"icon2":45,"line1":49},{"x":41,"y":42,"service":43,"label":44},20,50,"appsync","AWS AppSync",{"x":46,"y":42,"service":47,"label":48},80,"sns","SNS",{"from":50,"to":51,"label":31},"icon1","icon2",{"headline":53,"bullets":54},"Additional resources",[55,58],{"text":56,"link":57},"Simplify access to multiple microservices with AWS AppSync and AWS Amplify","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fmobile\u002Fappsync-microservices\u002F",{"text":59,"link":60},"HTTP resolvers","https:\u002F\u002Fdocs.aws.amazon.com\u002Fappsync\u002Flatest\u002Fdevguide\u002Ftutorial-http-resolvers.html",{"from":43,"to":47},"patterns\u002Fappsync-sns-cdk",{"headline":64,"text":65},"Testing",[66],"See the GitHub repo for detailed testing instructions.","w9A-sNRBc_RgrmsiK6sQ3CRGmN_70DrangN1JPvUKRE",1781519739902]