투케이2K

336. (TWOK/ERROR) [AWS] Register thing workflow execution terminates .. Thing Type not found 본문

투케이2K 에러관리

336. (TWOK/ERROR) [AWS] Register thing workflow execution terminates .. Thing Type not found

투케이2K 2025. 11. 17. 19:28
728x90

[환경 설정 및 설명]

프로그램 : AWS

설 명 : [AWS] Register thing workflow execution terminates .. Thing Type not found

 

[설 명]

--------------------------------------------------------------------------
[개발 및 테스트 환경]
--------------------------------------------------------------------------

- 제목 : [AWS] Register thing workflow execution terminates .. Thing Type not found


- 테스트 환경 : AWS / Iot / Provisioning


- 사전) Aws Iot Core 간단 설명 : 

  >> AWS IoT 는 IoT 디바이스를 다른 디바이스 및 AWS 클라우드 서비스에 연결하는 클라우드 서비스를 제공합니다.

  >> 디바이스가에 연결할 수 있는 경우 AWS IoT는 AWS 가 제공하는 클라우드 서비스에 디바이스를 AWS IoT 연결할 수 있습니다.

  >> AWS IoT Core 메시지 브로커는 MQTT 및 MQTT over WSS 프로토콜을 사용하여 메시지를 게시하고 구독하는 디바이스 및 클라이언트를 지원합니다. 
  
    - HTTPS 프로토콜을 사용하여 메시지를 게시하는 디바이스와 클라이언트도 지원합니다.


- 사전) 프로비저닝 (Provisioning) 간단 설명 : 

  >> AWS IoT Core의 디바이스 프로비저닝(Provisioning) 은 신규 디바이스가 AWS IoT에 안전하게 등록될 수 있도록 자동화된 절차를 제공하는 기능입니다

--------------------------------------------------------------------------





--------------------------------------------------------------------------
[에러 원인]
--------------------------------------------------------------------------

1. AWS Fleet Provisioning 프로비저닝 수행 시 템플릿 등록 과정에서 (Subscribe , Publish) AWS IOT Core 에 요청 한 Thing Type 이 없어 발생하는 이슈


2. 에러 발생 로그 전문 : 

{
	"statusCode": 400,
	"errorCode": "ProvisioningFailed",
	"errorMessage": "Register thing workflow execution terminates due to: Thing Type 123456789012:TEST_DEVICE not found. (Service: AWSIot; Status Code: 400; Error Code: ResourceRegistrationFailureException; Request ID: 6ec..2c; Proxy: null)"
}

--------------------------------------------------------------------------





--------------------------------------------------------------------------
[해결 방법]
--------------------------------------------------------------------------

1. AWS IOT Core 콘솔에 접속 후 등록 가능 한 사물 유형 타입 확인

  >> AWS IoT > 관리 > 모든 디바이스 선택

  >> 모든 디바이스 > 사물 유형 선택

  >> 등록 가능 한 사물 유형 타입 리스트 확인


2. AWS IOT Core 콘솔에서 프로비저닝 템플릿 문서 확인 및 JSON 편집 수행 (등록 가능한 사물 유형 타입 지정)

  >> AWS IoT > 연결 > 프로비저닝 템플릿 선택

  >> 특정 프로비저닝 템플릿 클릭 > 현재 활성화 된 버전의 프로비저닝 템플릿 문서 클릭

  >> JSON 편집


3. AWS IOT Core 에 생성되어 있는 사물 유형, 사물 그룹, 정책 지정 수행

{
  "Parameters": {
    "MacAddress": {
      "Type": "String"
    },
    "SerialNumber": {
      "Type": "String"
    },
    "DeviceId": {
      "Type": "String"
    },
    "Version": {
      "Type": "String"
    },
    "AWS::IoT::Certificate::Id": {
      "Type": "String"
    }
  },
  "Resources": {
    "policy_default_poilcy": {
      "Type": "AWS::IoT::Policy",
      "Properties": {
        "PolicyName": "default_poilcy" ----------------> 정책 (iot:Connect)
      }
    },
    "certificate": {
      "Type": "AWS::IoT::Certificate",
      "Properties": {
        "CertificateId": {
          "Ref": "AWS::IoT::Certificate::Id"
        },
        "Status": "Active"
      }
    },
    "thing": {
      "Type": "AWS::IoT::Thing",
      "OverrideSettings": {
        "AttributePayload": "MERGE",
        "ThingGroups": "DO_NOTHING",
        "ThingTypeName": "REPLACE"
      },
      "Properties": {
        "AttributePayload": {
          "macAddress": {
            "Ref": "MacAddress"
          }
        },
        "ThingGroups": [  ----------------> 사물 그룹
          "SAMPLE_DEVICE_GROUP"
        ],
        "ThingName": {
          "Fn::Join": [
            "",
            [
              "S_",
              {
                "Ref": "DeviceId"
              }
            ]
          ]
        },
        "ThingTypeName": "SAMPLE_DEVICE" ----------------> 사물 타입
      }
    }
  }
}

--------------------------------------------------------------------------





--------------------------------------------------------------------------
[참고 사이트]
--------------------------------------------------------------------------

[Aws Iot Core] Fleet provisioning 플릿 프로비저닝 수행 방법 정리 - 클레임 인증서 , 신뢰할 수 있는 사용자

https://blog.naver.com/kkh0977/223779257161?trackingCode=blog_bloghome_searchlist


[Aws Iot Core] Aws Iot Core 프로비저닝 템플릿 (Template) 설명

https://blog.naver.com/kkh0977/223698047733?trackingCode=blog_bloghome_searchlist


[Android] aws 프로비저닝 템플릿 등록 statusCode 400 InvalidPayload Message cannot be parsed

https://blog.naver.com/kkh0977/223720523889?trackingCode=blog_bloghome_searchlist


[Aws Iot Core] 프로비저닝 Provisioning By MQTT 와 HTTPS 차이점 정리

https://blog.naver.com/kkh0977/224062183649?trackingCode=blog_bloghome_searchlist


[Android] AWS 프로비저닝 (Fleet Provisioning) 수행 후 shadow 쉐도우 구독 시 연결 유실 이슈

https://blog.naver.com/kkh0977/223129997607?trackingCode=blog_bloghome_searchlist

--------------------------------------------------------------------------
 
728x90
반응형
Comments