forked from normj/LambdaNETCoreSamples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LambdaEntryPoint.cs
33 lines (32 loc) · 1.24 KB
/
LambdaEntryPoint.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using System.IO;
namespace CustomRuntimeAspNetCore30
{
/// <summary>
/// This class extends from APIGatewayProxyFunction which contains the method FunctionHandlerAsync which is the
/// actual Lambda function entry point. The Lambda handler field should be set to
///
/// CustomRuntimeAspNetCore::CustomRuntimeAspNetCore.LambdaEntryPoint::FunctionHandlerAsync
/// </summary>
public class LambdaEntryPoint :
// When using an ELB's Application Load Balancer as the event source change
// the base class to Amazon.Lambda.AspNetCoreServer.ApplicationLoadBalancerFunction
Amazon.Lambda.AspNetCoreServer.APIGatewayProxyFunction
{
/// <summary>
/// The builder has configuration, logging and Amazon API Gateway already configured. The startup class
/// needs to be configured in this method using the UseStartup<>() method.
/// </summary>
/// <param name="builder"></param>
protected override void Init(IWebHostBuilder builder)
{
builder
.UseStartup<Startup>();
}
}
}