To diagnose and troubleshoot the network connectivity at the Virtual Private Cloud (VPC) level, we can use VPC Flow Logs. The VPC Flow Logs feature provides us with the ability to capture information about the IP packets travelling through our VPC. When a VPC Flow Log is created, we are able to get an overview the logs created in the management console directly through the CLI, SDKs, or the API.
We can enable VPC Flow Logs on the level of a subnet, or we can log each and every network adapter in the subnet. This allows us to view the traffic and diagnose whether network packets are reaching the intended target and what the state of the packet flow during a certain collection period was. Flow logs can be used as a diagnostic tool when network traffic is not reaching a certain target; this can be a subnet, an EC2 or RDS instance, an Elastic Container...