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

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ธ.ค. 2024

ความคิดเห็น • 30

  • @soulofangel1990
    @soulofangel1990 3 ปีที่แล้ว

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

  • @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.

  • @EduardoBello7
    @EduardoBello7 3 ปีที่แล้ว

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

  • @kickerbm0821
    @kickerbm0821 4 ปีที่แล้ว +2

    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?

  • @juanbg100
    @juanbg100 2 ปีที่แล้ว

    thanks lot dude! super helpful video!

  • @rhinoreign1324
    @rhinoreign1324 2 ปีที่แล้ว

    Very helpful, thank you very much!

  • @firojsiddiki2750
    @firojsiddiki2750 3 ปีที่แล้ว +1

    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.

  • @kumarprmshvm565
    @kumarprmshvm565 3 ปีที่แล้ว

    Awesome Explanation

  • @_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 ปีที่แล้ว +2

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

  • @Gabhane123
    @Gabhane123 4 ปีที่แล้ว

    Very helpful Video ! Keep it up !

  • @bugsbunny3354
    @bugsbunny3354 2 ปีที่แล้ว

    Thank you I need this video thanks a lot ❤

  • @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?

  • @franciscageorgue2207
    @franciscageorgue2207 3 ปีที่แล้ว

    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?

  • @sichoi6297
    @sichoi6297 2 ปีที่แล้ว

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

  • @utilisemedia
    @utilisemedia 3 ปีที่แล้ว +1

    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 😉

  • @rakibulhasanofficial5057
    @rakibulhasanofficial5057 ปีที่แล้ว

    many many thanks

  • @samitkapadia7414
    @samitkapadia7414 4 ปีที่แล้ว

    Thanks this was great!

  • @georgelza
    @georgelza ปีที่แล้ว

    any chance you have a python example of this video ?

  • @UdayShivamurthy
    @UdayShivamurthy 3 ปีที่แล้ว

    Precious!!! thanks a lot

  • @javascript_developer
    @javascript_developer 2 ปีที่แล้ว +1

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

  • @shivanishivu1692
    @shivanishivu1692 4 ปีที่แล้ว +1

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

    • @parthasarathymurali3942
      @parthasarathymurali3942 4 ปีที่แล้ว

      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 4 ปีที่แล้ว

      @@parthasarathymurali3942 Thanks!!! Allmost 2h trying to solve this error..

  • @danieljing9319
    @danieljing9319 4 ปีที่แล้ว

    very useful content

  • @bpate1138
    @bpate1138 2 ปีที่แล้ว

    Is there a similar code in python?

  • @SreenathV
    @SreenathV 4 ปีที่แล้ว

    Can we decrypt multiple keys in one API call?

  • @ajayjayswal5335
    @ajayjayswal5335 4 ปีที่แล้ว

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