3

Account-Aで以下の IAM ロールを使用して作成されたラムダ関数 ( lambda-get-details ) があります。

ロール名ラムダロール

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
            ],
            "Resource": "arn:aws:logs:*:*:*",
            "Effect": "Allow"
        },
        {
            "Action": [
                "config:PutEvaluations",
                "ec2:DescribeImages",
                "sts:AssumeRole"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

同じ IAM ロール名 ( lambdarole ) が、アカウント Bと同様に異なるアカウントで作成されます

アカウント Aのラムダ関数は、たとえばアカウント B (AMI のリスト)から詳細を取得する必要があり、以下のエラーが発生しています。

"errorMessage": "An error occurred (AccessDenied) when calling the AssumeRole operation: User: arn:aws:sts::Account-A:assumed-role/lambdarole/lambda-get-details is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::Account-B:role/lambdarole

誰かが上記の問題を解決するのを手伝ってくれますか?

どんな助けでもいただければ幸いです

ありがとう

4

1 に答える 1