I'm trying to run pulumi automation API in AWS lam...
# automation-api
t
I'm trying to run pulumi automation API in AWS lambda but I'm running into
mkdir /home/sbx_user1051: read-only file system
. That makes sense, since only
/tmp
is writable in Lambda, but I'm struggling to find the right setting to configure the write location for automation API. Has anyone run into this?
m
I just ran into something similar with a lambda-layer and openssl. My solution was to set then environment variable HOME=/tmp
t
Interesting. I see the idea behind it, by setting your home dir to somewhere writable you'd get around that issue. I just tried it with the same error result though
I'm sure it's in the docs somewhere but I found the fix by digging into venv/lib/pulumi for python. Setting
PULUMI_HOME
to "/tmp" works
👍 1
b
I was looking at this a few months ago. /tmp is only accessible once the lambda has started (i.e. you can't out things there during the docker build step) I had code in my lambda that would copy things from a location in the container to tmp and then point the PULUMI_HOME env car to that and continue from there
t
Interesting; fortunately I didn't have to do anything like that. Just setting that env var and including a pulumi binary in /layer/bin was good enough to get the job done