Closed jimjy98 closed 5 years ago
This is a problem with the $HOME
directory. The only writeable directory in Lambda is /tmp
and those aws
commands are trying to edit files in /home/sbx_user1051
. In my bootstrap I set $HOME=/tmp
, but it doesn't seem to carry through to the executions.
Can you try setting $HOME=/tmp
yourself in your code?
If that doesn't work you can try to export those ids as environment variables as well. Like:
export AWS_ACCESS_KEY="keyId"
Neither work. $HOME is an unbound variable for some reason, and $HOME in a local bash session usually reads a line from pwd
to get its value. I also tried using environment variables for the access keys, but I am getting the same error The provided token is malformed or otherwise invalid.
I am having some problems with regular aws commands. For example, I just try to run a bash script with the following content
Of course the key id and secret access key are valid keys. I just want to save the list of files in an s3 bucket to some variable
files
. However, I always get the sameRuntime.ExitError with status code 255: Read-only file system: '/home/sbx_user1051'
. Am I doing anything wrong?