

지원 종료 알림: 2025년 12월 15일에 AWS 에 대한 지원이 종료됩니다 AWS IoT 분석. 2025년 12월 15일 이후에는 AWS IoT 분석 콘솔 또는 AWS IoT 분석 리소스에 더 이상 액세스할 수 없습니다. 자세한 내용은 [AWS IoT 분석 지원 종료를 참조하세요](https://docs.aws.amazon.com/iotanalytics/latest/userguide/iotanalytics-end-of-support.html).

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# DeviceRegistryEnrich 활동
<a name="pipeline-activities-deviceregistryenrich"></a>

`deviceRegistryEnrich` 활동을 통해 AWS IoT 디바이스 레지스트리의 데이터를 메시지 페이로드에 추가할 수 있습니다. 예를 들어 다음과 같은 메시지가 있다고 가정합니다.

```
{
    "temp": 50,
    "hum": 40,
    "device" {
        "thingName": "my-thing"
    }
}
```

다음과 같은 `deviceRegistryEnrich` 활동 추가:

```
{
    "deviceRegistryEnrich": {
        "name": "MyDeviceRegistryEnrichActivity",
        "attribute": "metadata",
        "thingName": "device.thingName",
        "roleArn": "arn:aws:iam::<your-account-number>:role:MyEnrichRole",
        "next": "MyDatastoreActivity"
    }
}
```

이제 출력 메시지는 이 예시와 같이 됩니다.

```
{
    "temp" : 50,
    "hum" : 40,
    "device" {
        "thingName" : "my-thing"
    },
    "metadata" : {
        "defaultClientId": "my-thing",
        "thingTypeName": "my-thing",
        "thingArn": "arn:aws:iot:us-east-1:<your-account-number>:thing/my-thing",
        "version": 1,
        "thingName": "my-thing",
        "attributes": {},
        "thingId": "aaabbbccc-dddeeef-gghh-jjkk-llmmnnoopp"
    }
}
```

활동 정의의 `roleArn` 필드에 적절히 권한이 부착된 역할을 지정해야 합니다. 이 역할은 다음 예시와 같은 권한 정책을 갖고 있어야 합니다.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "iot:DescribeThing"
            ],
            "Resource": [
                "arn:aws:iot:{{us-east-1}}:{{123456789012}}:thing/{{your-thingName}}"
            ]
        }
    ]
}
```

------

또 신뢰 정책은 다음과 같아야 합니다.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "",
            "Effect": "Allow",
            "Principal": {
                "Service": "iotanalytics.amazonaws.com"
            },
            "Action": [
                "sts:AssumeRole"
            ]
        }
    ]
}
```

------