Hi there,
We are upgrading to terraform provider AWS version 5.54.0 and the pipeline is failing giving back this error:
│ Error: listing tags for S3 (Simple Storage) Object (arn:aws:s3:::bucketname-environment//xxx.py): operation error S3: GetObjectTagging, https response error StatusCode: 404, error NoSuchKey: The specified key does not exist.
The problem is what we see in AWS arn in console is we have one dash “/” before the xxx.py , however in the pipleline run we see this strange /.
our code was perfectly working before so we think this is due to update. Could you please support?
Thanks a lot
Hey,
Thanks for your reply,
Its from the resource, I will put the code below but surprisingly when I even hardcode the bucket name without the variables , it again creates the double slash in the pipeline and giving back the same error. It seems that this has been created somewhere else but nowhere in our code we define this resource and we only have one glue job.
resource “aws_s3_object” “directory” {
count = var.stage == “XXX” ? 1 : 0
bucket = “{var.bucket_name}-{var.stage}/”
key = “XXX.py”
source = “{path.module}/XXX.py"
etag = filemd5("{path.module}/XXX.py”)
acl = “private”
}
Also the problem is not getting the tagging either, because I created tags and listed the key values for the tags by going into the s3 and everything was ok there.
The problem is I really cannot figure out where this extra “/” coming from
Thank you!
did you try change bucket entry for bucket = "var.bucketname-${var.stage}" without the slash in the end of bucket reference?
make not sense using slash in bucket name reference.