1

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 3

1

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.

Sign up to request clarification or add additional context in comments.

Comments

1

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

0

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

3 Comments

I want to send a message to process another action, but I do not want to raise a lambda just for that, I want to eliminate the lambda cold start
Are you running a Java lambda? If yes then maybe consider writing the lambda in Nodejs/python, then cold start won't really be an issue (it still takes time to spin up the first instance, but nothing close to what it takes for a java lambda). This should be relatively simple to do if all the lambda is doing is passing along a message.
only a elastic resolver with appsync using serverless, but I want to send a sns message too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.