You can write files to /tmp in your Lambda function. By default the size is limited to 512 MB, but you can increase it up to 10 GB. Note that the /tmp is inside the function's execution environment and you do not have access to it from outside the function. If you want to save a file that you can access it externally, you should either save it to S3 or mount an EFS volume and write the file there.
Inside your Lambda function you can do almost anything, so yes, you can copy files to S3 and you can delete them.
Is it possible to disable file caching when using EFS with Lambda?asked 2 days ago
how to save a file while running an etl job in a fargate task?asked 2 months ago
is it possible that SQS Triggers to a Lambda Function Alias?Accepted Answerasked 8 months ago
Is there a way to recover the deleted lambda function?asked 3 months ago
Using AWS Lambda to run Python script, how can I save data?Accepted Answerasked 3 years ago
Can I extract the code from the aws to save it in Githubasked 3 months ago
How to have a websocket connection to lambda in a green grass coreasked 4 years ago
How to save a file to a tmp/temp folder in lambda?asked 5 months ago
How to upload a parquet format file of RDS table data to S3 without using snapshotsasked 8 months ago
Is it possible to kill/stop a running lambda function?asked 6 years ago