My lambda function is failing (without an error message, just saying that the task had timed out) but running the same function with the same permissions locally works fine. The only difference I can think of is that I needed to install boto3 and botocore and in lambda, I didn't do any of that, as I expected that they come preinstalled. But the function failing made me suspect: is there a chance that botocore.exceptions or boto3 do no come preinstalled?
CodePudding user response:
They come preinstalled, as per official documentation:
Your code runs in an environment that includes the SDK for Python (Boto3), with credentials from an AWS Identity and Access Management (IAM) role that you manage.
As regards to your task timeout issue, try increasing the timeout of your Lambda function in the General Configuration section of your Lambda settings. It defaults to 3 seconds which is probably too short.