Lambda Specs: Python Version - 3.7 || Memory - 10240MB (10GB)
The Synchronous API timeout limit is 30 seconds. My code executes for 4 seconds. The below code is a sample one that sleeps for 4 seconds. I'm using EFS mounted in Ubuntu for storing the packages as the limit of lambda deployment is 250MB.
import time
import json
import os
import sys
sys.path.append("/mnt/access")
import math
import pandas as pd
import statsmodels.api as sm
import numpy as np
from datetime import datetime, timedelta
import sqlalchemy
from statsmodels.stats.outliers_influence import variance_inflation_factor
def lambda_handler(event, context):
time.sleep(4)
What is the AWS Lambda function timeout set at?
It sounds like the lambda function timeout is set too low.
https://console.aws.amazon.com/lambda/home - open the function and set the timeout under basic settings.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.