vagrant-aws:AWS无法验证提供的访问凭据

时间:2016-05-14 06:12:18

标签: amazon-web-services amazon-ec2 vagrant vagrantfile vagrant-windows

我在Windows 10上,使用vagrant-aws(https://github.com/mitchellh/vagrant-aws)进行流浪和亚马逊实例,并收到以下错误。我也列出了我的Vagrant文​​件。

另外,有些人报道这可能是由时间引起的。我已经在Windows 10上同步了系统时间,但仍然没有运气!

$ vagrant up --provider=aws
Bringing machine 'default' up with 'aws' provider...
C:/Users/jacky/.vagrant.d/gems/gems/vagrant-aws-0.7.0/lib/vagrant-aws/action/run_instance.rb:98: warning: duplicated key at line 100 ignored: :associate_public_ip
==> 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: Launching an instance with the following settings...
==> default:  -- Type: m3.medium
==> default:  -- AMI: ami-42116522
==> default:  -- Region: us-west-1
==> default:  -- Keypair: 2016_05_14_keypair
==> default:  -- Block Device Mapping: []
==> default:  -- Terminate On Shutdown: false
==> default:  -- Monitoring: false
==> default:  -- EBS optimized: false
==> default:  -- Source Destination check:
==> default:  -- Assigning a public IP address in a VPC: false
==> default:  -- VPC tenancy specification: default
There was an error talking to AWS. The error message is shown
below:

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

Vagrang文件:

Vagrant.configure("2") do |config|
  config.vm.box = "dummy"

  config.vm.provider :aws do |aws, override|
    aws.access_key_id = "..."
    aws.secret_access_key = "..."
    aws.session_token = "..."
    aws.keypair_name = "2016_05_14_keypair"

    aws.ami = "ami-42116522"
    aws.region  = "us-west-1"
    #aws.instance_type = "t2.small"
    override.ssh.username = "ubuntu"
    override.ssh.private_key_path = "C:/2016_05_14_keypair.pem"
  end
end

2 个答案:

答案 0 :(得分:2)

我知道这对你来说可能有点晚了。我的Vagrant文​​件与你的文件相同,我和你有同样的问题,我通过删除" aws.session_token ="来解决它。线。

答案 1 :(得分:0)

我的解决方案更简单。我把地区名称中的“US”大写 - 它区分大小写 - doh!