Lambdas by default do not have write access to the instance filestorage where they are running. They do my default have 512MB of ephemeral storage mounted at /tmp – this space is include in the Lambda runtime costs by default and can be increased (with additional cost) in 1MB increments upto 10GB.
More info here: https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage