https://serverless-stack.com/ logo
#sst
Title
# sst
l

Luke Wyman

08/17/2021, 3:35 AM
Got a little issue here when I do my lambdas in python with sst code in Typescript. Given a Route like this:
'POST /karaoke/rotations': 'src/services/rotations/KAR_ROT_create_rotation.lambda_handler'
I get the following error on deploy:
error: Could not resolve "/home/lukewyman/Documents/code/karaoke-backend-sst/src/services/rotations/KAR_ROT_create_rotation.js"
So it's assuming it's looking for a file ending in
.js
when the file actually ends in
.py
.
t

thdxr

08/17/2021, 3:36 AM
Is the runtime set to python?
a

Ashishkumar Pandey

08/17/2021, 3:36 AM
what’s the runtime set in lib/index.ts?
you beat me to it lol! 😂
l

Luke Wyman

08/17/2021, 3:42 AM
oooooh, that's unfortunate. I thought I was all clever and could do one of several microservices in my monorepo in python with the rest of them in typescript. Looks like I might have to break out the one I want in python into a separate project.
t

thdxr

08/17/2021, 3:42 AM
You don't need to! You can set the runtime individually per function
We need to provide a way to set it just for a stack
a

Ashishkumar Pandey

08/17/2021, 3:43 AM
you can define runtime on individual function.
l

Luke Wyman

08/17/2021, 3:43 AM
Oh, it's function props. Just need to do it for that stack
a

Ashishkumar Pandey

08/17/2021, 3:43 AM
Ah! damn, again? 😂
l

Luke Wyman

08/17/2021, 3:43 AM
awesome, happy now. Thanks, folks 🙂
t

thdxr

08/17/2021, 3:43 AM
I need to make an issue for this, it's come up a lot
l

Luke Wyman

08/17/2021, 3:44 AM
You did good on the
--stage
question, @Ashishkumar Pandey haha
a

Ashishkumar Pandey

08/17/2021, 3:44 AM
That’s becasuse @thdxr was not looking, he usually beats me lol! 😂
t

thdxr

08/17/2021, 3:47 AM
it's my job to beat you!
appreciate the help though 👍🏽
a

Ashishkumar Pandey

08/17/2021, 3:48 AM
It’s my job to not let you work on trivial stuff.