I have a rar file, which I want to unrar in AWS lambda using python. I learned about unrar library in python. I have created the layer for unrar in AWS. But now when I execute the code
from unrar import rarfile
rar = rarfile.RarFile('file.rar')
rar.extractall()
I got the following error
Couldn't find path to unrar library.
I read the solution. According to the solution, I have to set the environment variable. can I use this solution for AWS Lambda also? and what other solutions can be possible.