Omar Abdelkader
01/08/2022, 6:13 AMyarn sst start, I notice that the Python Lambda function is created with the incorrect runtime environment (node JS). Additionally, both the Python Lambda and the Apollo lambda are not copying the files from src correctly. My directory structure is shown in the attached photo, and here is the code that I've used to create my cron and apollo stacks. Anyone seen this before? Thanks!
// CronStack.ts
const lambda = new Function(this, "Lambda", {
srcPath: "src/cron",
handler: "index.handler",
runtime: "python3.8",
environment: {
TABLE_NAME: table.tableName,
NYTX: apikey.secretValue.toString(),
},
});
new Cron(this, "Cron", {
schedule: "cron(55 2 * * ? *)",
job: lambda,
});
// ApolloStack.ts
const api = new ApolloApi(this, "ApolloApi", {
defaultFunctionProps: {
environment: {
TABLE_NAME: table.tableName,
},
},
server: "src/apollo/index.handler",
});Omar Abdelkader
01/08/2022, 9:23 PMyarn sst start instead of yarn sst deployOmi Chowdhury
01/09/2022, 11:16 AMthdxr
01/10/2022, 5:42 PMsrcPath and load it into your lambda - can you expand on what isn't working?Omar Abdelkader
01/10/2022, 6:27 PMCronStack were calling the node.js stub when I was expecting it to call the Python bundle. srcPath was set correctly, I just needed to call sst deploy and it is working as expected