In this step we will use the Amazon.Lambda.Tools, to deploy our Lambda to API Gatway.
From the the Cloud9 terminal window, we will need to run the serverless deployment command. Make sure you are in the same directory location as the “aws-lambda-tools-defaults.json” file, then run this command:
dotnet lambda deploy-serverless
That will build and deploy the .Net Core application. Once the deployment is complete. The CLI will return a url end point that can be used to manually test the lambda.
The url should return a json file like this:
{
"Calls":3,
"ElapsedTime":"00:00:00.0189810",
"ElapsedTimeMilli":"18",
"IPAddress":"10.0.3.249",
"LamCalls":0,
"LamElapsedTime":"00:00:00.0190611",
"LamElapsedTimeMilli":"19.0611"
}