Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services 在AWS物联网中使用http创建东西api?_Amazon Web Services_Http_Iot_Aws Iot - Fatal编程技术网

Amazon web services 在AWS物联网中使用http创建东西api?

Amazon web services 在AWS物联网中使用http创建东西api?,amazon-web-services,http,iot,aws-iot,Amazon Web Services,Http,Iot,Aws Iot,我是新来的。我在创造东西方面有问题。为此,我阅读了以下文件: 我在授权方面有问题。我得到这个错误: 无法打开到xxxxxx.iot.us east.amazonaws.com:443的TCP连接 (getaddrinfo:名称或服务未知) 我通过以下方式在AWS物联网上创建了thing: class AwsIotService def self.create_thing(thing_name) begin iot = Aws::IoT::Client.new(regi

我是新来的。我在创造东西方面有问题。为此,我阅读了以下文件:

我在授权方面有问题。我得到这个错误:

无法打开到xxxxxx.iot.us east.amazonaws.com:443的TCP连接 (getaddrinfo:名称或服务未知)


我通过以下方式在AWS物联网上创建了thing:

class AwsIotService

  def self.create_thing(thing_name)
    begin
      iot = Aws::IoT::Client.new(region: ENV['AWS_REGION'],
                             access_key_id: ENV['AWS_ACCESS_KEY_ID'],
                             secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'])
      iot.create_thing(thing_name: thing_name)
    rescue Aws::IoT::Errors::ServiceError
    end
  end
end

在同一文档中,请遵循此处的授权文档-我不知道如何进行身份验证您是否尝试使用AWS_控制台创建内容?