The article describes a technique to find the AWS Account ID of any S3 bucket, both private and public, by utilizing a VPC Endpoint for S3 and a difference in behavior in CloudTrail when a request is denied by a VPC Endpoint policy. This method involves applying an IAM policy to the request and inferring whether the policy permitted or blocked the request. The technique can be automated and has been successfully used to find the Account ID of a bucket. The article also discusses the implications of considering AWS Account IDs as sensitive information.