The resource-based policy you tried to add to the Lambda resource would grant public access to it, which isn't allowed.
The exception type.