I want to make a query to elastic and send a sns message without raising a lambda function, is this possible with appsync?
3 Answers
You can invoke AWS services using the Appsync HTTP Resolver as explained in the docs here under "Invoking AWS Services". The SNS server has a REST API you can point the HTTP Resolver at in order to publish a message (see docs here).
This would avoid starting up a Lambda function.
Comments
I have built that recently for one of my customers and it took me some time to get it working as there is no documented approach on how to integrate AppSync with legacy AWS APIs.
Here is a step by step implementation guide: https://medium.com/@dlozitskiy/publish-messages-to-sns-topic-using-appsync-resolvers-with-http-datasources-7291cb040dab
Comments
If you want to send a message that is going to be applied to a velocity template then you will need a Lambda to process it, otherwise your other option is using SES which has built in template support