vagrant-aws icon indicating copy to clipboard operation
vagrant-aws copied to clipboard

AuthFailure => AWS was not able to validate the provided access credentials

Open ghost opened this issue 10 years ago • 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'

ghost avatar Mar 10 '15 22:03 ghost

That sounds like a bad username and access key. Check your was credentials and try again. On 10 Mar 2015 18:46, "michal-jobseeker" [email protected] wrote:

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 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:inresponse_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: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/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/fog-xml-0.1.1/lib/fog/xml/sax_parser_connection.rb:37:inrequest' /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:indescribe_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:inblock 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:inallows_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:incall' /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:incall' /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:incall' /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:incall' /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:incall' /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: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/builder.rb:116:incall' /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:inbusy' /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: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/connect_aws.rb:43: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/config_validate.rb:25: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/handle_box.rb:56: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/builder.rb:116:incall' /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:inbusy' /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:inaction_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:inlock' /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:inaction' /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 https://github.com/mitchellh/vagrant-aws/issues/372.

IyadKandalaft avatar Mar 10 '15 23:03 IyadKandalaft

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

ghost avatar Mar 10 '15 23:03 ghost

I encountered the same issue. Env: Ubuntu 12.04 Ruby: 2.0.0 Vagrant: 1.7.2 vagrant-aws: 0.6.0

howardzhang avatar Mar 27 '15 06:03 howardzhang

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 avatar Mar 29 '15 15:03 jimafisk

@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.

howardzhang avatar Mar 30 '15 07:03 howardzhang

@jimafisk yeah that was the issue, if the time is wrong by more than a few minutes like 5 it will not work

andreijs avatar Apr 22 '15 00:04 andreijs

and the issue vagrant actually reports is fairly confusing

andreijs avatar Apr 22 '15 00:04 andreijs

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

edson-a-soares avatar Apr 24 '15 14:04 edson-a-soares

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.

joshbaldock avatar May 09 '15 20:05 joshbaldock

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.

joshbaldock avatar May 10 '15 10:05 joshbaldock

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

ghost avatar May 27 '15 22:05 ghost

@BardiaAfshin, are you missing aws.keypair_name ? Also, make sure the keypair was created for the same region as specified in the Vagrantfile.

brijs avatar Jun 22 '15 12:06 brijs

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)

sakovias avatar Sep 16 '15 13:09 sakovias

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.

amr-atef-afifi avatar Oct 22 '15 12:10 amr-atef-afifi

I've ran ntupdate on my box, this issue persists.

ghost avatar Nov 20 '15 00:11 ghost

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] ...

amr-atef-afifi avatar Nov 21 '15 09:11 amr-atef-afifi

Updating the time fixed it for me. Thank you.

MosesMunene avatar Jan 04 '16 13:01 MosesMunene

Correcting the system time got this fixed.

sandeep19 avatar Jan 08 '16 22:01 sandeep19

system time skeq was my problem too. sudo ntpdate pool.ntp.org fixed it for me.

sabrehagen avatar Jan 14 '16 02:01 sabrehagen

yes ntp enabled and running resolved also for me

blues-man avatar May 31 '16 09:05 blues-man

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

ephracis avatar Jun 06 '16 07:06 ephracis

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.

ramsrib avatar Aug 09 '16 01:08 ramsrib

I had this issue and it resolved when I renewed my aws-credential-client because I had short lived creds.

dduffyha avatar Aug 15 '16 02:08 dduffyha

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.

MiguelAngel82 avatar Oct 05 '17 05:10 MiguelAngel82

hello i had the same problem, i configure the time and date with correct zone i have Linux debian S.O

danielrive avatar Oct 25 '17 04:10 danielrive

👍 @danielrive . After I set the time in OSX worked like a charm again

fertobar avatar Nov 03 '17 21:11 fertobar

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.

krisvishwanathan avatar Jan 18 '18 05:01 krisvishwanathan

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

iranianpep avatar May 02 '18 06:05 iranianpep

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.

sallar avatar Sep 10 '18 12:09 sallar

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

rathinikunj avatar Sep 26 '18 06:09 rathinikunj