I want to scan file by uising ClamAV from s3 bucket with AWS lambda but size of the local storage in aws lambda that is /tmp 512MB . Im my case i want to download file from s3 bucket in AWS lambda but file size must be grater then 1 GB. Please help me out if anyone knows.

Thanks in Advance

2

There are 2 best solutions below

1
On

Lambda Limit is 512 Mb Lambda Limits, and cannot be changed.

The following quotas apply to function configuration, deployments, and execution. They cannot be changed.

/tmp directory storage 512 MB

If you need to run task that needs more space, one option would be convert the lambda to a container and run it as a fargate task.

The limits for fargate are 200Gb Fargate Tasks storage information

By default, Amazon ECS tasks hosted on Fargate using platform version 1.4.0 or later receive a minimum of 20 GiB of ephemeral storage. The total amount of ephemeral storage can be increased, up to a maximum of 200 GiB, by specifying the ephemeralStorage parameter in your task definition.

5
On

You could also setup EFS for lambda to have virtual unlimited space which can also be shared with other services, such as EC2, ECS and other Lambda functions.