aws lambda: Error: Runtime exited with error: signal: killed
Solution 1
Got the same error when executing the lambda for process an image, Only few results coming when searching in web for this error.
increased the memory to 512mb
to resolve it.
Solution 2
You're reaching memory limit due to boto3 parallel uploading of your file. You could increase memory usage for lambda, but it's cheating... you'll just pay more.
Per default, S3 cli downloads files larger than multipart_threshold=8MB
with max_concurrency=10
parallel threads. It means it will use 80MB for your data, plus threading overhead.
You could reduce to max_concurrency=2
for example, it would use 16MB and it should fit into your lambda memory.
Please note that this may decrease slightly your downloading performance.
import boto3
from boto3.s3.transfer import TransferConfig
config = TransferConfig(max_concurrency=2)
s3 = boto3.client('s3')
s3.download_file('BUCKET_NAME', 'OBJECT_NAME', 'FILE_NAME', Config=config)
Reference: https://docs.aws.amazon.com/cli/latest/topic/s3-config.html
Solution 3
First of all, aws-lambda
is not meant to do long time heavy operations like pulling large files from S3 and write it to RDS.
This process can take too much time depending upon the file size and data. The maximum execution time of aws-lambda is 15 min. So, whatever task you are doing in your lambda should be completed with in the time limit you provided (Max is 15 min).
With large and heavy processing in lambda you can get out of memory error , out of time error or some times to need to extend your processing power.
The other way of doing such large and heavy processing is using AWS Glue
Jobs which is aws managed ETL
service.
Solution 4
It is not timing out at 15 minutes, since that would log this error "Task timed out after 901.02 seconds", which the OP did not get. As others have said, he is running out of memory.
Related videos on Youtube

Matt Takao
Updated on February 03, 2022Comments
-
Matt Takao over 1 year
I'm trying to pull a large file from S3 and write it to RDS using pandas dataframes.
I've been googling this error and haven't seen it anywhere, does anyone know what this extremely generic sounding error could mean? I've encountered memory issues previously but expanding the memory removed that error.
{ "errorType": "Runtime.ExitError", "errorMessage": "RequestId: 99aa9711-ca93-4201-8b1e-73bf31b762a6 Error: Runtime exited with error: signal: killed" }