Replace bucket name and ARN
Replace elb-logs-bucket-name with name of your S3 bucket.
Replace arn:aws:iam::054676820928:root with the correct ARN for your region.
Send AWS Elastic Load Balancering logs to Better Stack. We automatically recognize and parse Application Load Balancer, Network Load Balancer, and Classic Elastic Load Balancer access logs.
Deploy a Lambda function to read logs from S3 bucket and ship them to Better Stack.
Create an S3 bucket:
elb-logs.Add permissions for ELB to write logs into the bucket:
Replace elb-logs-bucket-name with name of your S3 bucket.
Replace arn:aws:iam::054676820928:root with the correct ARN for your region.
Access Denied error?Please go back and check your Bucket policy.
Can't make this work? Let us know at hello@betterstack.com.
betterstack-elb-logs-forwarder.betterstack-elb-logs-forwarder-role.Scroll down to S3 trigger:
Download Requests package as Zip file.
Add Lambda layer with Requests package and dependencies:
python-requests.x86_64 and arm64.python3.10.Set up Lambda layer:
Find Code source section for your lambda.
Replace Code for lambda_function with the following code:
Click Deploy and you're done. π
You should see your logs in Better Stack β Live tail.
It may take few minutes for your logs to propagate to Better Stack.
Please let us know at hello@betterstack.com.
We're happy to help! π
We use cookies to authenticate users, improve the product user experience, and for personalized ads. Learn more.