hashicorp / go-getter

Package for downloading things from a string URL using a variety of protocols.
Mozilla Public License 2.0
1.62k stars 227 forks source link

Archive option in artifact fails if specified (S3) #485

Open agarfer1 opened 2 months ago

agarfer1 commented 2 months ago

This is failing for private buckets, I have not tried in a public one.

Nomad version:

Nomad v1.7.7 BuildDate 2024-04-16T19:26:43Z Revision 0f34c85ee63f6472bd2db1e2487611f4b176c70c

Ubuntu 22.04.3 LTS x64

While trying to get a workaround for #484 I noticed this problem:

artifact {
      source = "s3://random-bucket-54548.s3-us-east-1.amazonaws.com/results/random-file.json.tar.gz"
      options {
            archive = false
      }
      destination = "local/random-file.json.tar.gz"
      #destination = "local/"
}

If the archive is set to true, it will also fail. The only way for this stanza to succeed is to remove that parameter completely.

And regardless of if the destination is specified as a file, or a folder, it fails.

failed to download artifact "s3://random-bucket-54548.s3-us-east-1.amazonaws.com/results/random-file.json.tar.gz":
 getter subprocess failed: exit status 1: failed to download artifact: AccessDenied: Access Denied status code: 403,
 request id: SDF7[...], host id: bpJJ[...]