Skip to main content
Welcome back, Solutions Architects. This lesson focuses on designing secure application integration on AWS: practical controls, where each service sits in the OSI model, and which security features to apply in production and on the exam. Contents covered:
  • Auto Scaling
  • Application Load Balancer (ALB)
  • Network Load Balancer (NLB)
  • Gateway Load Balancer (GWLB)
  • Amazon API Gateway
  • Summary mapping and operational tips

Auto Scaling

Auto Scaling automates the scaling of compute resources. While commonly associated with EC2, the auto scaling pattern is used across many AWS services (ECS tasks, ASG-backed instances, etc.). Auto Scaling is an enabler: the primary security controls are attached to the launched resources (EC2 instances, ECS tasks) rather than Auto Scaling itself. Key security considerations:
  • Service identity: Auto Scaling performs actions using a service-linked role. In IAM and exam scenarios, recognize the service-linked role as the IAM principal for Auto Scaling.
  • Observability: monitor scaling activity with CloudWatch metrics/events and CloudTrail API logs to detect unexpected scaling behavior.
  • Sizing and resilience: set sensible ASG min and max values to meet availability, cost, and capacity requirements. Setting min == max disables dynamic scaling and removes resiliency benefits.
A slide showing an AWS autoscaling architecture: users send HTTP/S requests to an Application Load Balancer which forwards traffic to an Auto Scaling group of EC2 instances distributed across multiple availability zones and subnets. The slide notes that autoscaling itself has little in the way of built-in security because it’s an enabler service.

Application Load Balancer (ALB)

ALB operates at Layer 7 (application layer) and is optimized for HTTP/HTTPS workloads, host/path-based routing, and content-aware routing. Security best practices for ALB:
  • OSI layer: Layer 7 — route based on HTTP semantics.
  • Security groups: restrict inbound ports to only what’s required (for example, 443 for HTTPS) and allow outbound traffic necessary to reach targets.
  • Authentication: use listener rule authentication with Amazon Cognito or external OIDC providers to authenticate requests before forwarding.
  • TLS termination: terminate TLS on the ALB and use AWS Certificate Manager (ACM) for certificate management and automatic renewal.
  • Logs and monitoring: enable ALB access logs to S3 for request/response-level detail; use CloudWatch for metrics and CloudTrail for configuration/API auditing.
When you need per-request visibility for troubleshooting or threat analysis, enable ALB access logs to S3. For operational metrics and alarms, use CloudWatch; for API activity and configuration changes, use CloudTrail.
A network diagram titled "Application Load Balancer" showing an AWS architecture with an ELB deployed across two availability zones. It illustrates public and private subnets, ELB security groups, cross-zone load balancing, and a DNS record.
A diagram titled "Application Load Balancer" showing users connecting to an Application Load Balancer. The ALB first authenticates with Amazon Cognito and then forwards requests to an instance.
Example exam-style considerations:
  • ALB OSI layer: Layer 7.
  • Pre-target authentication: ALB listener authentication with Cognito or OIDC.
  • Encrypt traffic in transit: enable HTTPS listeners and use ACM-managed certificates.
An infographic-style multiple-choice question about a fintech company using an Application Load Balancer asking how to encrypt traffic in transit while optimizing backend performance. Four answer options are shown: SSL termination, SSL passthrough, HTTP/2 only, and SSL bridging.

Network Load Balancer (NLB)

NLB operates at Layer 4 (transport layer), providing extremely high throughput, low latency, and the ability to expose static IP addresses. Key security and operational points:
  • OSI layer: Layer 4 — routes based on TCP/UDP rather than HTTP semantics.
  • Listeners: supports TCP, UDP, and TLS listeners. TLS listeners allow TLS termination at the NLB.
  • Access control: use security groups on targets or interface ENIs, and NACLs at the subnet level where appropriate.
  • PrivateLink: NLB is a common target for AWS PrivateLink endpoint services — use this for secure, private connectivity across VPCs or accounts.
  • Logging: NLB integrates with CloudWatch metrics and supports access logs to S3 for some listener types; verify current AWS docs for listener-specific logging support.
Architectural pattern: place an NLB in front when you need static IPs or PrivateLink, and route to an ALB behind it for Layer 7 features like path-based routing.
A network architecture diagram illustrating an AWS Network Load Balancer in a VPC, showing client traffic, security groups, and two worker nodes each hosting an AWS Load Balancer Controller and app instances. The diagram highlights security group rules and source allowances for the NLB and nodes.
An AWS architecture diagram showing a client in VPC1 connecting via an AWS PrivateLink endpoint to a Network Load Balancer in VPC2, which routes traffic to an Application Load Balancer and to HTTP(S) and TCP/UDP targets. A caption notes that NLBs operate at Layer 4 and do not support external authentication.
Diagram of an AWS Network Load Balancer receiving TLS traffic from clients and forwarding TCP or TLS connections to separate target groups inside the AWS Cloud. TLS certificates are shown as managed by AWS Certificate Manager and IAM.
Notes on cipher suites:
  • NLB supports TLS but offers less granular cipher-suite customization than a dedicated proxy. If you need strict cipher control, terminate TLS on a proxy or at application endpoints where you can configure the TLS stack directly.
Slide titled "Network Load Balancer" with a diagram showing a user connecting to an ELB that forwards traffic to app nodes and writes access logs to an S3 bucket. The caption notes NLBs have standard metrics/logging but access logs are available only for TLS listeners.

Gateway Load Balancer (GWLB)

Gateway Load Balancer is purpose-built to deploy and scale third‑party inline network appliances (IDS/IPS, firewalls, DPI). It pairs flexible traffic steering with appliance scaling. Technical details:
  • Encapsulation: GWLB uses GENEVE to encapsulate and tunnel traffic to inspection appliances — allowing metadata and flexible headers to be delivered to appliances.
  • Traffic flow: client → GWLB endpoint → GENEVE-encapsulated packet to appliance → appliance inspects/modifies → decapsulate at GWLB → forward to destination.
  • Endpoint access control: create a Gateway Load Balancer endpoint (GWLBe) to connect consumer VPC traffic to a provider VPC. Use endpoint service configuration and resource-based policies to control which principals can create endpoints.
  • Monitoring: enable CloudWatch metrics, CloudTrail, and VPC Flow Logs for per-ENI and per-flow network visibility.
Operational tips:
  • Enable VPC Flow Logs when you need per-flow inspection visibility.
  • Use endpoint service policies to restrict who can connect to your GWLB-managed service.
A technical diagram showing how a Gateway Load Balancer (GWLB) uses GENEVE encapsulation to forward traffic to inspection appliances, with step-by-step arrows, VPC/subnet addresses, and packet header fields (outer/inner IPs, ENI ID, flow cookie). It illustrates packet encapsulation, appliance processing, decapsulation, and return to the destination.
An AWS Gateway Load Balancer diagram showing a VPC with two subnets containing instances (Instance A1, A2, B3, B4) and GLB appliances. Monitoring and VPC flow logs/CloudTrail are sent to an Amazon S3 bucket and CloudWatch Logs.

Amazon API Gateway

API Gateway is a managed front door for APIs and serverless backends. It offers request routing, transformation, authorization, throttling, caching, and observability features. Security and management features:
  • Purpose: front proxy for APIs supporting integrations to Lambda, ALB/NLB-backed services, HTTP endpoints, and many AWS service integrations.
  • Encryption: TLS for endpoint communication and encryption at rest for API cache. API Gateway also supports mutual TLS (mTLS) for client and server certificate verification.
  • Authorization:
    • IAM (sigv4) for AWS service-to-service calls,
    • Amazon Cognito user pools for user authentication,
    • Lambda Authorizers (custom authorizers) for custom auth/permission logic returning IAM policies.
  • API keys & usage plans: use API keys and usage plans to track, throttle, and quota developer or third-party usage.
  • Observability: CloudWatch Logs/Metrics and AWS X-Ray support for distributed tracing.
A diagram of an AWS API Gateway architecture showing web clients connecting to Amazon API Gateway, which routes requests to Elastic Load Balancers (ECS/EC2), AWS Lambda, Amazon S3, and other services. The diagram also highlights an ECS cluster with EC2 auto-scaling and the note "API Gateway has a few security features."
A diagram of an Amazon API Gateway setup showing mobile apps, websites and services routing through an API Gateway (with a cache) to backends like Lambda functions, EC2 endpoints and other AWS services. A side note states it only supports encryption for API endpoints and its cache.
Practical exam considerations:
  • Custom authorization logic: use a Lambda Authorizer.
  • Metering third-party usage: use API keys with usage plans, throttling, and quotas.
  • Detailed diagnostics and auditing: enable CloudWatch Logs for the API and consider X-Ray for distributed tracing.
API Gateway access log format example (useful for CloudWatch Logs or S3 access logging):
A colorful slide presenting a quiz question about a fintech startup using Amazon API Gateway that wants custom authorization based on user roles and permissions. It lists four answer options: API Gateway resource policies, AWS IAM policies, Lambda Authorizer, and API Gateway CORS headers.
A slide showing a scenario about a media company using Amazon API Gateway and asking which feature can track and control third‑party developer usage. Four answer options are listed: API Gateway resource policies, AWS IAM roles, API Gateway CORS headers, and API Gateway API Key.
A colorful slide asking how an e-commerce platform can limit client request rates using Amazon API Gateway, and listing possible features: API Gateway caching, usage plans, deployment stages, and custom domains.


Closing notes

  • Many integration services act as “enablers”: focus on how they connect, what they terminate, and which resources they expose.
  • When answering exam or design questions, map each service to:
    • its OSI layer,
    • its authentication and authorization capabilities,
    • its logging/monitoring options,
    • and whether it persists data (for example, ALBs generally do not persist application data; API Gateway may cache responses that can be encrypted at rest).
  • Apply defense in depth: network controls (security groups/NACLs), identity controls (IAM/Cognito/Lambda authorizers), transport security (TLS/mTLS), and observability (CloudWatch, CloudTrail, VPC Flow Logs).
When designing integrated applications, apply defense in depth: network controls (security groups/NACLs), identity controls (IAM/Cognito/Lambda authorizers), transport security (TLS/mTLS), and observability (CloudWatch, CloudTrail, VPC Flow Logs).

Watch Video