EC2ResponseError:401未经授权使用Saltstack boto_vpc模块 [英] EC2ResponseError: 401 Unauthorized using Saltstack boto_vpc module

查看:95
本文介绍了EC2ResponseError:401未经授权使用Saltstack boto_vpc模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Saltstack和boto_vpc模块创建一个vpc.这是我的状态:

I'm trying to create a vpc using Saltstack and boto_vpc module. This is my state:

vpc_create:
      module.run:
        - name: boto_vpc.create
        - cidr_block: '10.0.0.0/24'
        - vpc_name: 'myVpc'
        - region: 'us-east-1'
        - key: 'ADJJDNEJFJGNFKFKFKIW'
        - keyid: 'SJDJNFNEJUWLLLCLCLENNRBFLGSLSLKEMFUHE'

我正在使用的键是正确的,但是出现了这个错误:

[INFO    ] Running state [boto_vpc.create] at time 14:25:35.839797
[INFO    ] Executing state module.run for boto_vpc.create
[ERROR   ] EC2ResponseError: 401 Unauthorized
<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>AuthFailure</Code><Message>AWS was not able to validate the provided access credentials</Message></Error></Errors><RequestID>7cb74939-afda-4722-a31e-2855c5cbe16b</RequestID></Response>
[ERROR   ] {'ret': False}
[INFO    ] Completed state [boto_vpc.create] at time 14:25:35.882840
[DEBUG   ] File /var/cache/salt/minion/accumulator/49944656 does not exist, no need to cleanup.
[DEBUG   ] LazyLoaded highstate.output
[DEBUG   ] LazyLoaded nested.output
local:
----------
          ID: vpc_create
    Function: module.run
        Name: boto_vpc.create
      Result: False
     Comment: Module function boto_vpc.create executed
     Started: 14:25:35.839797
    Duration: 43.043 ms
     Changes:
              ----------
              ret:
                  False

盐堆版本:

Salt: 2015.5.0
         Python: 2.6.9 (unknown, Apr  1 2015, 18:16:00)
         Jinja2: 2.7.2
       M2Crypto: 0.21.1
 msgpack-python: 0.4.6
   msgpack-pure: Not Installed
       pycrypto: 2.6.1
        libnacl: Not Installed
         PyYAML: 3.10
          ioflo: Not Installed
          PyZMQ: 14.3.1
           RAET: Not Installed
            ZMQ: 3.2.5
           Mako: Not Installed

我尝试了aws ec2 create-vpc --cidr-block 10.0.0.0/16并且工作正常!

I tried with aws ec2 create-vpc --cidr-block 10.0.0.0/16 and works fine!

推荐答案

通过阅读

From reading the salt reference, it looks like keyid represents the access key and key represents the secret key. Have you accidentally transposed them?

这篇关于EC2ResponseError:401未经授权使用Saltstack boto_vpc模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆