Skip to content

Instantly share code, notes, and snippets.

@thebeebs
Created May 21, 2020 16:00
Show Gist options
  • Save thebeebs/4acba73e61cf67fbda838f1d34083f99 to your computer and use it in GitHub Desktop.
Save thebeebs/4acba73e61cf67fbda838f1d34083f99 to your computer and use it in GitHub Desktop.
Lambda Injection Prototype
[InjectDelayPolicy]
public async Task<APIGatewayProxyResponse> FunctionHandler(APIGatewayProxyRequest apigProxyEvent,
ILambdaContext context)
{
var location = await GetCallingIP();
var body = new Dictionary<string, string>
{
{"message", "hello world"},
{"location", location}
};
return new APIGatewayProxyResponse
{
Body = JsonConvert.SerializeObject(body),
StatusCode = 200,
Headers = new Dictionary<string, string> {{"Content-Type", "application/json"}}
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment