There is no API to restore a function. This is one of the reasons that we recommend using Infrastructure as Code, such as SAM or serverless framework. You keep your functions in a repository and you deploy it from there.
There is no option or way to retrieve the deleted AWS lambda code, but related logs, roles, test event schemas, and triggers will be retained in your account.
Is there a way to recover the deleted lambda function?asked 3 months ago
Is Lambda invocation = 0 is a guaranteed metric that proves the Lambda function was unused during the period I provide to metric?Accepted Answerasked 6 months ago
Scheduling local lambda functionasked a year ago
Restore deleted nested stackasked 7 months ago
How to invoke a lambda function from a real time gamelift serverasked 9 days ago
How to export environment variables from a Lambda function.asked 5 months ago
is it possible that SQS Triggers to a Lambda Function Alias?Accepted Answerasked 8 months ago
How can I recover the emails of a deleted workmail serviceasked 5 months ago
Recover the deleted stacksasked 4 months ago
How to limit requests made from lambda? For example, I want to set that only the specified domain name can be requested in lambdaAccepted Answerasked 2 months ago