I encountered this while trying to download a file using Lambda from S3.
For my scenario, I did the following steps:
Go to IAM -> Roles -> Search for Lambda's role (you can find it in Lambda -> Permissions -> Execution role -> Role name)
Click Add permissions -> Create inline policy
Choose a service -> S3
In the Filter Actions search bar look for GetObject -> Select the checkbox
In Resources click on Add ARNs in the "object" row
Add bucket name and the resource object name if needed - if not, select Any bucket name and/or Any object name. Click Add ARNs
Click Next -> Add a Policy name
Click Create policy