How to Install Pandas on AWS Lambda Function

    39
    29



    #awslambda

    Step by step guide on how to install pandas to work in an AWS Lambda function using the aws console. Pandas is a super helpful library but does not come installed natively on aws lambda so there are a couple of steps that need to be taken if you want to run Lambda functions that leverage this library.

    installation links from video

    Pandas wheel file: https://pypi.org/project/pandas/#files
    Pytz wheel file: https://pypi.org/project/pytz/#files

    medium article with steps written: https://medium.com/swlh/how-to-add-python-pandas-layer-to-aws-lambda-bab5ea7ced4f

    timestamps
    00:00 introduction
    00:33 download wheel files
    01:32 unpack wheel files
    03:01 zip python files
    04:12 create pandas lambda layer
    04:56 add lambda layer with numpy

    source

    Previous articleAWS RDS : Connecting Local SQL Server Management Studio to AWS RDS | AWS VPC security group
    Next articleRPA Developer Salary | RPA Developer Resume | RPA Career | Intellipaat

    29 COMMENTS

    1. Thank you for your very good and intuitive explanation :). However, if it's only about pandas and numpy this way might be easier:
      1. Simply scroll down in your lambda tab.
      2. Click on 'Add a Layer'.
      3. Among 'AWS Layers' choose 'AWSDataWrangler-Python38'.
      4. Select a 'Version'.
      5. Click 'Add'.
      Done šŸ™‚

    2. Thank you very much,

      i run into a problem. It says

      "An error occurred (AccessDenied) when calling the GetObject operation: Access Denied
      [ERROR] ClientError: An error occurred (AccessDenied) when calling the GetObject operation: Access Denied"

      Do you have an idea, what could be the problem? I try to trigger the lambda when an object is put into the s3 bucket.
      My lambda has actually all permissions, due to s3:*