Lambda archive is failing Error: exec: "python.exe": executable file not found in %PATH%
amitkml opened this issue · 2 comments
Description
My lambda terraform plan is failing with this error and do I need to have any setup done before running this? It is also not clear why we need python here for this
│ Error: External Program Lookup Failed
│
│ with module.lambda_aws_lambda-sqs.data.external.archive_prepare[0],
│ on .terraform\modules\lambda_aws_lambda-sqs\package.tf line 10, in data "external" "archive_prepare":
│ 10: program = [local.python, "${path.module}/package.py", "prepare"]
│
│ The data source received an unexpected error while attempting to find the program.
│
│ The program must be accessible according to the platform where Terraform is running.
│
│ If the expected program should be automatically found on the platform where Terraform is running, ensure that the program is in an expected directory. On Unix-based platforms, these directories are
│ typically searched based on the '$PATH' environment variable. On Windows-based platforms, these directories are typically searched based on the '%PATH%' environment variable.
│
│ If the expected program is relative to the Terraform configuration, it is recommended that the program name includes the interpolated value of 'path.module' before the program name to ensure that it is
│ compatible with varying module usage. For example: "${path.module}/my-program"
│
│ The program must also be executable according to the platform where Terraform is running. On Unix-based platforms, the file on the filesystem must have the executable bit set. On Windows-based platforms, no
│ action is typically necessary.
│
│ Platform: windows
│ Program: python.exe
│ Error: exec: "python.exe": executable file not found in %PATH%
Python executable is required for this module to do its work (packaging). If you want to deploy existing package (e.g. created outside of the module), you don't need Python installed. See README for more details.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.