I have a python script stored in one of my S3 buckets, I want to create a lambda function to execute this python script along with passing parameters to my python script.
Things I tried -
I am successfully able to read my python script from the lambda handler function using boto3.
Created the environment variables successfully to pass to my python script.
Got a few answers from Stackoverflow that I can copy the script to /tmp and then import and execute. That is not working.
Question - Reading is fine but how to execute the python script.
Let me know the options.
Thank You.
we can create one more AWS Lamba and call from main Lambda. For this you need to create a IAM role to execute the Lambda from Lambda.
How to execute a python script stored in AWS S3 using AWS Lambda