Railsplayground / Amazon S3 authenticated_url "Gotcha"

I have been using Railsplayground for a number of years to host a few
RoR
applications which use S3 to store confidential documents. Due to the
nature of the documents, I have been using S3’s “authenticated_url” with
a
10 second timeout. About a week ago my hosted apps stopped working,
even
though they continued to work properly from my development machine on
localhost. The problem was that the hosted server’s clock was off by
about
10 seconds. When I originally asked support if the clock was off, I was
told (incorrectly) that it was correct. Upon modifying my code to
increase
the timeout to 20 seconds, the apps returned to normal operation. Once
I
gave that background info to their support people they actually went in
and
resynced the server’s clock, so I was able to change the timeouts back
to
10 seconds. The lesson… Confirm the accuracy of your server’s clock
if
you use S3 with authenticated_url.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs