question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

deploy-serverless is packaging files from the wrong location

See original GitHub issue

I would like to store my templates outside of the .NET solution folder, but can’t find a way to do that.

When using dotnet lambda deploy-serverless --template "C:/foo/template.yaml" --project-location "C:/bar/Project.Web", the command deploys a zip containing the files in C:/foo (i.e. the deployment template).

Is this an expected behavior?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
madmoxcommented, Feb 7, 2020

OK, I found a workaround after a bit of fiddling. Instead of using a single deploy-serverless command, use the following:

dotnet lambda package `
    --project-location $ProjectLocation `
    --configuration "Release" `
    --framework "netcoreapp2.1" `
    --output-package $PackageFilePath

dotnet lambda deploy-serverless `
    --package $PackageFilePath `
    --profile $AwsProfile `
    --region $AwsRegion `
    --s3-bucket $S3Bucket `
    --s3-prefix $S3Prefix `
    --stack-name $StackName `
    --template $TemplateFilePath `
    --template-parameters $TemplateParameters
0reactions
madmoxcommented, Sep 17, 2020

Don’t know if the issues are still present, we are using the 2-steps deployment workaround mentioned in this post now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Serverless Framework - Packaging
Using the Serverless CLI tool, you can package your project without deploying it to AWS. This is best used with CI / CD...
Read more >
Deploy is using the wrong path to read serverless-state.json
The deploy command expects to receive a relative path to the current folder and especially in a .serverless folder. If the file serverless-state ......
Read more >
Serverless Framework with custom packaging
I'm using the Serverless Framework and I can't seem to package my functions the way I want. My current folder directory looks like...
Read more >
specify which serverless.yml file to deploy
To specify which .yml file I want to deploy so I don't have to change the names to serverless.yml. sls deploy --file serverless-1.yml...
Read more >
Top 10 Serverless Deployment Errors (and How to Fix Them)
The cause: ... This will happen if you have an aws-profile environment parameter in the .stackery.config.yaml file in your root directory. The ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found