Boilerplate lambda function written in .Net Core
Find a file
2018-12-10 14:41:08 +00:00
src/lambda-dotnet-console Added Serilog and Seq 2018-12-10 14:41:08 +00:00
test/lambda-dotnet-console.Tests Added Serilog and Seq 2018-12-10 14:41:08 +00:00
.gitignore Initial Commit 2018-12-10 12:49:31 +00:00
docker-compose.yml Added Serilog and Seq 2018-12-10 14:41:08 +00:00
Readme.md Add dependency injection and settings 2018-12-10 13:58:31 +00:00

AWS Lambda .Net Core Console Example

This is a boilerplate function for those looking to create lambda functions with .Net Core.

This starter project consists of:

  • Function.cs - class file containing a class with a single function handler method
  • aws-lambda-tools-defaults.json - default argument settings for use with Visual Studio and command line deployment tools for AWS

You may also have a test project depending on the options selected.

The generated function handler is a simple method accepting a string argument that returns the uppercase equivalent of the input string. Replace the body of this method, and parameters, to suit your needs.

Here are some steps to follow to get started from the command line:

Once you have edited your template and code you can deploy your application using the Amazon.Lambda.Tools Global Tool from the command line.

Install Amazon.Lambda.Tools Global Tools if not already installed.

    dotnet tool install -g Amazon.Lambda.Tools

If already installed check if new version is available.

    dotnet tool update -g Amazon.Lambda.Tools

Execute unit tests

    cd "test/lambda-dotnet-console.Tests"
    dotnet test

Deploy function to AWS Lambda

    cd "src/lambda-dotnet-console"
    dotnet lambda deploy-function