1. Assessment Phase

  • List Load Balancers
  • Gather LB Details
  • Verify LB Logging Support

2. Summary Phase

  • Confirm Configuration Details

3. Configuration Phase

  • Create S3 Bucket for Logs
  • Set ELB Write Permissions
  • Enable LB Logging

4. Validation Phase

  • Verify Logs in S3
1 Credits

AWS Load Balancer Access Logging Setup (ALB/CLB)

Overview

Configure access logging for your AWS load balancers to improve monitoring and analysis capabilities. This plan ensures a robust setup by guiding you through assessing existing resources, configuring logging to S3 buckets, and verifying that logs are correctly generated and accessible.

Execution Details

Assessment Phase

  • Select AWS Region: Guide the user to choose the correct AWS region for configuration. This step ensures all resources are managed within the chosen region.

  • List Load Balancers: Retrieve and display all existing Application, Network, and Classic Load Balancers in the selected region to identify which are available for logging configuration.

  • Gather LB Details: Collect essential information about the load balancer, including identifier, type, and preferred S3 bucket for access logs. Guide users on choosing whether to use an existing bucket or create a new one.

  • Verify LB Logging Support: Check if the selected load balancer supports logging. Alert users if a Network Load Balancer is chosen, as it does not support access logging.

Summary Phase

  • Confirm Configuration Details: Present a summary of the gathered configuration details, including load balancer type and logging settings, for user confirmation to ensure accuracy before proceeding.

Configuration Phase

  • Create S3 Bucket for Logs: Conditional on user preference, create a new S3 bucket specifically for access logs, ensuring appropriate regional configuration.

  • Set ELB Write Permissions: Develop and apply an S3 bucket policy, authorizing AWS ELB to store logs in the designated bucket.

  • Enable LB Logging: Implement logging on ALB/CLB by altering attributes to ensure logs are recorded and stored as specified. This step is skipped for NLB.

Validation Phase

  • Generate Test Traffic: Simulate HTTP traffic to confirm load balancer logging configuration by sending multiple requests to the endpoint, ensuring logs are triggered.

  • Verify Logs in S3: List generated access logs in the specified S3 bucket to verify successful configuration and storage of logs, affirming operational logging processes.