Boto3: Authfailure When Trying To Query Aws With Ec2 Client
I've created a small python script that is just querying the AWS spot pricing for certain instances, this was working yesterday and has been for the past week. However despite usin
Solution 1:
After a couple of days of banging my head against the wall, I discovered that the problem was in fact with the timezone on the server.
A manual update had been made to accommodate BST but only to the time, not the timezone.
This meant the server was out of sync with AWS and whilst the error was very unhelpful, it was completely justified.
Updating the NTP server and changing the timezone to BST resolved the issue.
Solution 2:
First check the instance has an IAM role associated with it:
curl http://169.254.169.254/latest/meta-data/iam/info
If you want to get the temporary credentials for the instance, try this:
import boto3
print boto3.Session().get_credentials().access_key
print boto3.Session().get_credentials().secret_key
Post a Comment for "Boto3: Authfailure When Trying To Query Aws With Ec2 Client"