Albert
03/03/2022, 12:58 PMDan Van Brunt
03/03/2022, 1:19 PMSST.ApolloApi
. How to investigate where the bottle neck could be.Jan Plaček
03/03/2022, 5:18 PMsst
somehow responsible for @serverless-stack/aws-lambda-ric
? The error handler here:
https://github.com/aws/aws-lambda-nodejs-runtime-interface-client/blob/53a4f71a0ac3da76849ff659f71eaaacbb906108/src/index.ts#L47-L54
swallows the original stack traceRoss Gerbasi
03/03/2022, 5:52 PMroute.ts
to get SST to rebuild the function in memory. However if route.ts
depends on other files and they are updated an esbuild transpile is not triggered.
I keep finding myself in situations where I am making changes and not seeing results, and realize I forgot I need to go back and save any route's that depend on that file to get it to re-build in dev mode.
Am I totally missing something to get this to work better?Jan Plaček
03/03/2022, 8:44 PMDaniel Gato
03/04/2022, 11:43 AMAWS_PROFILE=x npm run start
? Could we have some default profile we could set. Same way we do with the stackname?Jan Plaček
03/04/2022, 12:16 PMError: jplacek-sst-my-stack/Auth/UserPool/UserPoolDomain/Resource [AWS::Cognito::UserPoolDomain] is missing required property: domain
Seth Geoghegan
03/04/2022, 3:49 PMenvironment
folder at the project root would be nice. Or having them alongside my stack definitions within the /stacks
directory also makes sense since they aren't used elsewhere in my appGarret Harp
03/04/2022, 7:39 PMLazy
to load a circular dep... but what if it is across stacks? For example I would be looking to switch to lerna multiple sst apps and I want the frontend stack to know the backend stacks api url and I want the backend stack to know the frontend url.cbeckley
03/04/2022, 7:45 PMJan Plaček
03/04/2022, 8:11 PMStackProps
argLuka Isailovic
03/04/2022, 9:57 PMErnie Francis
03/04/2022, 10:12 PMErnie Francis
03/05/2022, 6:27 PMJon Holman
03/05/2022, 9:02 PMBshr Ramadan
03/05/2022, 11:21 PMNoah D
03/05/2022, 11:36 PMpostConfirmation
trigger on my cognito user pool, the problem I have been running into here is that i only seem to get the cognito user sub
as part of the payload there, and not the identity pool id
which is what i've been using for userId so far elsewhere. I am curious if anyone has been able to achieve a similar setup and if so am I going down the wrong path here? Ideally I don't want to check if a user record exists every time I try to get that dataACPixel
03/06/2022, 12:25 AMCannot find asset at ...
It seems that with SST bunding the typescript code of the main app, the package is losing it's __dirname.
The code for the asset is:
const codeAsset = new Asset(this, "ec2-code-asset", {
path: path.join(__dirname, "/lib/index.js"),
});
// 👇 create the EC2 CloudformationInit data
const initData = CloudFormationInit.fromElements(
InitFile.fromExistingAsset("/home/ec2-user/app/index.js", codeAsset)
);
I'm not quite sure how to fix this, as the asset should be reading the file located within the NPM package I have made here, however it keeps trying to read it from the sst .build directoryJon Holman
03/06/2022, 1:19 AMHans Song
03/06/2022, 1:35 AMSlackbot
03/06/2022, 8:32 AMUncharted
03/06/2022, 3:26 PMTypeError: Cannot read property 'slice' of undefined
at new Function (/home/uncharted/projects/my-api/node_modules/@serverless-stack/resources/src/Function.ts:187:8)
at Function.fromDefinition (/home/uncharted/projects/my-api/node_modules/@serverless-stack/resources/src/Function.ts:531:14)
at Api.createFunctionIntegration (/home/uncharted/projects/my-api/node_modules/@serverless-stack/resources/src/Api.ts:579:23)
at Api.addRoute (/home/uncharted/projects/my-api/node_modules/@serverless-stack/resources/src/Api.ts:466:26)
at /home/uncharted/projects/my-api/node_modules/@serverless-stack/resources/src/Api.ts:303:12
at Array.forEach (<anonymous>)
at Api.addRoutes (/home/uncharted/projects/my-api/node_modules/@serverless-stack/resources/src/Api.ts:302:25)
at new ApiGroupStack (/home/uncharted/projects/my-api/stacks/ApiGroupStack.ts:25:10)
at new ApiStack (/home/uncharted/projects/my-api/stacks/ApiStack.ts:683:5)
at Object.main (/home/uncharted/projects/my-api/stacks/index.ts:57:20)
wondering if someone succeded to split an api and if the error is normal ? 🤔Daniel Gato
03/07/2022, 9:31 AM?The bucket you tried to delete is not empty
with ReactStaticSite
. Did something change on the last version?Michael James Munar
03/07/2022, 10:20 AMDaniel Gato
03/07/2022, 1:35 PMcdk.context.json
to your git project?Pål Brattberg
03/07/2022, 2:52 PMstart
with the latest version. It shows up when I update an existing lambda while running:
Functions: Building . src/get.main...
Functions: Done building . src/get.main (30ms)
Oops! Something went wrong! :(
ESLint: 8.10.0
Error: Failed to load plugin '@typescript-eslint' declared in 'package.json » eslint-config-serverless-stack': Cannot find module 'typescript'
Require stack:
- /Users/pal/temp/rest-api/node_modules/@typescript-eslint/eslint-plugin/dist/util/astUtils.js
- /Users/pal/temp/rest-api/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js
- /Users/pal/temp/rest-api/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.js
- /Users/pal/temp/rest-api/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js
- /Users/pal/temp/rest-api/node_modules/@typescript-eslint/eslint-plugin/dist/index.js
- /Users/pal/temp/rest-api/node_modules/@eslint/eslintrc/dist/eslintrc.cjs
Referenced from: /Users/pal/temp/rest-api/node_modules/eslint-config-serverless-stack/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (/Users/pal/temp/rest-api/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at Object.<anonymous> (/Users/pal/temp/rest-api/node_modules/@typescript-eslint/eslint-plugin/dist/util/astUtils.js:27:25)
at Module._compile (/Users/pal/temp/rest-api/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
This was just reproduced by using examples/rest-api
and upgrading to 0.67.0
.Patrick Michallet
03/07/2022, 3:32 PMarn:aws:sts::{id}:assumed-role/dev-{application-name}-ApiLambdaGET{endpointName}/*
) and obviously it’s not feasible for me to add all of these to atlas.
So I think the resulting question I’ve got is: Is there a way to create and specify one role for all functions in an API? And if not, do you have any recommended patterns for passwordless authentication with atlas using Lambda’s IAM credentials?Sulaiman Baig
03/07/2022, 3:55 PMJan Plaček
03/07/2022, 6:22 PMdefaultFunctionProps
on Api
.?
Once I create the function manually so it can be reused, it throws:
The "defaultFunctionProps" cannot be applied if an instance of a Function construct is passed in.
Giovanni Giannichi
03/07/2022, 8:02 PMconst authorizerFunctionArn = ssm.StringParameter.valueFromLookup(
this,
'authorizerFunctionArn'
);
const authorizerFunction = lambda.Function.fromFunctionArn(
this,
'AccountsAuthorizerFunction',
Lazy.string({ produce: () => authorizerFunctionArn })
);
(Yes, I’ve tried without the lazy loading haha)
In this case, the functions are successfully attached to the authorizer, but they never really call the function when I run some endpoint. Always resulting in a instant Internal Server Error
…
Any help about this will be awesome! My last hope was the .fromFunctionName
, but this was added in CDK 2.14 (We are not there yet, I know! hahaha)