Aws::S3::Errors::RequestTimeTooSkewed:
The difference between the request time and the current time is too large.
Encounter this error -sometimes- while working in development and testing.
The uploaded files are small _(< 1 MB)_.
I tried setting the timezone to Ireland Dublin to match my bucket zone eu-west-1 but it didn't work.
I found some helpful configuration that can[be set in other SDKs (.NET, JS):
correctClockSkewsystemClockOffsetI didn't found them in ruby aws sdk or the repository.
Trying to set them in AWS.config raises not known configuration exception.
gem 'aws-sdk', and version: 2.10.125
Ruby 2.4.1, Mac OS X 10.11.6
Upload file to AWS S3 bucket in development environment.
Happens for me in new Rails application with default time zone unchanged:
Aws::S3::Resource.new(client: @client).bucket(@bucket_name)
obj = get_bucket.object("my object")
obj.put({ body: content, acl: 'public-read' })
obj.public_url
@abarrak how did you fix this? 馃槄
My case was in the test context.
I was stubbing Time in other test cases without returning it back to current.
@juanignaciosl Ensure you're not using time stubbing helpers.
If you didn't encounter this tests, then:
Most helpful comment
My case was in the test context.
I was stubbing
Timein other test cases without returning it back tocurrent.@juanignaciosl Ensure you're not using time stubbing helpers.
If you didn't encounter this tests, then:
correctClockSkew), but not ruby unfortunately.