New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Best practices for handling production vs development variables #33
Comments
not sure if this is 'best practice', but my current practice is:
|
In our particular use case, our events are triggered by an SNS notification and in development they are going to be making API calls either into a live environment (production) or a sandboxed one (development), so we can't really pass in something like an S3 bucket. For |
alias is "production", if you invoke it with |
Oh, ok, this seems inconsistent with the docs, but I'll test it out and see what happens. Thanks. |
sorry, just read that more carefully, you are right. the stuff you can use is the |
Here's an example showing how you can detect the alias: https://github.com/claudiajs/example-projects/tree/master/detecting-context |
Great, thanks. Hopefully Lambda will support environment variables at some point. |
is 2019,. and not sure if this is still the case, but I'm a bit lost how can I use dotenv instead of .json files as claudia docs says. Any thoughts? |
I know that claudia can handle the deployment of different versions of code, but what is the best practice for deploying a production or a development version of the app that needs to, say, connect to a different backend service depending on which environment it is running in? A typical 12factor solution might be to use environment variables, but this really isn't supported in Lambda. How would you recommend approaching this?
EDIT: I know that API Gateway has stage variables, but it doesn't seem like Lambda has the same thing. claudiajs/claudia-api-builder#9
The text was updated successfully, but these errors were encountered: