- Newest
- Most votes
- Most comments
Hello.
VPC flow logs with "traffic-path" set to 7 are communications via a gateway-type VPC endpoint.
In other words, if you enable VPC flow logs and look for logs with "traffic-path" of 7, you will be able to understand the traffic volume if it is a gateway-type VPC endpoint.
https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html
7 — Through a gateway VPC endpoint (Nitro-based instances only)
Another question is will I be charged for the traffic/data transfer between the VPC and endpoint? If YES, how can I see it in the Cost Explorer?
For interface-type VPC endpoints, fees are charged depending on the amount of data processed.
https://aws.amazon.com/privatelink/pricing/?nc1=h_ls
I don't think there will be any data transfer charges for gateway-type VPC endpoints.
https://aws.amazon.com/vpc/pricing/?nc1=h_ls
Note: To avoid the NAT Gateway Data Processing charge in this example, you could set up a gateway Type VPC endpoint and route the traffic to/from S3 through the VPC endpoint instead of going through the NAT Gateway. There are no data processing or hourly charges for using Gateway Type VPC endpoints. For details on how to use VPC endpoints, please visit VPC Endpoints Documentation.
Relevant content
asked 2 years ago
asked 3 years ago
asked 2 years ago

Thank you, Riku. What about S3 server access logs compared to VPC flow logs? The info I'm after is mainly the IPs and bytes transferred so that I can figure out how much data transfer is and the IPs sending these traffics.
@AKMin Note that if you're using a gateway type of VPC endpoint for S3, there is no charge for traffic passing through it. If you want to track access, you should see the client's IP address in S3 server access logs. If you enable the separately billable CloudTrail data event logging feature for S3, you'll also see the VPC endpoint ID in the CloudTrail events.