[chef] Re: http_request head on S3 pre-signed URL gets 403 error


Chronological Thread 
  • From: Daniel DeLeo < >
  • To:
  • Subject: [chef] Re: http_request head on S3 pre-signed URL gets 403 error
  • Date: Thu, 20 Jun 2013 11:39:39 -0700


On Wednesday, June 19, 2013 at 11:49 AM, Jorge Bianquetti wrote:

Ohai!

I've been reading
implemented something like this:

local = "some_local_file"
remote = "pre-signed_S3_url"

remote_file local do
source remote
action :nothing
end

http_request "HEAD #{remote}" do
message ""
url remote
action :head
if File.exists?(local)
headers "If-Modified-Since" => File.mtime(local).httpdate
end
notifies :create, "remote_file[local]", :immediately
end

I get this response from chef-client:

FATAL: Net::HTTPServerException:
http_request[HEAD
(some::backend line 140) had an error: Net::HTTPServerException: 403
"Forbidden"

I supposed this an Chef issue, because all it's fine when I run:


Chef's versions on servers are 10.26.0 (soon, migration to chef11)

Thanks!
Not sure what your current issue is, but Chef 11.6 will be adding automatic conditional GET for remote_file resources. I hope you can give the beta a spin when released (hopefully soon, we'll announce it here).

-- 
Daniel DeLeo




Archive powered by MHonArc 2.6.16.

§