How to use environment variables with a Lambda function? (and how to encrypt them with KMS)

preview_player
Показать описание
AWS Lambda: How to store a secret to an external API?

In this video we take a look at how secrets, private keys and passwords should be stored in a lambda function. First, we extract hardcoded secrets into environment variables, then we learn how to encrypt these variables using a key from KMS (Key Management Service) and how to decrypt them in the lambda function.

#lambda #kms #nodejs
Рекомендации по теме
Комментарии
Автор

I can't believe I just found your channel, I'm glad I did though!

soulofangel
Автор

Excellent video, Was not sure what environment variables with Lambda meant from text. I know now after watching this informative video. Thank you very much. Keep up the good work.

MiguelHernandez-dmeu
Автор

Awesome video, it helped me a lot. Good job my friend

EduardoBello
Автор

Good work. One question: If someone has access to this lambda function, he still can get the secret values by modifying the decrypt function and running the test. How to avoid that then?

kickerbm
Автор

Thank you for the clear explanation! a doubt, you mentioned that secrets saved in cache, this means that if the lambda is executed multiple times, the cost of kms will not exceed the free trial?

franciscageorgue
Автор

That is a great tutorial with a clear explanation.
Btw, I had a question about lambda services, and really appreciate it if you can address it,
" The Question that I want to encrypt my Script / Code that I posted on top of Lambda as function, so not everyone can see access and copy the script
. is it possible? if yes, how can I do that??

Thanks in advance

_auliayayan
Автор

Thank you! You briefly mentioned that you could change the environment variables based on whether we are running testnet or mainnet. Do we need to create separate lambda functions?

kaushikdr
Автор

Thank you I need this video thanks a lot ❤

bugsbunny
Автор

Can you please clarify me, if a hacker got access to the console, why would he bother to reading the encrypted string when he simply can just feed this encrypted strings(or secretName) to your github decryptSecret function to get the plain secrets.

firojsiddiki
Автор

Very useful! Can you try to implement same in python as well.

lakshmikanthreddy
Автор

Thanks for the great vid. Do you have a Python example?

utilisemedia
Автор

how can i set the environment variables that many functions use the same(commonly used)?

sichoi
Автор

KMS has min charge for 12$ a year for 1 single key. Why it is so expensive to store a key in KMS.

javascript_developer
Автор

any chance you have a python example of this video ?

georgelza
Автор

Hello sir nice tutorial .
i need this requirement. but any code for decrypt function in JAVA

ajayjayswal
Автор

I followed the whole process as explained in the video but still getting this error while decrypting >>> "errorType": "InvalidCiphertextException",

shivanishivu
Автор

Can we decrypt multiple keys in one API call?

SreenathV