Тёмный

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

BiteSize Academy
Подписаться 4,7 тыс.
Просмотров 17 тыс.
50% 1

AWS Lambda: How to store a secret to an external API?
⚡️ Blog post and source code: www.undefineda...
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.
⭐️ Subscribe for more content: newsletter.und...
#lambda #kms #nodejs

Наука

Опубликовано:

 

5 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 30   
@MiguelHernandez-dm5eu
@MiguelHernandez-dm5eu 4 года назад
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.
@soulofangel1990
@soulofangel1990 3 года назад
I can't believe I just found your channel, I'm glad I did though!
@kickerbm0821
@kickerbm0821 3 года назад
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?
@_auliayayan5887
@_auliayayan5887 2 года назад
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
@lakshmikanthreddy2402
@lakshmikanthreddy2402 4 года назад
Very useful! Can you try to implement same in python as well.
@firojsiddiki2750
@firojsiddiki2750 3 года назад
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.
@franciscageorgue2207
@franciscageorgue2207 2 года назад
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?
@EduardoBello7
@EduardoBello7 3 года назад
Awesome video, it helped me a lot. Good job my friend
@kaushikdr
@kaushikdr 3 года назад
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?
@kumarprmshvm565
@kumarprmshvm565 3 года назад
Awesome Explanation
@juanbg100
@juanbg100 2 года назад
thanks lot dude! super helpful video!
@rhinoreign1324
@rhinoreign1324 2 года назад
Very helpful, thank you very much!
@Gabhane123
@Gabhane123 4 года назад
Very helpful Video ! Keep it up !
@utilisemedia
@utilisemedia 3 года назад
Thanks for the great vid. Do you have a Python example?
@BiteSizeAcademy
@BiteSizeAcademy 3 года назад
There are some Python examples for env variables in the aws docs: docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html I don't know Python but the api should be similar.
@utilisemedia
@utilisemedia 3 года назад
@@BiteSizeAcademy thanks but not like you’re fancy pants utils file 😉
@bugsbunny3354
@bugsbunny3354 Год назад
Thank you I need this video thanks a lot ❤
@javascript_developer
@javascript_developer Год назад
KMS has min charge for 12$ a year for 1 single key. Why it is so expensive to store a key in KMS.
@samitkapadia7414
@samitkapadia7414 3 года назад
Thanks this was great!
@rakibulhasanofficial5057
@rakibulhasanofficial5057 Год назад
many many thanks
@georgelza
@georgelza Год назад
any chance you have a python example of this video ?
@UdayShivamurthy
@UdayShivamurthy 3 года назад
Precious!!! thanks a lot
@danieljing9319
@danieljing9319 4 года назад
very useful content
@ajayjayswal5335
@ajayjayswal5335 4 года назад
Hello sir nice tutorial . i need this requirement. but any code for decrypt function in JAVA
@sichoi6297
@sichoi6297 2 года назад
how can i set the environment variables that many functions use the same(commonly used)?
@shivanishivu1692
@shivanishivu1692 4 года назад
I followed the whole process as explained in the video but still getting this error while decrypting >>> "errorType": "InvalidCiphertextException",
@parthasarathymurali3942
@parthasarathymurali3942 3 года назад
Add the EncryptionContext as your lambda function name as below: const req = { CiphertextBlob: Buffer.from(process.env[secretName], 'base64'), EncryptionContext: { LambdaFunctionName: "your lambda function name" }, };
@RicardoBoriba
@RicardoBoriba 3 года назад
@@parthasarathymurali3942 Thanks!!! Allmost 2h trying to solve this error..
@SreenathV
@SreenathV 4 года назад
Can we decrypt multiple keys in one API call?
@bpate1138
@bpate1138 2 года назад
Is there a similar code in python?
Далее
How to use layers with Lambda functions?
8:54
Просмотров 40 тыс.
ВЫЖИЛ В ДРЕВНЕМ ЕГИПТЕ!
13:09
Просмотров 241 тыс.
Developing AWS Lambda Functions Locally in VS Code
20:22
How to deploy a lambda function using github actions?
15:09
How To Test your AWS Lambda Locally with SAM
13:05
Просмотров 91 тыс.
AWS Lambda Deployment Package in Python
12:53
Просмотров 89 тыс.
Смартфоны через 10 лет
0:12
Просмотров 1 млн