Comments (6)
Hi.
I suggest to use handlename/ssmwrap for the workaround.
ssmwrap can look up values in the SSM parameter store and run a specified command with environment variables that are set by these values.
$ ssmwrap --names /path/to/foo -- sh -c 'echo $FOO'
value of foo
And SecretManager's secrets can be read via SSM parameter store with the prefix '/aws/reference/secretsmanager'.
So, by these methods, you can run lambroll with environment variables from SecretsManager.
$ ssmwrap --names /aws/reference/secretsmanager/mysecret -- lambroll ...
function.json
{
"Environment": {
"Variables": {
"MYSECRET": "{{ must_env `MYSECRET` }}"
}
},
// ...
}
But, this solution is complex a little.
I'm planning to introduce ssm
template function, the same as ecspresso.
https://github.com/kayac/ecspresso#ssm
from lambroll.
@miztch But, I don't recommend setting secrets into Lambda environment variables directly.
Secrets are exposed as plain text if someone can read the lambda function configuration.
If you try this method, please consider that risk.
from lambroll.
Thank you for your immediate reply! I will try the workaround you suggested.
Also, I am already aware of the security risks you pointed out. Thanks for this one as well.
I will also tell my application engineer to eventually modify the code to get it in the function code, as I do not think it is appropriate to include plain text values in environment variables.
from lambroll.
Thank you for the other day.
In my project, I found it difficult to retrieve the secret value using ssmwrap because the secret value was not just a value, but a key/value pair. So I solved this issue by implementing a little custom script.
Therefore I am willing to let you close this issue.
Since we are considering managing these secret values with SSM, there may be an opportunity to use the SSM plugin you implemented in #319. Thanks again for listening to my voice 🙏
from lambroll.
Related Issues (18)
- [Request] Show Cloudwatch logs of the Lambda in function.json HOT 3
- Ignore `--region` option when use with `--tfstate` option HOT 2
- error on refer tfstate in different region from deploy target HOT 2
- Allow to create an alias to unpublished lambda version HOT 4
- lambroll does not respect AWS shared config HOT 1
- Unable to init a function which have PackageType=Image.
- request: keep zip archives when dry-run is enabled HOT 1
- Unexpected success messages appear when it tries to deploy the Image runtime function HOT 2
- diff CodeSha256 HOT 1
- new version release? HOT 2
- ignore change option HOT 8
- Nil pointer error appears at v0.14.0 HOT 1
- lambroll deploy doesn't catch errors from lambda HOT 3
- Add ssm template function.
- The lambroll deploy command exits before the function code update is successful HOT 7
- Add the installation guide with aqua to the document
- Panic when invoking function with --async option
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lambroll.