AuthFailure => AWS was not able to validate the provided access credentials
Opened this issue ยท 39 comments
Env: MacOsX 10.10.2
Ruby: 2.1.5
Vagrant: 1.7.2
vagrant-aws: 0.6.0
vagrant up --provider=aws
An unexpected error occurred when executing the action on the
<my machine> machine. Please report this as a bug:
AuthFailure => AWS was not able to validate the provided access credentials
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/middlewares/expects.rb:6:in `response_call'
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/middlewares/response_parser.rb:8:in `response_call'
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/connection.rb:372:in `response'
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/connection.rb:236:in `request'
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/middlewares/idempotent.rb:26:in `error_call'
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/middlewares/base.rb:10:in `error_call'
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/middlewares/base.rb:10:in `error_call'
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/connection.rb:256:in `rescue in request'
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/connection.rb:204:in `request'
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/middlewares/idempotent.rb:26:in `error_call'
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/middlewares/base.rb:10:in `error_call'
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/middlewares/base.rb:10:in `error_call'
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/connection.rb:256:in `rescue in request'
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/connection.rb:204:in `request'
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/middlewares/idempotent.rb:26:in `error_call'
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/middlewares/base.rb:10:in `error_call'
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/middlewares/base.rb:10:in `error_call'
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/connection.rb:256:in `rescue in request'
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/connection.rb:204:in `request'
/Users/myuser/.vagrant.d/gems/gems/fog-xml-0.1.1/lib/fog/xml/sax_parser_connection.rb:37:in `request'
/Users/myuser/.vagrant.d/gems/gems/fog-xml-0.1.1/lib/fog/xml/connection.rb:7:in `request'
/Users/myuser/.vagrant.d/gems/gems/fog-aws-0.1.1/lib/fog/aws/compute.rb:528:in `_request'
/Users/myuser/.vagrant.d/gems/gems/fog-aws-0.1.1/lib/fog/aws/compute.rb:523:in `request'
/Users/myuser/.vagrant.d/gems/gems/fog-aws-0.1.1/lib/fog/aws/requests/compute/describe_security_groups.rb:38:in `describe_security_groups'
/Users/myuser/.vagrant.d/gems/gems/fog-aws-0.1.1/lib/fog/aws/models/compute/security_groups.rb:64:in `all'
/Users/myuser/.vagrant.d/gems/gems/vagrant-aws-0.6.0/lib/vagrant-aws/action/run_instance.rb:192:in `block in allows_ssh_port?'
/Users/myuser/.vagrant.d/gems/gems/vagrant-aws-0.6.0/lib/vagrant-aws/action/run_instance.rb:191:in `map'
/Users/myuser/.vagrant.d/gems/gems/vagrant-aws-0.6.0/lib/vagrant-aws/action/run_instance.rb:191:in `allows_ssh_port?'
/Users/myuser/.vagrant.d/gems/gems/vagrant-aws-0.6.0/lib/vagrant-aws/action/run_instance.rb:98:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
/Users/myuser/.vagrant.d/gems/gems/vagrant-aws-0.6.0/lib/vagrant-aws/action/elb_register_instance.rb:16:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
/Users/myuser/.vagrant.d/gems/gems/vagrant-aws-0.6.0/lib/vagrant-aws/action/warn_networks.rb:14:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/synced_folders.rb:84:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/provision.rb:80:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builder.rb:116:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:in `block in run'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/util/busy.rb:19:in `busy'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:in `run'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/call.rb:53:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
/Users/myuser/.vagrant.d/gems/gems/vagrant-aws-0.6.0/lib/vagrant-aws/action/connect_aws.rb:43:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/handle_box.rb:56:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builder.rb:116:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:in `block in run'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/util/busy.rb:19:in `busy'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:in `run'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/machine.rb:214:in `action_raw'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/machine.rb:191:in `block in action'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:516:in `lock'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/machine.rb:178:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/machine.rb:178:in `action'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
That sounds like a bad username and access key. Check your was credentials
and try again.
On 10 Mar 2015 18:46, "michal-jobseeker" notifications@github.com wrote:
Env: MacOsX 10.10.2
Ruby: 2.1.5
Vagrant: 1.7.2
vagrant-aws: 0.6.0vagrant up --provider=aws
An unexpected error occurred when executing the action on the
machine. Please report this as a bug:AuthFailure => AWS was not able to validate the provided access credentials
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/middlewares/expects.rb:6:in
response_call' /Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/middlewares/response_parser.rb:8:in
response_call'
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/connection.rb:372:inresponse' /Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/connection.rb:236:in
request'
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/middlewares/idempotent.rb:26:inerror_call' /Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/middlewares/base.rb:10:in
error_call'
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/middlewares/base.rb:10:inerror_call' /Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/connection.rb:256:in
rescue in request'
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/connection.rb:204:inrequest' /Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/middlewares/idempotent.rb:26:in
error_call'
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/middlewares/base.rb:10:inerror_call' /Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/middlewares/base.rb:10:in
error_call'
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/connection.rb:256:inrescue in request' /Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/connection.rb:204:in
request'
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/middlewares/idempotent.rb:26:inerror_call' /Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/middlewares/base.rb:10:in
error_call'
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/middlewares/base.rb:10:inerror_call' /Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/connection.rb:256:in
rescue in request'
/Users/myuser/.vagrant.d/gems/gems/excon-0.44.4/lib/excon/connection.rb:204:inrequest' /Users/myuser/.vagrant.d/gems/gems/fog-xml-0.1.1/lib/fog/xml/sax_parser_connection.rb:37:in
request'
/Users/myuser/.vagrant.d/gems/gems/fog-xml-0.1.1/lib/fog/xml/connection.rb:7:inrequest' /Users/myuser/.vagrant.d/gems/gems/fog-aws-0.1.1/lib/fog/aws/compute.rb:528:in
_request'
/Users/myuser/.vagrant.d/gems/gems/fog-aws-0.1.1/lib/fog/aws/compute.rb:523:inrequest' /Users/myuser/.vagrant.d/gems/gems/fog-aws-0.1.1/lib/fog/aws/requests/compute/describe_security_groups.rb:38:in
describe_security_groups'
/Users/myuser/.vagrant.d/gems/gems/fog-aws-0.1.1/lib/fog/aws/models/compute/security_groups.rb:64:inall' /Users/myuser/.vagrant.d/gems/gems/vagrant-aws-0.6.0/lib/vagrant-aws/action/run_instance.rb:192:in
block in allows_ssh_port?'
/Users/myuser/.vagrant.d/gems/gems/vagrant-aws-0.6.0/lib/vagrant-aws/action/run_instance.rb:191:inmap' /Users/myuser/.vagrant.d/gems/gems/vagrant-aws-0.6.0/lib/vagrant-aws/action/run_instance.rb:191:in
allows_ssh_port?'
/Users/myuser/.vagrant.d/gems/gems/vagrant-aws-0.6.0/lib/vagrant-aws/action/run_instance.rb:98:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in
call'
/Users/myuser/.vagrant.d/gems/gems/vagrant-aws-0.6.0/lib/vagrant-aws/action/elb_register_instance.rb:16:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in
call'
/Users/myuser/.vagrant.d/gems/gems/vagrant-aws-0.6.0/lib/vagrant-aws/action/warn_networks.rb:14:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in
call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/synced_folders.rb:84:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in
call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/provision.rb:80:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in
call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:95:inblock in finalize_action' /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in
call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builder.rb:116:in
call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:inblock in run' /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/util/busy.rb:19:in
busy'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:inrun' /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/call.rb:53:in
call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:incall' /Users/myuser/.vagrant.d/gems/gems/vagrant-aws-0.6.0/lib/vagrant-aws/action/connect_aws.rb:43:in
call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/config_validate.rb:25:in
call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/handle_box.rb:56:in
call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builder.rb:116:in
call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:inblock in run' /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/util/busy.rb:19:in
busy'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:inrun' /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/machine.rb:214:in
action_raw'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/machine.rb:191:inblock in action' /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:516:in
lock'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/machine.rb:178:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/machine.rb:178:in
action'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'โ
Reply to this email directly or view it on GitHub
#372.
Yeah, the creds are correct. And not switched (key with secret).
Gem versions:
CFPropertyList-2.3.0
excon-0.44.4
fission-0.5.0
fog-1.28.0
fog-atmos-0.1.0
fog-aws-0.1.1
fog-brightbox-0.7.1
fog-core-1.29.0
fog-ecloud-0.0.2
fog-json-1.0.0
fog-profitbricks-0.0.1
fog-radosgw-0.0.3
fog-riakcs-0.1.0
fog-sakuracloud-1.0.0
fog-serverlove-0.1.1
fog-softlayer-0.4.1
fog-storm_on_demand-0.1.0
fog-terremark-0.0.4
fog-vmfusion-0.0.1
fog-voxel-0.0.2
fog-xml-0.1.1
formatador-0.2.5
inflecto-0.0.2
ipaddress-0.8.0
json-1.8.2
multi_json-1.11.0
net-ssh-2.9.2
rdoc-4.2.0
vagrant-aws-0.6.0
I encountered the same issue.
Env: Ubuntu 12.04
Ruby: 2.0.0
Vagrant: 1.7.2
vagrant-aws: 0.6.0
I was having the same problem on my Ubuntu 14.04.2 LTS laptop. I noticed my computer's clock was wrong, even though it was set to update "automatically from the internet." Running the following fixed my computer's clock and resolved my connection issues to AWS:
sudo ntpdate ntp.ubuntu.com
@jimafisk if your PC's clock was wrong, such as the time of the PC is more than an hour to now, the error I got is "Request has expired." This is a totally different problem.
@jimafisk yeah that was the issue, if the time is wrong by more than a few minutes like 5 it will not work
and the issue vagrant actually reports is fairly confusing
I have the same issue.
My credentials are correct.
I've checked the clock and username and access key... ok!
Please, someone solved the problem?
Env: Ubuntu 12.04 | Debian Wheezy
Ruby: 2.2.1p85
Vagrant: 1.7.2
vagrant-aws: 0.6.0
I too am having this issue. I have checked my clock and access key and secret.
vagrant status - works fine, no connection issues to AWS.
vagrant up - fails with the "AuthFailure => AWS was not able to validate the provided access credentials" error.
Please let me know what further information you need that may assist with troubleshooting.
Turns out this was an issue with the file format of my sourced bash file containing the environment variables. Which caused the ID and SECRET variables to have invisible trailing whitespace which caused issues with the AWS authentication.
Fixing the file format on the bash sourced file and reloading the environment variables, fixed my issue.
I'm having issue setting up the dummy demo outlined in README.md
here's my ruby Vagrant script
Vagrant.configure("2") do |config|
config.vm.box = "dummy"
config.vm.provider :aws do |aws, override|
aws.access_key_id = "asdf"
aws.secret_access_key = "asdf"
aws.region = "us-east-1"
aws.ami = "ami-7747d01e"
override.ssh.username = "ubuntu"
override.ssh.private_key_path = "/Users/me/.ssh/id_rsa"
end
end
I get the following error, look at the last line.
โ โ vagrant up --provider=aws
Bringing machine 'default' up with 'aws' provider...
==> default: Warning! The AWS provider doesn't support any of the Vagrant
==> default: high-level network configurations (`config.vm.network`). They
==> default: will be silently ignored.
==> default: Warning! You didn't specify a keypair to launch your instance with.
==> default: This can sometimes result in not being able to access your instance.
==> default: Launching an instance with the following settings...
==> default: -- Type: m3.medium
==> default: -- AMI: ami-7747d01e
==> default: -- Region: us-east-1
==> default: -- Block Device Mapping: []
==> default: -- Terminate On Shutdown: false
==> default: -- Monitoring: false
==> default: -- EBS optimized: false
==> default: -- Assigning a public IP address in a VPC: false
There was an error talking to AWS. The error message is shown
below:
AuthFailure => AWS was not able to validate the provided access credentials
@BardiaAfshin, are you missing aws.keypair_name
? Also, make sure the keypair was created for the same region as specified in the Vagrantfile
.
I was having this issue when my keys stopped working for some reason. You can check if your keys work with this Python script:
#!/bin/env python
import boto.ec2
conn = boto.ec2.connect_to_region('us-west-2', aws_access_key_id=key_id, aws_secret_access_key=key)
regions = conn.get_all_regions()
print(regions)
For me I had the same error "AWS was not able to validate the provided access credentials", the problem was as @jimafisk metioned, my computer's clock was wrong I used his provided command and it passed this issue.
I've ran ntupdate on my box, this issue persists.
If your AWS credentials are saved in ~/.boto file, use the following convention for saving the credentials it's more safe since boto checks for credentials in that path first
~/.aws/credentials
And write your profile as following
[default]
...
[test]
...
Updating the time fixed it for me. Thank you.
Correcting the system time got this fixed.
system time skeq was my problem too. sudo ntpdate pool.ntp.org
fixed it for me.
yes ntp enabled and running resolved also for me
Having the same issue. Time is correct. It works in awscli and from @sakovias python snippet. But when running vagrant up --provider=aws
I get the following:
AuthFailure => AWS was not able to validate the provided access credentials
Running Vagrant 1.8.1 and aws-cli 1.10.35 on OS X 10.11.5
I'm also facing this same issue.
: AuthFailure => AWS was not able to validate the provided access credentials (Fog::Compute::AWS::Error)
exporting AWS_SESSION_TOKEN fixes the issue. Not sure, whether its needed or not.
I had this issue and it resolved when I renewed my aws-credential-client because I had short lived creds.
Hi all!
I've had the same problem and I've solved as @jimafisk shown in this comment.
I've checked the time of my machine, executing date
command, and I've realized that the time was behind as comparing with an "official" time (for example https://time.is/es/). So I've executed the command sudo ntpdate ntp.ubuntu.com
and everything works as expected.
Thanks a lot!
Regards,
Miguel.
hello
i had the same problem, i configure the time and date with correct zone
i have Linux debian S.O
๐ @danielrive . After I set the time in OSX worked like a charm again
This is very common problem, I keep getting this errors all of sudden working from terminal. All that I needed to make sure is to set correct time on the local machine. For some reason clock its out of sync. Goto google search for UTC time. Then on your local machine type "Date" you will fine time difference. Set to correct time using date +%T -s "11:14:00". You should be all set.
If you're really sure the credentials are right I resolved my issue using these commands:
sudo apt-get update
sudo apt install ntpdate
sudo ntpdate ntp.ubuntu.com
Thanks to @jimafisk
I had the same issue on Mac and it turned out my corporate computer was using a corporate time service which was a couple of minutes behind. Changed it to apple time service and it fixed the issue.
Correcting the system time got it fixed.
Although below command sometimes does not update the time if ntpd is already running.
sudo ntpdate pool.ntp.org
Follow the below steps
sudo service ntp stop
sudo ntpdate pool.ntp.org
sudo service ntp start
Thanks to @jimafisk
For what it's worth, I was having this issue (AWS was not able to validate the provided access credentials) and I stumbled on this page when looking for help.
It turned out there were two sets of credentials stored on my box: one under c:.aws\ and one under c:\users\myname.aws. Once I fixed both, I was fine.
Check that the server clock is synchronized.
If the clock is delayed, can cause this error:
AWS was not able to validate the provided access credentials
I confirm also that sudo ntpdate pool.ntp.org
solved the issue in Fedora 30
I had the same issue on Ubuntu 18.04. I had to do the following:
sudo apt-get install -y ntp
sudo service ntp stop
sudo ntpd -gq
sudo service ntp start
NB: This is the preferred method of updating the system time on Ubuntu, as ntpdate
is deprecated.
sudo ntpdate pool.ntp.org solved for me
check this one. worked for me https://aws.amazon.com/premiumsupport/knowledge-center/iam-validate-access-credentials/
This caught me out when calling the boto library from an earlier version of ansible
You need to use a different env variable name for the session token, run this after you export your keys from aws programatically
AWS_SECURITY_TOKEN="${AWS_SESSION_TOKEN}"
It also won't work if creds come from an exported AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
but an empty AWS_SESSION_TOKEN
is also set. To resolve do: unset AWS_SESSION_TOKEN
.
My system's time is properly syncing with actual time and also my aws_access_key
and aws_secret_key
are correct.
Then also facing the issue of
AuthFailure : AWS was not able to validate the provided access credentials
ResponseError404