Lambda function is not being used
Why do I see this?
One of your Lambda functions didn’t have any invocations in the last 30 days.
What does this mean?
One of the Lambda functions that you have deployed hasn't been invoked in a month.
There could be multiple reasons behind it. Invoking a specific version of the function that doesn't exist anymore, an issue or a bug in the function itself, policy issue, to name a few. Or it can simply be a function isn’t required anymore.
In any case, this event tells you to inquire about the reasons. Any resource you provision on AWS could be a potential security risk, if left unsupervised. So, in accordance with the security best practices, you should delete the functions that aren't needed.
How do I fix ”Lambda function is not being used“?
If you were notified of this event for any of your Lambda functions, start by identifying if the function is required at all.
If the function is needed, check if the function has the right policies attached, and that all the entities involved have sufficient permissions.
Ensure that the function version is the same one that the client is referencing and invoking. You can also try invoking the function manually to see if it's working or if you get any error or warning messages that you can work with. If you need further help, you can visit AWS guide for troubleshooting invocation issues in Lambda.