Using AWS S3 to Store ELB Access Logs

Lab Details

  1. This lab walks you through the steps to create an ELB and store ELB access logs in an S3 Bucket.

  2. In this lab, you will create two EC2 instances and attach them to an elastic load balancer.

  3. You will also enable Access logs in ELB and configure the ELB to send the logs to an S3 Bucket.

  4. Duration: 1 hour

  5. AWS Region: US East (N. Virginia) us-east-1

Introduction

Elastic Load Balancer

  1. Load Balancer is a service that allows you to distribute incoming application or network traffic across multiple targets, such as Amazon EC2 instances, containers, and IP addresses across multiple Availability Zones.

  2. AWS currently offers three types of load balancers:

  • Application Load Balancer

  • Network Load Balancer

  • Classic Load Balancer
  • ?Application Load Balancer is best suited for load balancing of HTTP and HTTPS traffic.
  • Network Load Balancer is used to distribute the traffic or load using TCP/UDP protocols. 

  • Classic Load Balancer provides basic load balancing across multiple Amazon EC2 instances.

Storing ELB Access logs in S3

  1. ELB access logs provide detailed information regarding the request received by the load balancer.

  2. Log files contain detailed information such as the time of the request, IP Address of the client, path of the request and the response from the server.

  3. ELB access log feature is an optional feature.

  4. You can use these access logs to analyze traffic patterns and troubleshoot issues.   

  5. Log files stored in S3 bucket are encrypted with a unique key.

  6. There is no additional charge for access logs. You are charged storage costs in S3, but you are not charged for the bandwidth used by Elastic Load Balancing to send log files to Amazon S3.       

  7. When managing multiple environments, it would be better to store the logs in separate S3 buckets so that it will be easy to find logs for a specific environments.     

Lab Tasks:

  1. Launching two web servers with apache service installed

  2. Launching Elastic load balancer by attaching the web servers and enabling the s3 access log feature at the time of creating the load balancer

  3. Testing the load balancer

  4. Checking the log files sent to the S3 bucket.

Architecture Diagram

     



Join Whizlabs_Hands-On to Read the Rest of this Lab..and More!

Step 1 : Login to My-Account
Step 2 : Click on "Access Now" to view the course you have purchased
Step 3 : You will be taken to our Learn Management Solution (LMS) to access your Labs,Quiz and Video courses