1

I have a function in aws lambda, execute a ffmpeg command, and upload the finished video to S3, I set the lambda timeout of 5 minutes, test in the console is normal, but I used in the django PYTHON SDK boto3.invoke calls timeout, and I saw each execution function S3 which will produce 3 record, it shows that lambda has been running successfully and uploaded to S3, but why would it have been repeatedly run non-stop until 5 minutes? Is there anyone who can help me? Thank you very much.

client_lambda = boto3.client('lambda')

def all_compose_vedio(var):
    response = client_lambda.invoke(
        FunctionName='second_vedio',
        InvocationType='RequestResponse',
        Payload=json.dumps(var))
    return response

1 Answer 1

1

you need to change the timeout of the boto config like this:

config = botocore.config.Config(connect_timeout=300, read_timeout=300)
client = boto3.client('lambda', region_name='us-east-1', config=config)

with the correct region, and the timeouts you need remember that you will be billed twice this way...

I think the reason is that your second lambda is timing out and retrying

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.