I'm trying sst for the first time. I created a simple lambda function that logs and returns the event it receives. When I run npx sst dev --stage local and try to trigger the function, it seems from the logs that the appsync connection fails (msg service=appsync.connection type=subscribe_error id=0197773bb3591e88543bdc7d), and the local function is never triggered.
With sst deploy the function does work. I'm at a loss, hoping someone can help me troubleshoot this.
2025/06/16 05:34:50 INFO waiting for interrupt signal
2025/06/16 05:34:50 INFO connecting service=appsync.connection
2025/06/16 05:34:50 INFO connect message service=appsync.connection msg="map[connectionTimeoutMs:300000 type:connection_ack]"
2025/06/16 05:34:50 INFO subscribing to prefix=/sst/my-app/local/035b62550359445a826689b0e2f1feef/in
2025/06/16 05:34:50 INFO msg service=appsync.connection type=ka id=<nil>
2025/06/16 05:34:50 INFO msg service=appsync.connection type=subscribe_error id=0197773bb3591e88543bdc7d
START RequestId: be3xxxxx-xxxx-xxxx-xxxx-xxxxxxxcdb90 Version: $LATEST
status 200 OK
2025/06/16 05:34:53 ERROR failed to close message requestID=be3xxxxx-xxxx-xxxx-xxxx-xxxxxxxcdb90 error="request failed with status 401: {\n \"errors\" : [ {\n \"errorType\" : \"UnauthorizedException\"\n } ]\n}"
status 200 OK
2025/06/16 05:34:53 ERROR failed to close message requestID=be3xxxxx-xxxx-xxxx-xxxx-xxxxxxxcdb90 error="request failed with status 401: {\n \"errors\" : [ {\n \"errorType\" : \"UnauthorizedException\"\n } ]\n}"
status 200 OK
2025/06/16 05:34:53 ERROR failed to close message requestID=be3xxxxx-xxxx-xxxx-xxxx-xxxxxxxcdb90 error="request failed with status 401: {\n \"errors\" : [ {\n \"errorType\" : \"UnauthorizedException\"\n } ]\n}"
The "failed to close message" is then repeated multiple times every second
Hello,
I'm trying
sst
for the first time. I created a simple lambda function that logs and returns the event it receives. When I runnpx sst dev --stage local
and try to trigger the function, it seems from the logs that the appsync connection fails (msg service=appsync.connection type=subscribe_error id=0197773bb3591e88543bdc7d
), and the local function is never triggered.With
sst deploy
the function does work. I'm at a loss, hoping someone can help me troubleshoot this.sst.config.ts:
playground/index.js:
Lambda function CloudWatch Log:
The "failed to close message" is then repeated multiple times every second
Appreciate any help 🙏🏻