Pulling jessevondoom's changes to getAuthenticatedURL to support headers and getting the latest AWS time