Integrate an API with lambda - Part 4


In this part of the blog we will cover the section Integration Request in detail. In the below screenshot we can see two kinds of integration request involving lambda as back end service. The first one uses lamba function where as second one uses lambda proxy

There are multiple options in this section. Most commonly used ones are lambda and mock. Lambda is default option selected



Mock option is used when we want API gateway to provide response based on mappings and transformation. It is also the choice when implementing options. Options http method invocation will be used to understand the various method the resource provides along with CORS details.


HTTP option is used when we want to make request to another existing end point. We can provide the existing endpoint url in the text box available. This configuration also provides an option to use proxy setting. We could also make method transformations here. For example if the incoming request is a get end point, we could make http call to existing service as a post passing the parameters available for the endpoint as body using transformation. There is also option to convert the input to text if required. Default option is passthrough.



 we could use one of several AWS services available in the drop down as back end. In the above screenshot we have step function as the service. There are lot of options for this field. Based on the use case we could have a notification service (SNS) or cloudwatch event or S3 event triggered as most of them are API calls.

The last option is VPC link which again has option to be used as proxy. 


Comments

Popular posts from this blog

Integrate an API with lambda - Part 5

Custom authorizer

Integrate an API with lambda - Part 3