AWS Lambda Python功能错误'在完成请求之前退出流程'

时间:2016-12-15 15:58:03

标签: python amazon-web-services aws-lambda

我有一个非常简单的脚本,用于枚举帐户中的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"
}

我可以毫无问题地运行其他查询,因此权限不是问题。

非常感谢任何建议。

0 个答案:

没有答案