AlmightyHeathcliff
AlmightyHeathcliff

Reputation: 51

Kill a Lambda function from another Lambda function

I have a requirement that I need to kill Lambda function X from another function Y, when function state of X remains 'active' for 2 mins.

Using info from following documentation, I can get state of function X using get_function method, but then how to kill it from Y? I couldn't find anything helpful from docs here.

Any help or guidance is appreciated. https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/lambda.html#Lambda.Client.update_function_event_invoke_config

Upvotes: 0

Views: 232

Answers (1)

Jason Wadsworth
Jason Wadsworth

Reputation: 8887

You can't kill a lambda, but if you need it to stop at 2 minutes you can set the lambda timeout at 2 minutes. It will be stopped for you if it hits that time.

Upvotes: 1

Related Questions