Skip to content

Commit 85aaf63

Browse files
authored
fix: correct S3 bucket owner label key to prevent retrieval errors (#14913)
1 parent e0c8a48 commit 85aaf63

File tree

1 file changed

+2
-2
lines changed
  • tools/lambda-promtail/lambda-promtail

1 file changed

+2
-2
lines changed

‎tools/lambda-promtail/lambda-promtail/s3.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -292,10 +292,10 @@ func processS3Event(ctx context.Context, ev *events.S3Event, pc Client, log *log
292292
&s3.GetObjectInput{
293293
Bucket: aws.String(labels["bucket"]),
294294
Key: aws.String(labels["key"]),
295-
ExpectedBucketOwner: aws.String(labels["bucketOwner"]),
295+
ExpectedBucketOwner: aws.String(labels["bucket_owner"]),
296296
})
297297
if err != nil {
298-
return fmt.Errorf("failed to get object %s from bucket %s on account %s, %s", labels["key"], labels["bucket"], labels["bucketOwner"], err)
298+
return fmt.Errorf("failed to get object %s from bucket %s on account %s, %s", labels["key"], labels["bucket"], labels["bucket_owner"], err)
299299
}
300300
err = parseS3Log(ctx, batch, labels, obj.Body, log)
301301
if err != nil {

0 commit comments

Comments
 (0)