为什么我在Assume Role时调用aws servicecatalog update-provisioned-product会失败?

0

【以下的问题经过翻译处理】 这可以正常工作:

aws servicecatalog update-provisioned-product \
  --product-name my-product-name \
  --provisioned-product-id pp-123 \
  --provisioning-artifact-name latest \
  --profile mypro

这个失败了:

aws servicecatalog update-provisioned-product \
  --product-name my-product-name \
  --provisioned-product-id pp-123 \
  --provisioning-artifact-name latest \
  --profile mypro-github-cdk

在调用UpdateProvisionedProduct操作时发生了ResourceNotFoundException错误:未找到名称为my-product-name的产品

唯一的区别是配置文件 -mypro-github-cdk会Assume Role:arn:aws:iam::1234:role/GitHub-CDK-Deploy

[profile mypro]
region = us-east-1
credential_process = /usr/local/bin/aws_creds aws/mypro

[profile mypro-github-cdk]
region = us-east-1
role_arn = arn:aws:iam::1234:role/GitHub-CDK-Deploy
source_profile = mypro

arn:aws:iam::1234:role/GitHub-CDK-Deploy角色具有以下临时用于测试的内联策略,允许任何操作:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "*",
            "Resource": "*"
        }
    ]
}

问题出在哪里呢?

profile picture
专家
已提问 5 个月前30 查看次数
1 回答
0

【以下的回答经过翻译处理】 这个错误是由于没有将角色关联到Service Catalog Portfolio。 解决办法是,在UI中,导航到“Service Catalog > Portfolios > my-portfolio”。 进入“ Access”选项卡。 点击“Grant Access”,选择“Roles”,选择“GitHub-CDK-Deploy”,然后添加它。

profile picture
专家
已回答 5 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则