简体   繁体   中英

EC2ResponseError: 401 Unauthorized AWS was not able to validate the provided access for an ec2 instance

I have two ec2 instances A and B both in same region, security group etc. I use boto to perform connection.

After updating boto from version 2.34.0 to version 2.35.0 I cannot connect to host from instance A, but able to connect from instance B.

AuthFailure AWS was not able to validate the provided access credentials

I have found out that possible reason of such issue is that boto Switch elb/ec2 over to signature version 4

How does that possible that I am able to connect from machine B, but couldn't connect from machine A ?( python code responsible for connection same on both instances)

What could cause such strange situation ? Thanks

The SigV4 authentication method places a greater demand on keeping the clock on the requesting device in sync with the clock on the server. It's possible that the clock on the instance that is no longer working has drifted past the 5 minute limit but is still within the 15 minute limit required by the previous SigV2 signing algorithm.

Try sync'ing the clock on both instances.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM