Skip to content

Package directory

0

Where could I find the lambda package directory? Best regards,

  • please accept the answer if it was helpful

asked a year ago281 views
2 Answers
1

For Python https://gist.github.com/gene1wood/4a052f39490fae00e0c3#file-all_aws_lambda_modules_python3-10-txt

Here is AWS Lambda Base Container Images (check different branches for other programming languages) https://github.com/aws/aws-lambda-base-images/tree/nodejs20.x

EXPERT
answered a year ago
EXPERT
reviewed 9 months ago
EXPERT
reviewed a year ago
1

Hello,

To find the Lambda package directory for AWS Lambda functions, you can do the following:

For Python

List Installed Modules:

  • Create a simple Lambda function with the following code:*
import sys

def lambda_handler(event, context):
    installed_packages = sorted([f"{i.key}=={i.version}" for i in sys.modules.values()])
    return {
        'statusCode': 200,
        'body': installed_packages
    }

  • Deploy and invoke the function to get a list of installed packages.

  • Reference List:*

Check this gist for a list of AWS Lambda modules for Python 3.10. For Other Languages

AWS Lambda Base Images: Check the AWS Lambda Base Images repository on GitHub for different programming languages. https://github.com/aws/aws-lambda-base-images This will help you understand the available packages and directories in the AWS Lambda environment.

EXPERT
answered a year ago
EXPERT
reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.