

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

# 추론 프로파일의 사전 조건
<a name="inference-profiles-prereq"></a>

추론 프로파일을 사용하려면 먼저 다음 사전 조건을 충족했는지 확인하세요.
+ 역할이 추론 프로파일 API 작업에 액세스할 수 있습니다. 역할에 [AmazonBedrockFullAccess](security-iam-awsmanpol.md#security-iam-awsmanpol-AmazonBedrockFullAccess)AWS 관리형 정책이 연결되어 있는 경우이 단계를 건너뛸 수 있습니다. 그렇지 않으면 다음을 수행하세요.

  1. [IAM 정책 생성](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html)의 단계에 따라 다음 정책을 생성합니다. 그러면 역할이 모든 파운데이션 모델 및 추론 프로파일을 사용하여 추론 프로파일 관련 작업을 수행하고 모델 추론을 실행할 수 있습니다.

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

****  

     ```
     {
         "Version":"2012-10-17",		 	 	 
         "Statement": [
             {
                 "Effect": "Allow",
                 "Action": [
                     "bedrock:InvokeModel*",
                     "bedrock:CreateInferenceProfile"
                 ],
                 "Resource": [
                     "arn:aws:bedrock:*::foundation-model/*",
                     "arn:aws:bedrock:*:*:inference-profile/*",
                     "arn:aws:bedrock:*:*:application-inference-profile/*"
                 ]
             },
             {
                 "Effect": "Allow",
                 "Action": [
                     "bedrock:GetInferenceProfile",
                     "bedrock:ListInferenceProfiles",
                     "bedrock:DeleteInferenceProfile",
                     "bedrock:TagResource",
                     "bedrock:UntagResource",
                     "bedrock:ListTagsForResource"
                 ],
                 "Resource": [
                     "arn:aws:bedrock:*:*:inference-profile/*",
                     "arn:aws:bedrock:*:*:application-inference-profile/*"
                 ]
             }
         ]
     }
     ```

------

     (선택 사항) 다음과 같은 방법으로 역할의 액세스를 제한할 수 있습니다.
     + 역할이 수행할 수 있는 API 작업을 제한하려면 액세스를 허용하려는 [API 작업](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonbedrock.html#amazonbedrock-actions-as-permissions)만 포함하도록 `Action` 필드의 목록을 수정합니다.
     + 역할의 특정 추론 프로파일에 대한 액세스를 제한하려면 액세스를 허용하려는 [추론 프로파일](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonbedrock.html#amazonbedrock-resources-for-iam-policies) 및 파운데이션 모델만 포함하도록 `Resource` 목록을 수정합니다. 시스템 정의 추론 프로파일은 `inference-profile`로 시작하고 애플리케이션 추론 프로파일은 `application-inference-profile`로 시작합니다.
**중요**  
첫 설명의 `Resource` 필드에서 추론 프로파일을 지정하는 경우, 연결된 각 리전의 파운데이션 모델도 함께 지정해야 합니다.
     + 추론 프로파일을 통해서만 파운데이션 모델을 간접 호출할 수 있도록 사용자 액세스를 제한하려면 `Condition` 필드를 추가하고 `aws:InferenceProfileArn` [조건 키](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonbedrock.html#amazonbedrock-policy-keys)를 사용합니다. 액세스를 필터링할 추론 프로파일을 지정합니다. 이 조건은 `foundation-model` 리소스의 범위를 지정하는 설명에 포함될 수 있습니다.
     + 예를 들어, 다음 정책을 역할에 연결하면 us-west-2 리전의 {{111122223333}} 계정에서 미국 Anthropic Claude 3 Haiku 추론 프로파일을 통해서만 Anthropic Claude 3 Haiku 모델을 간접 호출할 수 있습니다.

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

****  

       ```
       {
           "Version":"2012-10-17",		 	 	 
           "Statement": [
               {
                   "Effect": "Allow",
                   "Action": [
                       "bedrock:InvokeModel*"
                   ],
                   "Resource": [
                       "arn:aws:bedrock:us-west-2:{{111122223333}}:inference-profile/us.anthropic.claude-3-haiku-20240307-v1:0"
                   ]
               },
               {
                   "Effect": "Allow",
                   "Action": [
                       "bedrock:InvokeModel*"
                   ],
                   "Resource": [
                       "arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-3-haiku-20240307-v1:0",
                       "arn:aws:bedrock:us-west-2::foundation-model/anthropic.claude-3-haiku-20240307-v1:0"
                   ],
                   "Condition": {
                       "StringLike": {
                           "bedrock:InferenceProfileArn": "arn:aws:bedrock:us-west-2:{{111122223333}}:inference-profile/us.anthropic.claude-3-haiku-20240307-v1:0"
                       }
                   }
               }
           ]
       }
       ```

------
     + 예를 들어, 다음 정책을 역할에 연결하면 us-east-2(미국 동부(오하이오)) 리전의 111122223333 계정에서 Global Claude Sonnet 4 추론 프로파일을 통해서만 Anthropic Claude Sonnet 4 모델을 간접 호출할 수 있습니다.

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

****  

       ```
       {
           "Version":"2012-10-17",		 	 	 
           "Statement": [
               {
                   "Effect": "Allow",
                   "Action": [
                       "bedrock:InvokeModel*"
                   ],
                   "Resource": [
                       "arn:aws:bedrock:us-east-2:111122223333:inference-profile/global.anthropic.claude-sonnet-4-20250514-v1:0"
                   ]
               },
               {
                   "Effect": "Allow",
                   "Action": [
                       "bedrock:InvokeModel*"
                   ],
                   "Resource": [
                       "arn:aws:bedrock:us-east-2::foundation-model/anthropic.claude-sonnet-4-20250514-v1:0",
                       "arn:aws:bedrock:::foundation-model/anthropic.claude-sonnet-4-20250514-v1:0"
                   ],
                   "Condition": {
                       "StringLike": {
                           "bedrock:InferenceProfileArn": "arn:aws:bedrock:us-east-2:111122223333:inference-profile/global.anthropic.claude-sonnet-4-20250514-v1:0"
                       }
                   }
               }
           ]
       }
       ```

------
     + 요청 컨텍스트 키 `aws:RequestedRegion`이 지정되지 않음과 같은지 확인하는 `StringEquals` 조건과 함께 명시적 Deny를 추가하여 Global Claude Sonnet 4 추론 프로파일의 사용을 제한할 수도 있습니다. `StringEquals`와 일치하므로 Deny는 추론 요청의 모든 Allow를 재정의하고 글로벌 라우팅을 차단합니다.

       ```
       {
           "Effect": "Deny",
           "Action": [
               "bedrock:InvokeModel*"
           ],
           "Resource": "*",
           "Condition": {
               "StringEquals": {
                   "aws:RequestedRegion": "unspecified"
               }
           }
       },
       ```

  1. [IAM 자격 증명 권한 추가 및 제거](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_manage-attach-detach.html)의 단계에 따라 정책을 역할에 연결하여 역할이 모든 추론 프로파일을 보고 사용할 수 있는 권한을 부여합니다.
+ 추론 프로파일을 직접적으로 호출하려는 리전에서 사용하려는 추론 프로파일에 정의된 모델에 대한 액세스를 요청했습니다.