hands-on lab

Working With HTTP Header-Based Routing With AWS Lambda

Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.
Lab description

Header-based routing allows you to process requests in different ways depending on the presence or value of an HTTP header. This technique is well-supported in the AWS cloud by Application Load Balancers and AWS Lambda.

Learning how to implement and debug header-based routing will make you more effective at working with complex deployments.

In this lab, you will implement header-based HTTP request routing and learn how to observe headers using Amazon CloudWatch and AWS X-Ray.

Learning objectives

Upon completion of this beginner-level lab, you will be able to:

  • Create an Application Load Balancer routing rule
  • Enable AWS X-Ray for an AWS Lambda function
  • Use Amazon CloudWatch and AWS X-Ray to view request headers

Intended audience

  • Candidates for the AWS Certified DevOps Engineer Professional certification
  • Cloud Architects
  • DevOps Engineers
  • Software Engineers


Familiarity with the following will be beneficial but is not required:

  • Elastic Load Balancing (ELB)
  • AWS Lambda
  • AWS X-Ray
  • Amazon CloudWatch

The following content can be used to fulfill the prerequisites:

Environment before
Environment after
About the author
Andrew Burchill
Labs Developer
Learning paths

Andrew is a Labs Developer with previous experience in the Internet Service Provider, Audio Streaming, and CryptoCurrency industries. He has also been a DevOps Engineer and enjoys working with CI/CD and Kubernetes.

He holds multiple AWS certifications including Solutions Architect Associate and Professional.

Covered topics
Lab steps
Using AWS Lambda With Elastic Load Balancing
Configuring Header-Based Routing With an ALB
Using AWS X-Ray to Trace AWS Lambda Functions