I have a project which has been only typescript la...
# sst
j
I have a project which has been only typescript lambdas, but I am adding a stack with a python lambda runtime. It was working ok locally (though after adding it it seems to have stopped rebuilding on source code changes?), but when trying to run it on aws I get an import error. The directory structure is:
Copy code
src/
├─ services/
│  ├─ folderA/
│  │  ├─ fileA.py
│  │  ├─ Pipfile
stacks/
├─ PythonStack.ts
Pipfile
The api definition has:
Copy code
handler: '/services/folderA/fileA.main',
          runtime: 'python3.8',
          srcPath: 'src',
The error is
Runtime.ImportModuleError: Unable to import module '/services/folderA/fileA': No module named '/services/folderA/fileA'
I'm guessing my
srcPath
is incorrect? What should it be instead? Also the two Pipfile's are identical, I'm assuming I don't need both, where should it live?
Copy code
handler: '/fileA.main',
          runtime: 'python3.8',
          srcPath: 'src/services/folderA',
also no bueno
Ignore, got it, just had to remove the leading
/
on the above
f
@Jason oh glad u figure it out!