aviral sanjay
aviral sanjay

Reputation: 983

S3 boto connection resulting into ClientError even with the right keys

I am running a command:

aws s3 cp s3://full-key .

I have made sure that the same keys are on both the pcs and yet, one pc is able to access the object while the other receives an error:

/usr/local/lib/python2.7/dist-packages/urllib3/util/ssl_.py:354: SNIMissingWarning: An HTTPS request has been made, but the SNI (Server Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  SNIMissingWarning
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden

It should be noted that my instance's timezone is UTC Command:

timedatectl status                   
      Local time: Fri 2019-01-04 09:04:39 UTC
  Universal time: Fri 2019-01-04 09:04:39 UTC
        Timezone: Etc/UTC (UTC, +0000)
     NTP enabled: yes
NTP synchronized: no
 RTC in local TZ: no
      DST active: n/a

But when I type date I get Fri Jan 4 09:05:44 UTC 2019 However, google displays utc time as: 8:52 am Friday, 4 January 2019 Coordinated Universal Time (UTC)

Upvotes: 0

Views: 204

Answers (1)

aviral sanjay
aviral sanjay

Reputation: 983

I noticed the odd time settings on my ec2 instance. Though the settings were UTC, the time wasn't. When I tried listing all the directories in the bucket, I faced an error: too much time difference resulting into timeout. Hence, I manually changed the time of the instance to the actual UTC time and tried again, accessing the bucket was then possible.

Why did I try time settings? I read somewhere that time could be an issue in here.

Upvotes: 1

Related Questions