1

I cretaed a http proxy method in my API Gateway to a remote CRM system I need to send data to. The thing is that the CRM return all its responses as 200, and notifies for success or failure inside the response body, for example :

enter image description here

Hi wish to know, if there is any way inside the method to check the response using lambda function and change the status code accordingly.

1 Answer 1

1

You will have to modify your lambda to change the response and include an error message to model in API Gateway. This blog post is a great resource for configuring these mappings.

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

4 Comments

It's not a lambda, it's a http proxy method
@MatanKadosh You asked how to check the response via a lambda function and change the status code, the blog I linked answers the second half. The first half would be dependent on what language you write your lambda in.
Hi, what i ment is that currently that method is used as a http proxy, what i needed to know if there is a way to insert the lambda function aftert that request is done
No, there is no way to have a lambda run after your integration. It would have to act as a proxy.

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.