fierce-rose-25366
01/24/2023, 10:38 AM/tmp/
, so I’ve set my work dir and pulumi home there.
stack = pulumi.automation.create_stack(
"just.testing.stack",
project_name="just.testing.project",
program=get_bucket, # simple program that just gets the ARN of a named AWS S3 Bucket
opts=pulumi.automation.LocalWorkspaceOptions(work_dir="/tmp/", pulumi_home="/tmp/.pulumi"))
This works fine locally and I see the yaml etc generated in my local /tmp. When I run this on Lambda though, I get
FileNotFoundError: [Errno 2] No such file or directory: 'pulumi'
This is strange to me - why is it looking for a directory named pulumi
in the first place, when my workspace config is different? I’d love any pointers on this.2023-01-24T12:34:51 File "/var/task/developer_utils_service.py", line 2589, in test_pulumi
2023-01-24T12:34:51 return CadenceUnsubscribeService(self).sense_check()
2023-01-24T12:34:51 File "/var/task/cadence_unsubscribe_service.py", line 112, in sense_check
2023-01-24T12:34:51 ws = pulumi.automation.LocalWorkspace(work_dir="/tmp/", pulumi_home="/tmp/.pulumi")
2023-01-24T12:34:51 File "/var/lang/lib/python3.9/site-packages/pulumi/automation/_local_workspace.py", line 125, in __init__
2023-01-24T12:34:51 pulumi_version = self._get_pulumi_version()
2023-01-24T12:34:51 File "/var/lang/lib/python3.9/site-packages/pulumi/automation/_local_workspace.py", line 411, in _get_pulumi_version
2023-01-24T12:34:51 result = self._run_pulumi_cmd_sync(["version"])
2023-01-24T12:34:51 File "/var/lang/lib/python3.9/site-packages/pulumi/automation/_local_workspace.py", line 430, in _run_pulumi_cmd_sync
2023-01-24T12:34:51 return _run_pulumi_cmd(args, self.work_dir, envs, on_output)
2023-01-24T12:34:51 File "/var/lang/lib/python3.9/site-packages/pulumi/automation/_cmd.py", line 55, in _run_pulumi_cmd
2023-01-24T12:34:51 with subprocess.Popen(
2023-01-24T12:34:51 File "/var/lang/lib/python3.9/site-packages/sentry_sdk/integrations/stdlib.py", line 193, in sentry_patched_popen_init
2023-01-24T12:34:51 rv = old_popen_init(self, *a, **kw) # type: ignore
2023-01-24T12:34:51 File "/var/lang/lib/python3.9/subprocess.py", line 951, in __init__
2023-01-24T12:34:51 self._execute_child(args, executable, preexec_fn, close_fds,
2023-01-24T12:34:51 File "/var/lang/lib/python3.9/subprocess.py", line 1821, in _execute_child
2023-01-24T12:34:51 raise child_exception_type(errno_num, err_msg, err_filename)
pulumi version
is failing. Must be something wrong in my setup?billowy-army-68599
01/24/2023, 3:32 PMfierce-rose-25366
01/24/2023, 3:43 PM# install pulumi
RUN curl -fsSL <https://get.pulumi.com> | sh
# add pulumi to path
ENV PATH="${PATH}:/root/.pulumi/bin"
# test that pulumi can run
RUN pulumi version
# make the lambda user able to execute it - NOT WORKING SO FAR
RUN chmod a+rx /root/.pulumi/bin/pulumi
RUN chmod -R a+wrx /root/.pulumi
RUN chown -R sbx_user1051 /root/.pulumi/bin/pulumi
RUN chown -R sbx_user1051 /root/.pulumi
I recognise this is mostly a lambda/docker question now rather than a pulumi one, but it’d be super helpful if you have any pointers from past experience of doing this.billowy-army-68599
01/24/2023, 3:45 PMsbx_user1051
’s home directoryfierce-rose-25366
01/25/2023, 2:10 PM