Skip to content

Exception caught when writing error log to fileSystem.IO.IOException: Read-only file system : '/var/task/aws-logger-errors.txt' #202

Answered by ashishdhingra
pponzano asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @pponzano,

Good morning.

Could you please share your .csproj file, appSettings.json and Serilog configuration (if not using appSettings.json)? Looks like you have Serilog:LibraryLogErrors set to true in your config. This flag enables Serilog extension to log any service errors to local log file. When executing in Lambda environment, looks like there are some library errors (such as inability to log to CloudWatch logs may be due to lack of permissions) and it's unable to write to this file since Lambda code is executing with /var/task as current directory.

This setting is typically used for development environment. So you should have this setting enabled instead in appSettings.Developme…

Replies: 5 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by ashishdhingra
Comment options

You must be logged in to vote
2 replies
@ashishdhingra
Comment options

@ashishdhingra
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
guidance Question that needs advice or information. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. module/logging
4 participants
Converted from issue

This discussion was converted from issue #201 on May 11, 2022 17:34.