【发布时间】:2016-07-28 21:25:31
【问题描述】:
如何找到创建 CloudFormation 堆栈的人员?
我正在使用boto3 列出状态为COMPLETE 的堆栈以及创建堆栈的用户。我可以获得堆栈的所有属性,但无法在 CloudFormation 仪表板或 boto3 CF API 中找到用户信息。知道如何获取创建堆栈的用户的 IAM 用户名吗?
谢谢
我的代码片段:
import boto3
cf = boto3.client('cloudformation', region_name='us-east-1')
stacks = cf.list_stacks(StackStatusFilter=['CREATE_COMPLETE'])['StackSummaries']
names = [stack['StackName'] for stack in stacks]
for name in names:
resources = cf.describe_stack_resources(StackName=name)['StackResources']
...
...
【问题讨论】:
标签: amazon-web-services amazon-cloudformation boto3