我有一个非常简单的脚本,用于枚举帐户中的AMI列表并将其IDS收集到列表中。
import boto3
resource = boto3.resource('ec2')
def lambda_handler(event, context):
amis = resource.images.all()
ids = [ami.id for ami in amis]
当我运行这篇文章时,我收到以下错误:
{
"errorMessage": "RequestId: XXX-XXXX-XXXX-XXXX-XXXX Process exited before completing request"
}
我可以毫无问题地运行其他查询,因此权限不是问题。
非常感谢任何建议。