Is there any guide on how to effectively use SST w...
# help
h
Is there any guide on how to effectively use SST with Python? Everything I've seen around revolves around JS. Currently trying to move a Serverless Framework project into SST.
t
Do you mean using python lambdas or using the cdk in python
h
I should have been more specific, I'm using Layers with Python, and have not been able to find any info about those. As for CDK I'm aware its JS and TS only at the moment.
t
Yes you can create layers with cdk. SST doesn't provide anything on top of the normal cdk experience for layers so you can refer to cdk docs
h
My question is more that I have a custom layer that I would like to deploy and not sure how to go about it with SST. There's an explanation with an example in JS but nothing about Python.
t
Sorry I'm not exactly following. There shouldn't be any difference with a js layer vs python layer, you can attach layers to sst.Functions. If you're looking at how to create a python layer you can see an example at the bottom of this page: https://docs.aws.amazon.com/cdk/api/latest/docs/aws-lambda-python-readme.html
The examples SST has here: https://docs.serverless-stack.com/working-locally#using-lambda-layers These add js code but these examples aren't js specific. You can use this to create a layer containing any code
f
Hey @Hubert, did you manage to get the Python layer to work?
h
Sorry for late reply, yes I was getting myself confused with the new Structure, all working now 🙂