如何通过 AssumeRole 访问 AWS 的 Web 控制台
", "Principal": { "AWS": "arn:aws:iam::123456789012:user/UserA" }, "Action": "sts:AssumeRole" } ] }二. 获取临时凭证• 使用 AWS CLI 或 SDK 调用 sts:AssumeRole 获取临时凭证: aws sts assume-role \ --role-arn "arn:aws:iam::123456789012:role/RoleA" \ --role-session-name "MySession"返回的结果样例如下:{ "Credentials": { "AccessKeyId": "ASIA...", "SecretAccessKey": "wJal...", "SessionToken...阅读全文