Network logging and troubleshooting
One of the benefits of using virtualized infrastructure is that you can get a level of introspection that is difficult or costly with physical hardware. Being able to quickly switch on logging at a network-device level is an extremely useful feature, especially when getting used to the interactions between VPCs, subnets, NACLs, routing, and security groups.
In this recipe, we will turn on logging for our network resources. You could do this all the time, to give yourself another layer for monitoring and auditing, or you could selectively enable it during troubleshooting, saving yourself any additional datastorage charges.
Getting ready
For this recipe, you must have a VPC to log activity on.
How to do it...
- Start by defining the template version and description:
AWSTemplateFormatVersion: "2010-09-09" Description: Flow logs for networking resources
- Define the
Parameters
for the template. In this case, it is just theVpcId
to turn logging on for:
...