【以下的问题经过翻译处理】 这可以正常工作:
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": "*"
}
]
}
问题出在哪里呢?