Install Python Dependency and Libraries on AWS Lambda

Поділитися
Вставка
  • Опубліковано 20 лип 2024
  • This video shows you how to install Python Dependencies and Libraries on AWS Lambda using a Zip folder.
    The Libraries used in the deployment package are Pandas, Numpy, and Requests but you can substitute them with any that you want such as SciPy.
    🔔 Subscribe and never miss new videos: ua-cam.com/users/nktstudios?su...
    ⏱️TIMESTAMPS⏱️
    00:00 - Install Python Dependency and Library on AWS Lambda
    01:28 - Create Lambda Function Locally
    01:48 - Lambda Code Explanation
    02:47 - Create AWS Lambda Deployment Package
    03:01 - Installing Libraries and Dependencies for AWS Lambda
    04:44 - Create a Zip Folder with the Libraries
    05:40 - Create Lambda Function in AWS Console
    06:28 - Upload Zip Folder to Lambda Function
    07:00 - Create a Test Event and Test Lambda Function
    ✔️ Source Code:
    The Lambda function used can be found here:
    gist.github.com/nktstudios/e0...
    The terminal commands used are as follows:
    Pandas
    pip install --platform manylinux2014_x86_64 --target=package --implementation cp --python-version 3.9 --only-binary=:all: --upgrade pandas
    Numpy
    pip install --platform manylinux2014_x86_64 --target=package --implementation cp --python-version 3.9 --only-binary=:all: --upgrade numpy
    Requests
    pip install --platform manylinux2014_x86_64 --target=package --implementation cp --python-version 3.9 --only-binary=:all: --upgrade requests
    🔹 My Courses: nktstudios.com/courses
    ⚡ My Gear
    Windows Laptop: amzn.to/3d4xaK6
    Recording Mic (Blue Yeti X): amzn.to/3rUyEws
    Redragon Headset: amzn.to/33AMR8H
    🎵 Music
    ✅ Let's connect:
    Website: nktstudios.com
    💬 Twitter - @nktstudios
    Facebook: / nktstudioz
    DISCLOSURE: Some of the links on this page are affiliate links, meaning, at no additional cost to you, I may earn a commission if you click through and make a purchase and/or subscribe. Affiliate commissions help us to continue making videos for you.
    ❤️ Thanks for watching.
  • Наука та технологія

КОМЕНТАРІ • 11

  • @vitorcavalcante8495
    @vitorcavalcante8495 11 днів тому

    I watch similar videos on the topic but your pip install command was the only one that actually worked thanks for the video!

  • @BrajBliss
    @BrajBliss 3 дні тому

    I can't thank you enough man, I spent hours on this sh!t and this is the only solution that worked thank you so much! AAAAAAAAAAAAAAAAAAAAAAAAA.

  • @Neil-w2n
    @Neil-w2n 18 годин тому

    Nice video. Thanks.

  • @gameplayspecx7129
    @gameplayspecx7129 2 місяці тому

    I have no words to express how i feel now. Thank you so much! I had the same problem, but i was working with Python 3.12 and the module was requests. I just changed the version in the command and run it, after that i just uploaded the zip and it's working as expected.

  • @ameyachavan8849
    @ameyachavan8849 8 місяців тому

    This helped me, thanks

  • @sachinbaghel6225
    @sachinbaghel6225 3 місяці тому

    Thank you very much for your assistance

  • @noelperezperez
    @noelperezperez Місяць тому

    It seems that the console won't allow us to edit the code if we use this approach. Is there an alternative that would allow us to edit the code post the zip upload?

  • @danna_taylor1313
    @danna_taylor1313 7 місяців тому

    can this be used to create a new layer?

  • @AjishPrabhakar
    @AjishPrabhakar 9 місяців тому

    Excellent. Also, what about packaging the wand libraries similar to this ? I had a hard time on setting this up in the lambda, but didn't get it succeeded.

    • @NKTStudios
      @NKTStudios  9 місяців тому +1

      Hi @AjishPrabhakar, do you mean Wand the ctypes-based simple ImageMagick binding for Python?

    • @AjishPrabhakar
      @AjishPrabhakar 9 місяців тому +1

      @@NKTStudios not ctype based. Anyway thanks for your response. I got my problem solved. Your video helped me to get a better solution for my problem. Thanks