AWS Lambda function policy is not attached to the Lambda resource prohibits public access. Make sure that AWS Lambda function policy attached to the Lambda resource prohibits public access.