为什么Chef kitchen创建无法验证我的AWS密钥?

时间:2017-04-27 23:52:04

标签: macos ssh amazon-ec2 chef test-kitchen

我遇到了厨房创造的问题。表示未能验证提供的访问凭据。不知道为什么。

--------------
>>>>>> ------Exception-------

>>>>>> Class: Kitchen::ActionFailed

>>>>>> Message: 1 actions failed.

>>>>>> Failed to complete #create action: [AWS was not able to validate the provided access credentials] on default-centos-72

>>>>>> ----------------------

>>>>>> Please see .kitchen/logs/kitchen.log for more details

>>>>>> Also try running `kitchen diagnose --all` for configuration

我使用CentOS 7 -x86_64-在带有EC2 AWS实例的macosx终端上运行 - 使用更新HVM-1602-AutogenByAWSMP -

所有端口都打开80,22和443

key是AWS的访问密钥,之前已成功使用。

.kitchen.yml如下:

---

driver:

name: ec2

aws_ssh_key_id: learn-chef

region: us-west-2

availability_zone: c

subnet_id: subnet-c6bfa69e

instance_type: t2.micro

image_id: ami-d2c924b2

security_group_ids: sg-1af04361

retryable_tries: 120

provisioner:

name: chef_zero

verifier:

name: inspec

transport:

ssh_key: /Users/gavindevops/.ssh/GavinChefKey.pem

platforms:

- name: centos-7.2

suites:

- name: default

run_list:

- recipe[learn_chef_httpd::default]

verifier:

inspec_tests:

- test/smoke/default

attributes:

1 个答案:

答案 0 :(得分:0)

完全弄明白了。我真笨。我没有在/root/.aws/credentials中更新我的凭证文件以获取我的访问权限和密钥。

鸡蛋和我的脸一致。

相关问题