3 Answers
I would go with option A. With option B – IAM Role can be attached to multiple EC2 instances, any of the EC2 instances that have the role attached can access your S3 bucket. With option A – you can set up gateway VPC endpoint within your VPC to access your S3 bucket so that traffic doesn’t traverse over the internet. The ID of gateway VPC endpoint is unique, so you can use SourceVPCE within you bucket policy to grant access to specific gateway VPC endpoint.
Thanks for the feedback. I think you are right. Somehow I got confused
Because of the "..only be accessible to an Amazon EC2 instance " I thought it was just one EC2 inside the VPC then one that should have access and not all EC2 inside the VPC. But I think the questions is about any EC2 inside that VPC
Yes, VPCE is unique, so S3 can restrict to just this VPC/E