amazon-web-services - Get Account ID from Account Alias (boto3)
问题描述
Provided with an AWS Account alias, I would like to convert it to an AWS Account ID. I don't think there is an API for this, as the IAM alias commands in boto3 are limited to create, delete and list, but I figured I would at least ask the community.
My use case is to allow a user to provide either an account alias or account ID to the sts.assume_role() call. If an account ID is specified, great, we can simply build a role_arn from that and pass it to the function call. If an account alias is provided, we need to first convert it to an account ID, then build the role_arn in the same fashion.
解决方案
推荐阅读
- compression - Solaris 11 上的 Apache2.4 gzip 压缩
- pyspark - 如何使用 group by 子句对 pyspark 中的列进行排名
- laravel - 从 laravel 中的数据透视表中删除行
- java - 覆盖maven中的插件依赖项
- python - 如何使用 windows 为 linux 下载 pip 模块
- google-colaboratory - 你如何使用 ColabTurtle?
- flutter - Flutter:如何在 Column 中将容器大小设置为 wrap_content
- python-3.x - 在 selenium webdriver 代码中查找元素
- node.js - 给定表示目录结构的 json 文件,如何使用节点自动创建目录结构?
- java - 如何发送地图
使用 Spring MVC 中的 @PathVariable