Application Load Balancer Access Log Management

Search for a command to run...

No comments yet. Be the first to comment.
Introduction Data encryption is a critical component of cloud security, especially when dealing with sensitive workloads in regulated environments. Amazon S3 provides multiple encryption mechanisms that cater to different compliance and operational n...

Introduction Amazon S3 is a highly durable, scalable object storage service that provides 99.999999999% durability by storing data across multiple Availability Zones. However, certain compliance, latency, and disaster recovery requirements demand sto...

Introduction In modern cloud architectures, backups are not just a compliance checkbox, they are a critical component of resilience and disaster recovery strategies. AWS Backup provides a centralised service to automate backups across AWS services su...
Introduction Hybrid and multicloud strategies are now the norm for enterprises seeking agility, resilience, and compliance. Yet, managing infrastructure that spans AWS, on-premises data centres, and even other public clouds introduces operational com...

As organizations scale their cloud footprint, managing AWS accounts with consistent governance, security, and customization becomes increasingly complex. AWS Control Tower Account Factory for Terraform (AFT) bridges this gap by combining the governan...

Access logs in Elastic Load Balancing is an optional feature, and it comes disabled by default. Once you activate/enable access logs for your load balancer, Elastic Load Balancing captures and stores the logs in the specified Amazon S3 bucket in compressed file format. Disabling access logs can be done at any point in time. For every load balancer node, Elastic Load Balancing generates a log file every 5 minutes. The delivery of logs follows an eventually consistent model. Each log file includes details such as the time of request receipt, client IP addresses, latencies, request paths, and server responses. You must create S3 bucket for access logs before you enable the access logs.
The bucket must be located in the same Region as the load balancer.
The bucket and the load balancer can be in same or different account.
-> Connect the AWS Console and Open the Amazon S3 console
-> Select Create Bucket

-> Select the region of the bucket
-> Enter the name of the bucket
-> Scroll down
-> Select the default encryption, Amazon S3-managed keys (SSE-S3)
-> Select Create bucket



S3 bucket must have a bucket policy that grants Elastic Load Balancing permission to write the access logs to the bucket.
-> Connect the AWS Console and Open the Amazon S3 console
-> Select your bucket

-> Select Permission tab
-> Select Edit under Bucket policy

-> Replace the account ID mentioned in the principal. This AWS account is managed by AWS and you have to select the one which assigned to each region.
-> Scroll Down and Select Save Changes

-> Navigate to the Amazon EC2 Console
-> Select Load Balancers from the left navigation pane

-> Select the attribute tab
-> Select Edit under the attributes

-> Scroll down the edit page
-> Enable access logs under Monitoring section
-> Select Browse for selecting the bucket

-> Select the radio button of the bucket
-> Select Choose button on the popup window

-> Select Save Changes


-> Navigate to Amazon S3 Console
-> Select the Access logs repository bucket
-> Navigate to the test log file Eg: repo-bucket/AWSLogs/aws account ID/ELBAccessLogTestFile

As this is a testing environment, you may not need to retain the AWS resources used for creating this lab. Therefore, delete the AWS resources you allocated to avoid incurring further charges.