Skip to content

Error: "Cant find [Assembly].deps.json" (but it exists) #854

@SeanKilleen

Description

@SeanKilleen

Hi all,

Newer to AWS & Lambdas but I think I may have come across a problem. Hoping it's something I'm doing.

Setup / Versions

  • I have an API gateway that proxies to a Lambda whose code is storied in an S3 bucket for the code -- api gateway, lambda, and bucket deployed via terraform
  • The API gateway references a code.zip file in the S3 bucket.
  • I am using the dotnet global tool "amazon.lambda.tools" v5.1.0
  • I am using aws cli v2.1.29

Description

Reproduction Steps

  • Created a new web API project: dotnet new serverless.AspNetCoreWebAPI
  • Updated the handler function in the API gateway to match that specified in the project that is created above
  • Run dotnet restore, dotnet build
  • Run dotnet lambda package code.zip
  • Verified that [AssemblyName].deps.json exists at the root of the zip file.
  • Upload the zip file to the S3 bucket that feeds the API gateway lambda
  • Test the API via the management console

Expected behavior: see the default response for the /api/values route
Actual behavior: See an error: "Could not find the required 'LbsApi.deps.json'. This file should be present at the root of the deployment package." (this file is in the root of the zip file).

Environment

  • Build Version: Amazon.Lambda.AspNetCoreServer v5.3.1
  • Dotnet global tool: amazon.lambda.tools v5.1.0
  • OS Info: Windows 10
  • Build Environment: Terminal dotnet
  • Targeted .NET Platform: netcoreapp3.1

Resolution

  • 👋 I can/would-like-to implement a fix for this problem myself

This is a 🐛 bug-report

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.module/aspnetcore-supportresponse-requestedWaiting on additional info and feedback. Will move to close soon in 7 days.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions