如何在 AWS lambda 中获取亚马逊账户电子邮件信息



我在亚马逊中使用lambda函数。有没有办法从lambda函数中的python代码获取链接到AWS账户的电子邮件ID。

AWS 命令行界面 (CLI( 中的 describe-organization 命令返回以下信息:

aws organizations describe-organization

输出:

{
  "Organization": {
    "MasterAccountArn": "arn:aws:organizations::111111111111:account/o-exampleorgid/111111111111",
    "MasterAccountEmail": "bill@example.com",
    "MasterAccountId": "111111111111",
    "Id": "o-exampleorgid",
    "FeatureSet": "ALL",
    "Arn": "arn:aws:organizations::111111111111:organization/o-exampleorgid",
    "AvailablePolicyTypes": [
      {
        "Status": "ENABLED",
        "Type": "SERVICE_CONTROL_POLICY"
    ]
  }
}
AWS

Organizations 于 2017 年初推出,用于管理层次结构中的多个 AWS 账户。

请参阅: AWS 组织文档

最新更新