Convert C# AWS Lambda from .NetCore 3.1 to 6.0

Job ID: 35993094

Budget: $15 – $25 USD

I am moving the application that you worked on to DotNet Framework 6.0. When I run the command.

Must be familiar with AWS CLI

dotnet tool install -g Amazon.Lambda.Tools --framework netcoreapp6.0 --version 6.0

I get the following results:

C:\Users\jrewc\AppData\Local\Temp\85bc4658-ff09-40ec-adde-32a2ed136d84\restore.csproj : error NU1301: Failed to retrieve information about 'amazon.lambda.tools' f
rom remote source 'https://nuget.org/FindPackagesById()?id='amazon.lambda.tools'&semVerLevel=2.0.0'.
The tool package could not be restored.
Tool 'amazon.lambda.tools' failed to install. This failure may have been caused by:

* You are attempting to install a preview release and did not use the --version option to specify the version.
* A package by this name was found, but it was not a .NET tool.
* The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
* You mistyped the name of the tool.

For more reasons, including package naming enforcement, visit https://aka.ms/failure-installing-tool

C:\Projects\...dotnet lambda package --configuration Release --framework netcoreapp6.0 --output-package bin/Release/netcoreapp6.0/deploy-package.zip
You must install or update .NET to run this application.

App: C:\...\packages\amazon.lambda.tools\2.2.0\lib\netcoreapp2.0\dotnet-lambda.dll
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '2.0.0' (x64)
.NET location: C:\Program Files\dotnet\

The following frameworks were found:
3.1.32 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
6.0.13 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
7.0.2 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]


AWS Version
aws-cli/2.7.30 Python/3.9.11 Windows/10 exe/AMD64 prompt/off
I have included the entire project, I would like for you to explain what I am doing wrong. I am installing everything using aws cli



Listing of serverless.yml
org: ....
app:...
service: ...

frameworkVersion: '2'

provider:
name: aws
runtime: dotnetcore6.0
lambdaHashingVersion: 20201221
stage: prod
region: us-west-2

iamRoleStatements:
- Effect: "Allow"
Action:
- "logs:CreateLogGroup"
- "logs:CreateLogStream"
- "logs:PutLogEvents"
Resource:
- "*"
- Effect: "Allow"
Action:
- "ec2:CreateNetworkInterface"
- "ec2:DescribeNetworkInterfaces"
- "ec2:DetachNetworkInterface"
- "ec2:DeleteNetworkInterface"
Resource:
- "*"
vpc:...
securityGroupIds:
...
subnetIds:
- subnet-...
- subnet-...

package:
individually: true
artifact: bin/Release/netcoreapp6.0/deploy-package.zip

functions:
order:
handler: CsharpHandlers::ServerlessFunctions.OrderHandler::OrderHandle
description: Description to publish to AWS
timeout: 900 # optional, in seconds, default is 6
events:
- http:
path: orderservice
method: get
cors: true
- schedule:
rate: rate(45 minutes)
enabled: true

shipment:
handler: CsharpHandlers::ServerlessFunctions.OrderHandler::ShipmentHandle
description: Description to publish to AWS
timeout: 600 # optional, in seconds, default is 6
events:
- http:
path: shipmentservice
method: get
cors: true
- schedule:
rate: rate(60 minutes)
enabled: true

piiclear:
handler: CsharpHandlers::ServerlessFunctions.OrderHandler::PIIClearHandle
description: Description to publish to AWS
timeout: 600 # optional, in seconds, default is 6
events:
- http:
path: piiclearservice
method: get
cors: true
- schedule:
rate: cron(0 12 * * ? *)
enabled: true

downloadinventory:
handler: CsharpHandlers::ServerlessFunctions.OrderHandler::DownloadInventoryHandle
description: Description to publish to AWS
timeout: 600 # optional, in seconds, default is 6
events:
- http:
path: downloadinventoryservice
method: get
cors: true
- schedule:
rate: cron(0 12 * * ? *)
enabled: true