AWS Architecture Guide

Public API Platform Network Security Scenario

Goal

The earlier sections explained the controls. This section applies them to a realistic design conversation.

The goal is not to produce one perfect reference architecture. The goal is to practice explaining why each control belongs where it does, what it protects, and what trade-offs the team should discuss before implementation.

Scenario

A company is building a public API platform on AWS. Customers and partners will call the API from the internet. The platform must:

  • Accept legitimate HTTPS traffic from external clients.

  • Protect application entry points from common web attacks and flood-style events.

  • Keep application services and databases private.

  • Allow private application services to call selected AWS services.

  • Inspect sensitive outbound traffic.

  • Support future multi-account growth without every workload team inventing its own edge policy.

The business wants speed, but the security team wants a design that can survive review and grow cleanly.

The Short Version

The architecture answer should sound like this:

I would protect the public edge first, keep the workload tiers private, express tier-to-tier access with security groups, avoid broad outbound internet access where private endpoints fit, and route traffic that needs deeper inspection through a planned firewall path. I would also make ownership clear: application teams own workload rules, platform or security teams own shared edge and inspection guardrails, and everyone owns observability for the paths they depend on.

One Possible Design

Internet clients
  -> DNS / edge entry
  -> AWS Shield protection
  -> AWS WAF web ACL
  -> public API or load balancer entry
  -> private application service security group
  -> private database security group

Private application service
  -> VPC endpoints for selected AWS services
  -> inspected egress path for approved external destinations

In a larger organization, the platform may also use a central networking account, shared inspection VPC, Firewall Manager policies, centralized logging, and account-level guardrails. Do not start there by default. Start with the traffic paths, then decide where centralization helps.

Walk the Design from Outside In

First, protect the public edge. Public clients should reach a managed entry point, not private services directly. AWS WAF can filter HTTP and HTTPS requests before they reach the application. AWS Shield provides DDoS protection, with Shield Advanced considered when the exposure, business risk, or response requirements justify it.

Second, keep the application tier private. The public entry point forwards only the intended traffic to private application services. Security groups express that relationship: the application accepts traffic from the entry point, not from the whole internet.

Third, keep the database private and narrow its source. The database security group should allow database traffic from the application tier only. The database should not become reachable because it shares a VPC with something public.

Fourth, separate service access from internet egress. If the application needs supported AWS services, VPC endpoints can keep those calls private. If it needs third-party APIs or update repositories, that traffic can use a controlled egress path with inspection, logging, and explicit ownership.

Fifth, decide where inspection belongs. AWS Network Firewall may sit on egress paths, ingress paths, centralized paths, or hybrid paths depending on the route-table design. If the requirement says "inspect sensitive outbound traffic," the route tables and subnets must make that true.

Trade-Offs to Explain

The design has real trade-offs:

DecisionBenefitTrade-Off
WAF at the edgeBlocks or challenges unwanted web requests early.Rules need tuning, testing, and monitoring for false positives.
Private application tiersReduces direct exposure.Requires clear routing, deployment, and operational access patterns.
Security group referencesExpresses tier relationships clearly.Needs disciplined ownership and review as services multiply.
VPC endpointsReduces broad internet egress for AWS service calls.Adds endpoint, DNS, policy, and cost considerations.
Central inspectionGives security teams visibility and enforcement.Adds routing complexity, possible latency, cost, and availability design.

The strongest architecture conversation does not pretend these trade-offs disappear. It shows which trade-offs are acceptable for the business risk.

Common Mistakes

  • Making the API public and then discovering that internal services are also reachable.

  • Using WAF but leaving another public path outside the protected entry.

  • Sending every private subnet through broad NAT egress because it is quick.

  • Adding Network Firewall without proving which route tables send traffic through it.

  • Letting security teams own controls but not the runbooks, logs, alerts, and exception process.

If Someone Asks You

How would you secure a public API platform on AWS?

A good answer is:

I would start with the traffic path. Internet traffic should hit a managed public entry protected by WAF and appropriate DDoS controls. Application services and databases should stay private, with security groups expressing which tiers can talk. For AWS service calls, I would prefer VPC endpoints where they fit instead of broad public egress. For traffic that must leave through external paths, I would design inspected egress with clear route tables and ownership. Then I would add logging, monitoring, runbooks, and central policy where the organization needs consistent controls across accounts.

What You Should Remember

A secure public API design is not one control; it is a clear traffic story from edge to private services to outbound paths.

Questions to Check Your Understanding

  1. Which parts of the API path should be public, and which should stay private?

  2. Where would you use WAF, security groups, VPC endpoints, and Network Firewall in this scenario?

  3. What operational responsibilities appear once the network security design is deployed?