This document will help to create aws lambda project with command line interface and build and deploy project in arm64 environment.


Before proceeding, ensure that you have the following prerequisites:

  • .NET core CLI (Latest version preferred)
  • AWS Lambda template for .NET
  • AWS CLI configured with AWS credentials
  • AWS Amazon.Lambda.Tools .NET Global CLI tools

Step 1: Open Command Line Interface

Open your preferred command-line interface with administrative privileges.

For Windows (PowerShell or Command Prompt):

# Right-click and run as administrator for PowerShell
# OR
# Run as administrator for Command Prompt

For Linux or macOS:

Open a terminal.

Step 2: Select Template for lambda project

To get the list of templates, type command “dotnet new list” It will list all the templates installed in the system for dotnet core.

Lambda templates are starting with lambda keywords i.e. Lambda empty function, Lambda simple S3 function, Lambda empty serverless, You can select based on the need.
lambda project

Step 3: Create new lambda project

Let’s create a project with an empty template using the below command.
dotnet new lambda.EmptyFunction --name myDotnetLambdaFunction
Create new lambda

Step 4: Update configuration details

Navigate to the “aws-lambda-tools-defaults.json” file it will be located at
“projectname\src\projectname” in our example “myDotnetLambdaFunction\src\myDotnetLambdaFunction”

Update “function-architecture” property to arm64. There is option to configure other properties like run time, memory size, timeout, etc.
Update configuration

Support On Demand!