Skip to content

Commit

Permalink
fix: correct S3 bucket owner label key to prevent retrieval errors (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
AmitRay9615 authored Nov 21, 2024
1 parent e0c8a48 commit 85aaf63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/lambda-promtail/lambda-promtail/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 85aaf63

Please sign in to comment.