打包器错误:“amazon-ebs:错误查询AMI:AuthFailure”

时间:2015-07-20 18:52:48

标签: windows powershell amazon-web-services packer

我正在尝试创建此处显示的打包程序构建:https://www.packer.io/intro/getting-started/build-image.html

PS C:\dev\tutorials\packer> packer build -var 'aws_access_key=AKI---------' -var 'aws_secret_key==+---------------------------------------' example.json
amazon-ebs output will be in this color.

==> amazon-ebs: Prevalidating AMI Name...
==> amazon-ebs: Error querying AMI: AuthFailure: AWS was not able to validate the provided access credentials
==> amazon-ebs:         status code: 401, request id: []
Build 'amazon-ebs' errored: Error querying AMI: AuthFailure: AWS was not able to validate the provided access credentials
        status code: 401, request id: []

==> Some builds didn't complete successfully and had errors:
--> amazon-ebs: Error querying AMI: AuthFailure: AWS was not able to validate the provided access credentials
        status code: 401, request id: []

==> Builds finished but no artifacts were created.

我尝试在AWS中为我的用户提供AmazonEC2FullAccess政策。 我的命令是否正确?

我在Windows 8上,使用powershell。

1 个答案:

答案 0 :(得分:0)

感谢您的帮助@ MathiasR.Jessen。

凭据来自credentials.csv文件。我用Excel打开了这个文件,单击了C2列并将值复制到那里。这是一个问题,因为excel会在值框的开头添加一个等号:/