S3 artifacts fail to download when using IAM role attached to instance

428 views
Skip to first unread message

Wes Higbee

unread,
Apr 5, 2016, 8:44:25 PM4/5/16
to Nomad
I'm using v0.3.1. 

I have a zip file on S3 that I'm trying to download. The instance I'm running on has an attached IAM role, and I can successfully download files with the aws sdk for nodejs. So I believe permissions are fine on the machine.

Nomad dies when trying to download the artifact. I also downloaded go & go-getter on to the same instance to try using it directly. Same issue. This is probably a go-getter issue, but I wanted to ask before I file an issue.

1. Am I configuring my artifact properly, this is configured inside my task definition?

        artifact {
        }

I've also tried these sources:


2. If not, is this a known issue? I've seen similar posts about this on github about the aws-sdk-go, perhaps this issue? https://github.com/aws/aws-sdk-go/issues/430

panic: runtime error: invalid memory address or nil pointer dereference

panic
        /usr/local/go/src/runtime/panic.go:464
        /home/centos/work/src/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go:25
        /home/centos/work/src/github.com/aws/aws-sdk-go/service/s3/api.go:830
        /home/centos/work/src/github.com/hashicorp/go-getter/get_s3.go:118
        /home/centos/work/src/github.com/hashicorp/go-getter/get_s3.go:106
        /home/centos/work/src/github.com/hashicorp/go-getter/client.go:237
main.main()

3. Where should I file this if it is an issue?

Diptanu Choudhury

unread,
Apr 5, 2016, 9:30:27 PM4/5/16
to Wes Higbee, Nomad
Hi Wes,

We have a job running in production which downloads an artifact from S3 and here is the relevant artifact configuration from our job spec -
 

    artifact {
        source = "s3://s3.amazonaws.com/bucket-name/file.zip"
        options {
          aws_access_key_id = "......"
          aws_access_key_secret = "....."
        }
      }


We are currently running Nomad from master. Can you please try using the same syntax and see if this works with Nomad 0.3.1 and if not if this works with master for you? 

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/nomad/issues
IRC: #nomad-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Nomad" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nomad-tool+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nomad-tool/e5517c93-ffcd-4909-978b-3a107ccde14c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Thanks,
Diptanu Choudhury
Reply all
Reply to author
Forward
0 new messages