def create_thing()

in provisioning_lambda/clients/iot.py [0:0]


    def create_thing(self, thing_name):
        try:
            response = self.client.create_thing(thingName=thing_name)
            self.logger.info('Create thing: %s', thing_name)
        except self.client.exceptions.ResourceAlreadyExistsException as e:
            self.logger.warning('Fail to create iot thing %s, error: %s', thing_name, str(e))
            self.delete_thing(thing_name)
            response = self.client.create_thing(thingName=thing_name)
        return response