I am new to using AWS. I have two route tables in my VPC. One route table with public subnets (main route table). Another custom route table with private subnets.
I have configured S3 VPC endpoint and added it to my custom route table with private subnets.
It is able to access s3 when the lambda function is also in the private subnets. But when the lambda functions in the public subnets, it is not able to connect to the S3.
Is it not possible for lamdas in public subnet to access private subnet resources?