concept integration in category aws

appears as: integration, integration, integrations, n integration
AWS Lambda in Action: Event-driven serverless applications

This is an excerpt from Manning's book AWS Lambda in Action: Event-driven serverless applications.

In these two logging examples, we used the integration of AWS Lambda with Amazon CloudWatch Logs. Functions are executed without a default output device (in what is usually called a headless environment) and a default logging capability is given for each AWS Lambda runtime to ship the logs to CloudWatch. You can then use all the features provided by CloudWatch Logs, such as choosing the retention period or creating metrics from logged data. We’ll give more examples and use cases regarding logging in part 4.

To simplify complex configurations, instead of specifying each HTTP verb individually (such as GET, POST, PUT, and so on), you can use the ANY method that will trigger the integration for all kind of requests. The actual method used is passed in input to the function, so that the logic can be different depending on the HTTP verb used.

3.3. Creating the integration

You can now choose the integration type. The Amazon API Gateway can be integrated with different kinds of back ends, including legacy web services or mock implementations. To test the integration with AWS Lambda to implement a serverless back end, select Lambda Function.

Figure 7.15. You can serve web content from a Lambda function using the Amazon API Gateway and expose the function via HTTP GET. When configuring the integration, you need to be careful to return the right HTTP Content-Type; for example, text/html for HTML.