1 Answer
- Newest
- Most votes
- Most comments
1
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.
Relevant content
- Accepted Answerasked 2 years ago
- asked 6 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
@Uri - thanks. i'm having an issue with reading the file . is there a pre-built lambda layer for aws cli sdk for node js that i can use with my lambda and may be issue commands like aws s3 cp /.tmp.sample.txt s3://bucket in my nodejs lambda?
I am not familiar of any such extension. The following code should upload a local file to S3:
I suggest that you await for it to complete.