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:
Open your preferred command-line interface with administrative privileges.
# Right-click and run as administrator for PowerShell # OR # Run as administrator for Command Prompt
Open a terminal.
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.
Let’s create a project with an empty template using the below command.
dotnet new lambda.EmptyFunction --name myDotnetLambdaFunction
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.