From 4ea2a089914915c81b30d18cff6c0bf25ee844a9 Mon Sep 17 00:00:00 2001 From: Amit Ray Date: Thu, 14 Nov 2024 14:45:06 +0530 Subject: [PATCH] fix: correct S3 bucket owner label key to prevent retrieval errors --- tools/lambda-promtail/lambda-promtail/s3.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/lambda-promtail/lambda-promtail/s3.go b/tools/lambda-promtail/lambda-promtail/s3.go index 94b76411656e1..a6255811378dd 100644 --- a/tools/lambda-promtail/lambda-promtail/s3.go +++ b/tools/lambda-promtail/lambda-promtail/s3.go @@ -292,10 +292,10 @@ func processS3Event(ctx context.Context, ev *events.S3Event, pc Client, log *log &s3.GetObjectInput{ Bucket: aws.String(labels["bucket"]), Key: aws.String(labels["key"]), - ExpectedBucketOwner: aws.String(labels["bucketOwner"]), + ExpectedBucketOwner: aws.String(labels["bucket_owner"]), }) if err != nil { - return fmt.Errorf("failed to get object %s from bucket %s on account %s, %s", labels["key"], labels["bucket"], labels["bucketOwner"], err) + return fmt.Errorf("failed to get object %s from bucket %s on account %s, %s", labels["key"], labels["bucket"], labels["bucket_owner"], err) } err = parseS3Log(ctx, batch, labels, obj.Body, log) if err != nil {