2

I need to read a file in my lambda via sftp and save it locally for processing. The issue is that when running 'sam local' my lambda can only read from the local file system but not write to it.

marting
  • 165
  • 1
  • 8

2 Answers2

1

Lambda functions can only write to a specific local area: /tmp

So that is the location you need to use if you want to write to a file.

See

Shawn
  • 8,374
  • 5
  • 37
  • 60
0

The file system inside the container created by SAM when you run it locally is read-only.

  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 12 '23 at 13:36