Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downloading artifact hosted in S3 returns a 403 despite IAM role being properly configured. #1113

Closed
c4milo opened this issue Apr 20, 2016 · 10 comments

Comments

@c4milo
Copy link
Contributor

c4milo commented Apr 20, 2016

Nomad version

Output from nomad version
0.3.1

Operating system and Environment details

Linux

Issue

Downloading artifact hosted in S3 returns a 403 despite IAM role being properly configured.

Reproduction steps

  1. Host a file in a private S3 bucket
  2. Configure an EC2 instance with an IAM role that allows getting files from the bucket created in 1.
  3. Schedule a nomad job with an artifact pointing to the mentioned file.
@c4milo
Copy link
Contributor Author

c4milo commented Apr 20, 2016

I also reported the likely underlined cause at hashicorp/go-getter#22

@dadgar
Copy link
Contributor

dadgar commented Apr 21, 2016

@c4milo I just vendored the change so if you build from master we can see if this is resolved 👍

@c4milo
Copy link
Contributor Author

c4milo commented Apr 21, 2016

@dadgar works well. Thank you Alex!

@c4milo c4milo closed this as completed Apr 21, 2016
@c4milo
Copy link
Contributor Author

c4milo commented May 31, 2016

@dadgar, I'm seeing this problem again with 0.4.0

@c4milo c4milo reopened this May 31, 2016
@c4milo
Copy link
Contributor Author

c4milo commented May 31, 2016

To make sure it wasn't my fault, I manually tested using https://github.com/rlmcpherson/s3gof3r and it downloaded the artifacts correctly. However, nomad does not and returns the following:

@dadgar
Copy link
Contributor

dadgar commented May 31, 2016

@c4milo Did anything change on your end since you marked it as closed? We haven't changed go-getter so wondering if there is another underlying bug in that library

@c4milo
Copy link
Contributor Author

c4milo commented May 31, 2016

@dadgar I haven't changed any of my configurations. I only upgraded nomad to the latest changes in master branch and redeployed it.

@c4milo
Copy link
Contributor Author

c4milo commented May 31, 2016

oh wait, I think the URL format for artifacts caught me again:

Instead of: mybucket.s3.amazonaws.com/containers/vault.tar.gz

I kept on using https://mybucket.s3.amazonaws.com/containers/vault.tar.gz

@c4milo
Copy link
Contributor Author

c4milo commented May 31, 2016

I'm closing this one in favor of #1219

@c4milo c4milo closed this as completed May 31, 2016
lgfa29 pushed a commit that referenced this issue Nov 7, 2022
* Fix s3 URLs so that they work

Unfortunately, s3 urls prefixed with https:// do NOT work with the underlying go-getter library. As such, this fixes the examples so that they are working examples that won't cause problems for people reading the docs.
See discussion in #1113 circa 2016.

* Use s3:// protocol schema for artifact examples

Per the discussion in #15123,
we're going to use the explicit s3 protocol in the examples since that
is the likeliest to work in all scenarios
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants