Search for Well Architected Advice
< All Topics
Print

Control traffic at all layers

When designing your network topology, controlling traffic at all layers is essential to ensure that each component only communicates with what is necessary, minimizing the attack surface and improving security. You should carefully examine the connectivity requirements of each component to define how traffic flows between them, including internet access, connectivity between VPCs, edge services, and external data centers. Proper traffic control helps to isolate threats, enforce least privilege access, and reduce the risk of unauthorized communication.

  1. Assess connectivity requirements for each component: Analyze the specific network connectivity needs of each component in your architecture. Determine whether the component requires internet access (inbound or outbound), communication with other VPCs, interaction with edge services, or connectivity to on-premises data centers. This helps ensure that only the necessary connections are permitted.
  2. Segment traffic using VPCs and subnets: Place components with different connectivity requirements into separate VPCs and subnets. For example, public-facing resources like web servers should be placed in public subnets with internet access, while internal components like databases should reside in private subnets with no internet access. This segmentation reduces exposure and limits traffic to necessary routes.
  3. Use security groups and network ACLs to enforce traffic control: Implement security groups and network access control lists (ACLs) to strictly manage traffic flow at each layer. For example, allow web servers in a public subnet to communicate only with specific application servers in a private subnet, and restrict all other traffic. Ensure that only required traffic is permitted, and all unnecessary connections are blocked.
  4. Control outbound traffic: Ensure that outbound traffic is restricted where necessary. For example, application servers should not have unrestricted internet access unless absolutely needed. Use egress controls on security groups and network ACLs to enforce outbound traffic restrictions, ensuring that internal components don’t inadvertently connect to untrusted external systems.
  5. Implement load balancers and edge services: Use load balancers, such as AWS Elastic Load Balancing (ELB), to manage traffic between layers and control how requests are routed between clients and backend services. Similarly, use edge services like AWS CloudFront to provide secure content delivery, caching, and protection at the network edge.
  6. Secure hybrid and cross-network communication: For workloads that require communication with on-premises data centers or other VPCs, use AWS Direct Connect, VPN, or AWS Transit Gateway to secure traffic between these environments. Control and monitor this traffic to ensure that sensitive data is protected, and unnecessary communication is blocked.
  7. Monitor and log network traffic: Use AWS CloudWatch, VPC Flow Logs, and AWS CloudTrail to monitor traffic at all layers. Analyzing network traffic helps detect unauthorized access, misconfigurations, or anomalous behavior, ensuring that traffic is flowing as intended and security policies are enforced.

Supporting Questions:

  • How do you determine the specific connectivity requirements for each component in your architecture?
  • What mechanisms are used to enforce traffic control between components and across different network layers?
  • How do you manage and secure outbound traffic, ensuring that internal components don’t have unnecessary external connectivity?

Roles and Responsibilities:

Network Architect:

  • Responsibilities:
    • Design the network architecture to segment components and control traffic flows based on the specific connectivity needs of each resource.
    • Define security groups, network ACLs, and other traffic control mechanisms to enforce strict access rules between different network layers.
    • Ensure that secure communication is established between AWS environments and external networks, such as data centers or edge services.

Cloud Administrator:

  • Responsibilities:
    • Implement and manage security groups, network ACLs, and routing tables to control inbound and outbound traffic.
    • Use load balancers and edge services to securely route traffic between clients and internal services.
    • Monitor and log network traffic to detect any unauthorized or anomalous activity.

Artefacts:

  • Traffic Control Policies: Documentation outlining how traffic is controlled at all layers, specifying security group and ACL configurations, as well as allowed inbound and outbound traffic.
  • Network Topology Diagrams: Visual representations of the network architecture showing traffic flow, segmentation, and connectivity requirements between components.
  • Traffic Logs and Monitoring Reports: Logs from VPC Flow Logs, AWS CloudWatch, and AWS CloudTrail showing traffic patterns and highlighting any potential misconfigurations or security issues.

Relevant AWS Services:

AWS Networking Services:

  • Amazon VPC (Virtual Private Cloud): Provides isolated environments for your workloads, with subnets, routing tables, and gateways to control network traffic at each layer.
  • AWS Security Groups and Network ACLs: Control inbound and outbound traffic at the instance and subnet level, allowing only necessary communication between components.
  • AWS Direct Connect & VPN: Securely connect your AWS environment to on-premises data centers or external networks, ensuring controlled and monitored traffic between locations.
  • AWS Transit Gateway: Facilitates secure, scalable inter-VPC and hybrid network communication, allowing for centralized management of traffic between AWS and external environments.

AWS Traffic Management Services:

  • AWS Elastic Load Balancing (ELB): Distributes incoming application traffic across multiple targets, helping control how traffic flows between clients and backend services.
  • AWS CloudFront: A content delivery network (CDN) that securely routes traffic from edge locations to backend services, providing caching and DDoS protection.

Monitoring and Logging Services:

  • Amazon VPC Flow Logs: Captures information about the IP traffic going to and from network interfaces, enabling you to monitor and analyze traffic across layers.
  • AWS CloudTrail: Logs all network-related API activity, helping you track changes to security groups, routing tables, and other network configurations.
  • Amazon CloudWatch: Monitors network performance metrics, providing insights into traffic patterns and identifying potential issues with connectivity or security.
Table of Contents