当我尝试使用AWS SAM在本地运行Lambda函数时,该函数超时。奇怪的是,Visual Studio Console中没有连接任何日志。就像没有调用处理程序。
这是我得到的输出:
sam local invoke --event payload.json "Thumbnail"
2019-07-09 10:29:15 Found credentials in shared credentials file: ~/.aws/credentials
2019-07-09 10:29:15 Invoking bin/thumbnail (go1.x)
2019-07-09 10:29:15 Decompressing /home/stefan/go/src/pipeline/bin/thumbnail.zip
2019-07-09 10:29:16 arn:aws:lambda:us-east-1:757767972066:layer:ffmpeg:1 is already cached. Skipping download
2019-07-09 10:29:16 Requested to skip pulling images ...
2019-07-09 10:29:16 Mounting /tmp/tmpd04si4a7 as /var/task:ro,delegated inside runtime container
2019/07/09 08:29:16 Error has occurred while trying to
START RequestId: 98045d33-fce4-1450-9647-256946512a1f Version: $LATEST
END RequestId: 98045d33-fce4-1450-9647-256946512a1f
REPORT RequestId: 98045d33-fce4-1450-9647-256946512a1f Duration: 300000.00 ms Billed Duration: 300000 ms Memory Size: 128 MB Max Memory Used: 0 MB
{
"errorMessage": "2019-07-09T08:34:16.927Z 98045d33-fce4-1450-9647-256946512a1f Task timed out after 300.00 seconds"
}
2019-07-09 10:34:16 Function 'Thumbnail' timed out after 300 seconds
我如何找出造成这种情况的原因?