{"id":9990,"date":"2024-03-29T04:17:18","date_gmt":"2024-03-29T04:17:18","guid":{"rendered":"https:\/\/www.bacancytechnology.com\/qanda\/?p=9990"},"modified":"2024-03-29T04:17:54","modified_gmt":"2024-03-29T04:17:54","slug":"dotnet-lambda-package-ci-for-arm64","status":"publish","type":"post","link":"https:\/\/www.bacancytechnology.com\/qanda\/dot-net\/dotnet-lambda-package-ci-for-arm64","title":{"rendered":"How Do You &#8220;dotnet lambda package-ci&#8221; for arm64?"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>This document will help to create aws lambda project with command line interface and build and deploy project in arm64 environment.<\/p>\n<h2>Prerequisites<\/h2>\n<p>Before proceeding, ensure that you have the following prerequisites:<\/p>\n<ul>\n<li>.NET core CLI (Latest version preferred)<\/li>\n<li>AWS Lambda template for .NET<\/li>\n<li>AWS CLI configured with AWS credentials<\/li>\n<li>AWS Amazon.Lambda.Tools .NET Global CLI tools<\/li>\n<\/ul>\n<h3>Step 1: Open Command Line Interface<\/h3>\n<p>Open your preferred command-line interface with administrative privileges.<\/p>\n<h4>For Windows (PowerShell or Command Prompt):<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\">\r\n# Right-click and run as administrator for PowerShell\r\n# OR\r\n# Run as administrator for Command Prompt\r\n<\/pre>\n<h4>For Linux or macOS:<\/h4>\n<p>Open a terminal.<\/p>\n<h3>Step 2: Select Template for lambda project<\/h3>\n<p>To get the list of templates, type command \u201cdotnet new list\u201d It will list all the templates installed in the system for dotnet core.<\/p>\n<p>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.<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.bacancytechnology.com\/qanda\/wp-content\/uploads\/2024\/03\/pasted-image-0-2-1024x539.png\" alt=\"lambda project\" width=\"1024\" height=\"539\" class=\"alignnone size-large wp-image-9994\" srcset=\"https:\/\/www.bacancytechnology.com\/qanda\/wp-content\/uploads\/2024\/03\/pasted-image-0-2-1024x539.png 1024w, https:\/\/www.bacancytechnology.com\/qanda\/wp-content\/uploads\/2024\/03\/pasted-image-0-2-300x158.png 300w, https:\/\/www.bacancytechnology.com\/qanda\/wp-content\/uploads\/2024\/03\/pasted-image-0-2-768x404.png 768w, https:\/\/www.bacancytechnology.com\/qanda\/wp-content\/uploads\/2024\/03\/pasted-image-0-2-1536x808.png 1536w, https:\/\/www.bacancytechnology.com\/qanda\/wp-content\/uploads\/2024\/03\/pasted-image-0-2.png 1793w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<h3>Step 3: Create new lambda project<\/h3>\n<p>Let&#8217;s create a project with an empty template using the below command.<br \/>\n<code>dotnet new lambda.EmptyFunction --name myDotnetLambdaFunction<\/code><br \/>\n<img decoding=\"async\" src=\"https:\/\/www.bacancytechnology.com\/qanda\/wp-content\/uploads\/2024\/03\/pasted-image-0-3.png\" alt=\"Create new lambda\" width=\"1014\" height=\"84\" class=\"alignnone size-full wp-image-9995\" srcset=\"https:\/\/www.bacancytechnology.com\/qanda\/wp-content\/uploads\/2024\/03\/pasted-image-0-3.png 1014w, https:\/\/www.bacancytechnology.com\/qanda\/wp-content\/uploads\/2024\/03\/pasted-image-0-3-300x25.png 300w, https:\/\/www.bacancytechnology.com\/qanda\/wp-content\/uploads\/2024\/03\/pasted-image-0-3-768x64.png 768w\" sizes=\"(max-width: 1014px) 100vw, 1014px\" \/><\/p>\n<h3>Step 4: Update configuration details<\/h3>\n<p>Navigate to the \u201caws-lambda-tools-defaults.json\u201d file it will be located at<br \/>\n\u201cprojectname\\src\\projectname\u201d in our example \u201cmyDotnetLambdaFunction\\src\\myDotnetLambdaFunction\u201d<\/p>\n<p>Update \u201cfunction-architecture&#8221; property to arm64. There is option to configure other properties like run time, memory size, timeout, etc.<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.bacancytechnology.com\/qanda\/wp-content\/uploads\/2024\/03\/pasted-image-0-1-1.png\" alt=\"Update configuration\" width=\"973\" height=\"462\" class=\"alignnone size-full wp-image-9996\" srcset=\"https:\/\/www.bacancytechnology.com\/qanda\/wp-content\/uploads\/2024\/03\/pasted-image-0-1-1.png 973w, https:\/\/www.bacancytechnology.com\/qanda\/wp-content\/uploads\/2024\/03\/pasted-image-0-1-1-300x142.png 300w, https:\/\/www.bacancytechnology.com\/qanda\/wp-content\/uploads\/2024\/03\/pasted-image-0-1-1-768x365.png 768w\" sizes=\"(max-width: 973px) 100vw, 973px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction This document will help to create aws lambda project with command line interface and build and deploy project in arm64 environment. Prerequisites 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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":9991,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[20],"tags":[],"class_list":["post-9990","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dot-net"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/posts\/9990"}],"collection":[{"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/comments?post=9990"}],"version-history":[{"count":2,"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/posts\/9990\/revisions"}],"predecessor-version":[{"id":9998,"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/posts\/9990\/revisions\/9998"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/media\/9991"}],"wp:attachment":[{"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/media?parent=9990"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/categories?post=9990"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/tags?post=9990"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}