1

I need download file into the /tmp folder in an AWS Lambda function.

And I need work with this file and get my file route.

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Alonzo Hdz
  • 21
  • 5
  • Can you be more explicit? What have you tried? What programming language are you using? What error are you getitng? – amaurs Sep 18 '19 at 04:24
  • Hope this helps https://stackoverflow.com/questions/48364250/write-to-tmp-directory-in-aws-lambda-with-python. also note that /tmp directory storage limit is 512 MB. – amittn Sep 18 '19 at 07:36

1 Answers1

1

since you didn't mention language heres example using Python

FILE_NAME = "/tmp/lol.csv"
s3 = boto3.client('s3')
with open('FILE_NAME', 'wb') as f:
    s3.download_fileobj('BUCKET_NAME', 'OBJECT_NAME', f)

Details here And ofcourse similar to boto3 depending on your language you'll get libraries which will facilitate this. e.g for C#