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-Function with config-file and project-location issue

See original GitHub issue

Hi,

When calling dotnet deploy-function with a project-location set to a sub-directory and config-file specified, it falls back to using interactive prompts instead of using parameters from the file.

Example that works (current dir in app):

dotnet lambda deploy-function -cfg my-config-file.json

Example that doesn’t work (2 directories up):

dotnet lambda deploy-function -pl ./src/App -cfg ./src/App/my-config-file.json

This then prompts for the framework version:

Enter Framework: (Target framework to compile, for example netcoreapp2.1.)

The cfg file path seems correct, because if I deliberately make it wrong then I get an expected “Config file […] cannot be found”.

I can cd to the correct directory, but when running from a CI tool it’s much more useful to specify the path and stay in the root directory.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
normjcommented, Feb 26, 2019

I have reproduced the issue and taking a look into why it is happening.

1reaction
normjcommented, Mar 6, 2019

I just published version 3.1.3 of Amazon.Lambda.Tools which has this issue fixed. Something to note the value for -cfg needs to be relative to -pl.

Thanks for reporting the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Firebase functions config won't deploy
1 Answer 1 ... I resolved this by first swapping to the production project, setting variables, then deploying from there. ... Even though...
Read more >
Zip push deployment for Azure Functions
The code for all the functions in a specific function app is located in a root project folder that contains a host configuration...
Read more >
Deploying to Cloud Functions | Cloud Build Documentation
To deploy an application to Cloud Functions, use the following steps: In your project root directory, create the Cloud Build configuration file named ......
Read more >
Configure your environment | Cloud Functions for Firebase
When deploying a function with parameterized configuration variables, the Firebase CLI first attempts to load their values from local .env files.
Read more >
AWS SAM CLI configuration file
AWS SAM uses the following default configuration file settings: Name – samconfig . Location – At the root of your project. This is...
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