From 84bb6e3ae4ec83bab2b09941e945ca167966f2e5 Mon Sep 17 00:00:00 2001 From: Victoria Jeffrey Date: Thu, 29 Feb 2024 16:48:24 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20do=20not=20fail=20s3=20buckets?= =?UTF-8?q?=20resource=20when=20no=20location=20found,=20warn=20and=20cont?= =?UTF-8?q?inue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit if the bucket is owned by a different account we can hit a 403 error --- providers/aws/resources/aws_s3.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/providers/aws/resources/aws_s3.go b/providers/aws/resources/aws_s3.go index 5d04e5671c..62e1cb6b69 100644 --- a/providers/aws/resources/aws_s3.go +++ b/providers/aws/resources/aws_s3.go @@ -73,10 +73,12 @@ func (a *mqlAwsS3) buckets() ([]interface{}, error) { Bucket: bucket.Name, }) if err != nil { - return nil, errors.Wrap(err, "Could not get bucket location") + log.Error().Err(err).Msg("Could not get bucket location") + continue } if location == nil { - return nil, errors.New("Could not get bucket location (returned null)") + log.Error().Err(err).Msg("Could not get bucket location (returned null)") + continue } region := string(location.LocationConstraint)