-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
SST v3.1.10 with a Python3.11 lambda on Mac M2 Max Running Sonoma 14.2.1
Description of Issue:
When I invoke this function from the sst console, the first instance after the initial build, I will see in the functions tab of my terminal that the function was built. Back in the sst console I will see a blank log. On the second invocation, I will get either: A. a blank response (none of the print statements), B. Just the first print statement, C. All of the print statements. Typically on the third invocation I will then get a blank response, and on the 4th will get one of the options A-C again.
If I invoke the function using Postman and the lambda url, I will see all the logs in my terminal but I will not see consistent logs in the sst console.
Constructor Definition:
const grantAiLambda = new sst.aws.Function("GGGrantAiAssistant", {
handler: "packages/functions/lambda/grantAi/index.handler",
runtime: "python3.11",
timeout: "10 minutes",
transform: {
function: {
name: `GGGrantAiAssistant${$app.stage}`,
},
},
url: true,
})
packages/functions/grantAi:
grantAi
├── .python-version
├── README.md
├── index.py
├── pyproject.toml
├── sst_env.pyi
└── uv.lock
Handler Code:
import requests
import boto3
import os
env_vars = os.environ
def handler(event, context):
print(env_vars)
print(event)
print(context)