Serverless Developer Guide
{ 
    public string FunctionHandler(string input, ILambdaContext context) 
    { 
        context.Logger.LogLine($"Transforming {input} to upper case"); 
        return input.ToUpper(); 
    }
}
Handlers in interpreted languages can be deployed directly through the web-based AWS 
Management Console. Compiled languages, such as Java and C#, or functions that use external 
libraries are deployed using .zip ﬁle archives or container images. Because of that additional 
process, this guide will focus on Python for examples.
Regardless of language, Lambda functions will generally return a response event on successful 
completion. The following program listing is an example response event to send back to API 
Gateway so that it can handle a request:
{ 
  "statusCode": 200, 
  "headers": { 
    "Content-Type": "application/json" 
   }, 
    "isBase64Encoded": false, 
    "multiValueHeaders": {  
      "X-Custom-Header": ["My value", "My other value"], 
    }, 
  "body": "{\n  \"TotalCodeSize\": 104330022,\n  \"FunctionCount\": 26\n}"
}
How to write logs with serverless applications
You might have noticed the logging statements in the preceding handler code. Where do those log 
messages go?
During invocation, the Lambda runtime automatically captures function output to Amazon 
CloudWatch.
In addition to logging your function's output, the runtime also logs entries when function 
invocation starts and ends. This includes a report log with the request ID, billed duration, 
Fundamentals 55