Error While deploying .NET 8 Lambda with AOT .: The /var/task directory is missing the required .deps.json file

We are trying to deploy a .NET 8 Lamda with AOT. The publish command is

dotnet publish ******.csproj -c Release -r linux-x64 --self-contained -p:PublishAot=true -p:PublishTrimmed=true -p:TieredCompilation=false -p:OptimizationPreference=Speed  -p:GenerateRuntimeConfigurationFiles=true 

The publish works, but when we try to invoke , we get the error

Error: .NET binaries for Lambda function are not correctly installed in the /var/task directory of the image when the image was built. The /var/task directory is missing the required .deps.json file.

Any suggestions on how to fix the issue

Regards Sabarish