🕰️ 작성일 : 2025.06.04
Q1 : 내/외부 규제로 인하여 현재 서울 리전의 Bedrock API만을 호출 할 수 밖에 없습니다. AWS에 Account 당 Bedrock API Limit이 있기 때문에, 여러 Account에 대해 안전하게 API를 호출 하는 방법이 있을까요?
Q2 : Bedrock CRIS을 통해서 최신 LLM 모델을 Invoke하고 있지만 Throttling이 발생합니다. 이 경우 여러 Account에 대해 안전하게 API를 호출 하는 방법이 있을까요?
A : :
**** 아래의 테스트는 오직 Private Subnet으로만 구성된 VPC 환경에서 테스트했습니다.***
# Producer Account Role 신뢰 관계
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::961740251837:role/ec2_bedrock_client"
},
"Action": "sts:AssumeRole"
}
]
}
# Producer Account IAM Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "statement1",
"Effect": "Allow",
"Action": "bedrock:InvokeModel",
"Resource": "*"
}
]
}
# Consumer Account EC2 Role의 Policy
{
"Version": "2012-10-17",
"Statement": {
"Effect": "Allow",
"Action": "sts:AssumeRole",
"Resource": [
"arn:aws:iam::132293766329:role/bedrock_producer",
"arn:aws:iam::407389197493:role/bedrock_producer",
"arn:aws:iam::456422343869:role/bedrock_producer"
]
}
}
(<https://sts.amazonaws.com>)
로 요청하게 됩니다. 이는 VPC Endpoint로의 요청이 아닌 Public IP 기반으로 요청하게 합니다.sts_client = boto3.client('sts',region_name='ap-northeast-2')
각 CloudTrail 로그를 살펴보면 API 수신을 받는 AWS Account ID는 다르지만, VPC Endpoint 정보는 Consumer VPC에 있는 동일한 것(vpce-0ac3a49fba42a1d51)을 확인 할 수 있습니다.