VPC internet traffic

0

Hi Team, is it possible to find out the total internet inbound and outbound traffic/cost specific to a VPC. I believe we have internet gateway for internet traffic in the VPC, but not sure if there is any metrics which captures internet traffic information. From Cost Explorer / CUR, I can see Region-DataTransfer-Out-Bytes provides the regional level internet traffic, but not sure if we can find out at VPC level. Any pointers / guidance would be helpful, thanks!

AWS
anish_g
asked a year ago516 views
2 Answers
2

This sounds like a good use for VPC Flow Logs.

There is a very detailed blog post all about analysing network traffic of a VPC which should give some ideas too https://aws.amazon.com/blogs/networking-and-content-delivery/analyze-network-traffic-of-amazon-virtual-private-cloud-vpc-by-cidr-blocks/

profile picture
EXPERT
Steve_M
answered a year ago
profile picture
EXPERT
reviewed a year ago
1

Yes, you are right that the internet traffic for a VPC is routed via an Internet Gateway. While you can't directly get VPC-specific metrics from Cost Explorer, you can leverage the VPC Flow Logs to get the information about the internet traffic specific to your VPC.

VPC Flow Logs capture information about the IP traffic going to and from network interfaces in your VPC. This can be used to get a granular view of the data traffic pattern within your VPC, including the total inbound and outbound data.

Here's a broad overview of how you can use VPC Flow Logs to analyze your VPC traffic:

  1. Enable VPC Flow Logs: You can enable Flow Logs for your VPC, a subnet, or a network interface.

  2. Store the Flow Logs: Choose where you want to store these logs. You have the option to send them to Amazon CloudWatch Logs or Amazon S3.

  3. Analyze the Logs: Now, you can analyze these logs to determine the source and destination of the traffic, the packets transferred, and whether the traffic was allowed or denied, among other things.

You could create custom scripts or use Amazon Athena with QuickSight for detailed analysis and visualization.

For cost-related data, you might need to combine this network data with data from AWS Cost and Usage Report (CUR). The CUR provides comprehensive data about your AWS costs, including the costs associated with data transfer.

Note that using VPC Flow Logs, CloudWatch, Athena, QuickSight, and the CUR will incur additional costs. Therefore, it's crucial to factor these into your cost calculations.

I hope this helps! Let me know if you need further clarification.

profile picture
EXPERT
answered a year ago
profile picture
EXPERT
reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions