Jon Baker
04/26/2022, 1:05 PMyarn start
then I don’t have any issues but if I do a yarn deploy
I get an Expected signal to be an instanceof AbortSignal
error. It seems related to node-fetch
requests (The lambda uses the Airtable NPM to request some data from Airtable). I’m guessing there are some permissions needed perhaps I’ve got no VPC’s and it’s not really clear? Anyone seen this or able to help? My Stack is configured as follows:
const api = new sst.Api(this, 'Api', {
authorizers: {
feAuthorizer: {
type: 'jwt',
jwt: {
issuer: process.env.ISSUER,
audience: [process.env.AUDIENCE],
},
},
},
defaults: {
authorizer: 'feAuthorizer',
},
routes: {
'GET /': 'src/lambda.handler',
'POST /new-member': {
function: {
handler: 'src/newMember/newMemberHandler.handler',
environment: {
FE_CLIENT_ID: process.env.FE_CLIENT_ID,
FE_SECRET: process.env.FE_SECRET,
FE_TENANT_ID: process.env.FE_TENANT_ID,
AIRTABLE_API_KEY: process.env.AIRTABLE_API_KEY,
AIRTABLE_BASE_ID: process.env.AIRTABLE_BASE_ID,
MONGO_URI: process.env.MONGO_URI,
},
},
},
},
});
Meris Tarhanis
04/26/2022, 1:08 PMFailed to send response because the lambda function is disconnected
How it happens:
• I send API request to my API
• API recognizes the request and triggers the right lambda
• lambda starts doing its work, parses in the data from the request body, sends the query to the RDS etc..
• I receive the Internal Server Error, 500 as response to my request
• SST send me the above message ("Failed to send response because the lambda function is disconnected")
• SST prints out the "real" response Message in the console, (200, body of a successful request*)
What I think is the problem:
My lambda function doesn't wait for the Response from the DB before sending it back to the client. So my question is, how do I make my lambda functions pre-connect to the RDS and wait out for the response?Dillon Peterson
04/26/2022, 7:45 PMRyan Barnes
04/26/2022, 8:45 PMProxyTarget.fromCluster()
is looking for an IDatabaseCluster
object. I can't seem to get that from the serverless stack resources.Mark Fox
04/26/2022, 10:28 PMfrontend
to a safe place and a npx create-nuxt-app frontend
, then changed FrontendStack.js to use StaticSite with appropriately changed buildOutput and buildCommand values in the props object. Tried to deploy through SEED and it fails during the unit tests in frontend, complaining that it "Cannot find module '{ATSYMBOL}vue/test-utils'". (Slack keeps replacing my text with a user's name.) Locally, a npm run test
fails with a similar "Cannot find module '@/components/NuxtLogo.vue' [...]". I think this is just a Jest issue with nested projects.Giorgio
04/26/2022, 11:23 PMconst auth = new sst.Auth(this, 'Auth');
const api = new sst.AppSyncApi(this, 'Api', {
cdk: {
graphqlApi: {
authorizationConfig: {
defaultAuthorization: {
authorizationType: appsync.AuthorizationType.IAM
},
additionalAuthorizationModes: [{
authorizationType: appsync.AuthorizationType.USER_POOL,
userPoolConfig: {
auth.cdk.userPool,
defaultAction: appsync.UserPoolDefaultAction.DENY,
},
}]
},
},
},
});
api.cdk.graphqlApi.grantQuery(auth.cdk.unauthRole, 'nameOfMyQuery');
The error I'm getting is:
Error: 'dev-my-app-auth' depends on 'dev-my-app-api' (dev-my-app-auth -> dev-my-app-api/GraphqlApi/Api/Resource.ApiId). Adding this dependency (dev-my-app-api -> dev-my-app-auth/Auth/UserPool/Resource.Ref) would create a cyclic reference.
Is there any other way to set this up? What I'm basically trying to do is to set up the AppSync API to have both authenticated access via user pool and a single query to have unauthenticated access.Karolis Stulgys
04/27/2022, 7:02 AMpostgresql
db. Can I use it with prisma
in my SST app?
https://serverless-stack.com/examples/how-to-use-postgresql-in-your-serverless-app.htmlScott
04/27/2022, 7:53 AMtypeORM
for serverless-stack, or is the consensus to use kysely
instead? [Postgres Aurora Serverless]
(I'm converting an existing serverless project to serverless-stack that currently uses typeORM, so I'm weighing up the challenges of converting vs wiring up typeORM)Karolis Stulgys
04/27/2022, 2:43 PMÖmer Toraman
04/27/2022, 5:51 PMKarolis Stulgys
04/27/2022, 7:52 PMÖmer Toraman
04/27/2022, 8:05 PM$ npx create-serverless-stack@latest demo --language typescript --use-yarn
$ cd demo
$ aws-vault exec sg-omer -- npx sst start --stage dev --verbose
I don’t see any CloudFormation Stack in progress:Haider Abbas
04/27/2022, 10:06 PMDatabase cluster is in a state that cannot be upgraded: PreUpgrade checks failed. More details can be found in the upgrade-prechecks.log file. Please refer to <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.MySQL80.html#AuroraMySQL.mysql80-upgrade-troubleshooting> for more details on troubleshooting the cause of the upgrade failure.
I also checks the pre-patch compatibility logs but it didn’t gives me anything beside InnoDB engine authentication and some other DB server details, there is something incompatible that i’m missing which is preventing them from doing so.
My end motive is Aurora MySQL 2.10.2 (MySQL 5.7) --> Aurora MySQL 3.01.1 (MySQL 8.0) --> Aurora MySQL 3.02.1 (MySQL 8.0) --> Aurora Serverless
So far i didn’t find a way to handle this. May be some of you guys are familiar with this issue, please help me to figure this out.
Great Thanks for your precious timeKarolis Stulgys
04/28/2022, 6:01 AMKarolis Stulgys
04/28/2022, 9:30 AMAlfred Brose
04/28/2022, 10:09 AM--language python
and setting/specifying typescript for the stack definitions? Now everything gets generated in typescript when using --language typescript
but with python the stack definitions are getting created as js files and we need to manually "convert" everything to typescriptKarolis Stulgys
04/28/2022, 12:14 PMKarolis Stulgys
04/28/2022, 12:51 PMconst frontendOne = new sst.NextjsSite(this, "frontendOne", {
path: "frontendOne",
});
const frontendTwo = new sst.NextjsSite(this, "frontendTwo", {
path: "frontendTwo",
});
this.addOutputs({
SiteUrl: frontendOne.customDomainUrl || frontendOne.url,
ApiEndpoint: api.customDomainUrl || api.url,
});
Islam Salem
04/28/2022, 2:36 PMDan Van Brunt
04/28/2022, 6:25 PMStaticSite
is erroring out with
[Error at /prod-idx-main/GatsbySite] Found zones: [] for dns:subdomain.klick.com, privateZone:undefined, vpcId:undefined, but wanted exactly 1 zonewhen we try to run
npx sst diff prod-idx-main --stage prod --profile NOT_TELLING
Ashishkumar Pandey
04/29/2022, 12:52 AMUnhandled Promise Rejection {"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"ReferenceError: require is not defined","reason":"ReferenceError: require is not defined","promise":{},"stack":["Runtime.UnhandledPromiseRejection: ReferenceError: require is not defined"," at process.<anonymous> (file:///Users/ashish/work/planet-marathi/api-v2/node_modules/@serverless-stack/aws-lambda-ric/lib/index.js:34:23)"," at process.emit (node:events:527:28)"," at emit (node:internal/process/promises:140:20)"," at processPromiseRejections (node:internal/process/promises:274:27)"," at processTicksAndRejections (node:internal/process/task_queues:97:32)"]}
Sahan Amadoruge
04/29/2022, 8:56 AMHarish Venkatesan
04/29/2022, 9:34 AMuserID
and departmentID
which I need to receive after the authorisation in the API event
object of API handler.
I have tried using "IAM" as the Auth option, but I am not getting any custom attributes in my event
object.
Could someone advise on what is the best way to approach this?Karolis Stulgys
04/29/2022, 11:17 AMsst.NextjsSite
construct to Remix to deploy Remix site?Ashishkumar Pandey
04/29/2022, 2:43 PM<http://auth.abc.xyz/.well-known/openid-configuration|auth.abc.xyz/.well-known/openid-configuration>
and <http://auth.abc.xyz/.well-known/jwks.json|auth.abc.xyz/.well-known/jwks.json>
using the sst.Api
construct. Is this doable, I’m trying to create an openid discovery endpoint for a custom auth service so there’s no way I can use another route.Bala Chalasani
04/29/2022, 2:43 PMAustin
04/29/2022, 3:03 PMErnie Francis
04/29/2022, 7:05 PMlgupta
04/29/2022, 7:19 PMHenry Gomez
04/29/2022, 10:13 PM