Procházet zdrojové kódy

设备获取证书BUG 修改

chenshibin před 4 roky
rodič
revize
cc704571b0
1 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. 3 3
      Object/IOTCore/IotObject.py

+ 3 - 3
Object/IOTCore/IotObject.py

@@ -41,13 +41,13 @@ class IOTClient(IOTObject):
             self.client = boto3.client('iot', region_name=AWS_IOT_SES_ACCESS_FOREIGN_REGION_EUROPE,
                                        aws_access_key_id=AWS_IOT_SES_ACCESS_FOREIGN_ID,
                                        aws_secret_access_key=AWS_IOT_SES_ACCESS_FOREIGN_SECRET)
-            self.endpoint = 'a2rqy12o004ad8-ats.iot.eu-west-1.amazonaws.com'
+            self.endpoint = 'a2rqy12o004ad8-ats.iot.us-east-1.amazonaws.com'
 
         if region_id == 4:
             self.client = boto3.client('iot', region_name=AWS_IOT_SES_ACCESS_FOREIGN_REGION_AMERICA,
                                        aws_access_key_id=AWS_IOT_SES_ACCESS_FOREIGN_ID,
                                        aws_secret_access_key=AWS_IOT_SES_ACCESS_FOREIGN_SECRET)
-            self.endpoint = 'a2rqy12o004ad8-ats.iot.us-east-1.amazonaws.com'
+            self.endpoint = 'a2rqy12o004ad8-ats.iot.eu-west-1.amazonaws.com'
 
 
 
@@ -72,7 +72,7 @@ class IOTClient(IOTObject):
                 'certificatePem': result['certificatePem'],
                 'publicKey': result['keyPair']['PublicKey'],
                 'privateKey': result['keyPair']['PrivateKey'],
-                'endpoint': 'a250bbr0p9u7as-ats.iot.cn-northwest-1.amazonaws.com.cn'
+                'endpoint': self.endpoint
             }
             # 搜索是否存在该物品组
             thing_groups_res = self.client.list_thing_groups(nextToken='', maxResults=1,