为什么我在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": "*"
        }
    ]
}

问题出在哪里呢?

1回答
0

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

profile picture
エキスパート
回答済み 5ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ