Ömer Toraman
10/17/2021, 4:19 PMApiGatewayV1Api
construct is the REST API, and Api
construct is the HTTP API, am I mistaken?Ömer Toraman
10/17/2021, 4:50 PM"*moduleResolution*": "node"
to tsconfig.json
, if the application is not going to contain any front-end resources?Ömer Toraman
10/17/2021, 5:14 PMTZ
property on the process.env
object.
Why is that?Ömer Toraman
10/17/2021, 6:29 PMtests
folder a bit, however, I cannot import anything from stacks
folder using the relative path or path alias.
I wanted to add path alias, and I did for src
directory, however, it does not work stacks
directory.Sam Hulick
10/18/2021, 1:36 AMprocess.env.IS_LOCAL
would be undefined
? 🤔 when running yarn start
Patrick Young
10/18/2021, 2:49 AM2021-10-18T02:43:56.445Z undefined INFO Executing '.build/src/apolloServer/lambda.handler' in function directory '/Users/myusername/dev/chimera/apps/iridium-backend'
internal/modules/cjs/loader.js:892
throw err;
^
Error: Cannot find module '../../build/Release/runtime-client.node'
Require stack:
- /Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/lib/RuntimeClient/RuntimeClient.js
- /Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/lib/RuntimeClient/index.js
- /Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/lib/index.js
- /Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/bin/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
at Function.Module._load (internal/modules/cjs/loader.js:745:27)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
at new RuntimeClient (/Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/lib/RuntimeClient/RuntimeClient.js:44:29)
at Object.run (/Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/lib/index.js:44:20)
at Object.<anonymous> (/Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/bin/index.js:14:8)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/lib/RuntimeClient/RuntimeClient.js',
'/Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/lib/RuntimeClient/index.js',
'/Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/lib/index.js',
'/Users/myusername/.npm/_npx/f6819ddcf7347684/node_modules/aws-lambda-ric/bin/index.js'
]
}
Looked in npx folder and
'../../build/Release/runtime-client.node'
is not there... well the whole "build" folder is not there. Searched this slack channel and aws-lambda-ric seems like a pile 🙂. I've tried destroying the stacks and bringing them back up. Clearing caches etc. git clean -fxd
it all! BURN ALL THE CACHING WHAHAHA but still same error 😕. Did I miss something on the upgrade or I'm not 100% sure what to even try or how to debug this...Gerald
10/18/2021, 3:53 AMGerald
10/18/2021, 5:03 AMJarek Pietraszek
10/18/2021, 7:50 AMMr.9715
10/18/2021, 8:09 AM_app_.setDefaultFunctionProps()
?Ömer Toraman
10/18/2021, 10:16 AMmanitej
10/18/2021, 11:49 AMnpx sst start
it's not getting deployed
WebSocket connection error Error: Unexpected server response: 500
at ClientRequest.<anonymous> (C:\sst\expo-sst-demo\node_modules\ws\lib\websocket.js:716:7)
at ClientRequest.emit (events.js:400:28)
at ClientRequest.emit (domain.js:475:12)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:647:27)
at HTTPParser.parserOnHeadersComplete (_http_common.js:127:17)
at TLSSocket.socketOnData (_http_client.js:515:22)
at TLSSocket.emit (events.js:400:28)
at TLSSocket.emit (domain.js:475:12)
at addChunk (internal/streams/readable.js:293:12)
at readableAddChunk (internal/streams/readable.js:267:9)
Devin
10/18/2021, 4:33 PMnpx sst deploy
and I get
Error: Invalid UserPoolId format.
at new CognitoUserPool
This app works locally however, I can login, sign up etc… Any ideas where I should be looking to make this work?Ömer Toraman
10/18/2021, 5:53 PM.d.ts
ignored?Ömer Toraman
10/18/2021, 6:31 PMdefaultPayloadFormatVersion
for sst.Api
, is it sst.ApiPayloadFormatVersion.V1
or sst.ApiPayloadFormatVersion.V2
?Ömer Toraman
10/18/2021, 6:52 PMaccessLogs
and httpApi
properties for sst.Api
?Tony J
10/18/2021, 7:06 PMWilliam Hatch
10/18/2021, 7:22 PMÖmer Toraman
10/18/2021, 8:15 PMNoah D
10/18/2021, 10:01 PMtypescript-monorepo
not just typescript
but get issues either way atm 🤨Carter Himmel
10/18/2021, 10:17 PMCarter Himmel
10/18/2021, 10:21 PMSam Hulick
10/18/2021, 11:39 PMyarn start
only, have yet to confirm a deployed stackSam Hulick
10/19/2021, 1:59 AMyarn test
has stopped working for me.. not sure when this bug cropped up. but it’s in the latest version of SST
Preparing your SST app
Detected tsconfig.json
Transpiling source
Linting source
Running type checker
● Validation Error:
Preset ts-jest not found.
Configuration Documentation:
<https://jestjs.io/docs/configuration.html>
Aram
10/19/2021, 11:56 AMLionel T.
10/19/2021, 1:24 PMÖmer Toraman
10/19/2021, 4:48 PMsst.json
{
"name": "someName",
"region": "us-east-1",
"main": "stacks/index.ts"
}
stacks/index.ts
import * as sst from "@serverless-stack/resources";
import { MainStack } from "./MainStack";
export default function main(app: <http://sst.App|sst.App>): void {
// Set default runtime for all functions
app.setDefaultFunctionProps({
runtime: "nodejs14.x"
});
new MainStack(app, "someOtherName");
}
Ömer Toraman
10/19/2021, 5:18 PMCDK_NEW_BOOTSTRAP set, using new-style bootstrapping
:hourglass_flowing_sand: Bootstrapping environment <aws://209163669254/eu-central-1>...
Trusted accounts for deployment: (none)
Trusted accounts for lookup: (none)
Using default execution policy of 'arn:aws:iam::aws:policy/AdministratorAccess'. Pass '--cloudformation-execution-policies' to customize.
CDKToolkit: creating CloudFormation changeset...
8:16:36 PM | CREATE_FAILED | AWS::S3::Bucket | StagingBucket
You have attempted to create more buckets than allowed (Service: Amazon S3; Status Code: 40
0; Error Code: TooManyBuckets; Request ID: X1M1FNKV93F5KDZ6; S3 Extended Request ID: 7K4alU
cRflPiDu18Ucj/YDcM1kjiYx5kdhjmdE4s/CTkQXOTNyU2vfzNCsJyDVM0iaB8BNsJh6w=; Proxy: null)
8:16:37 PM | CREATE_FAILED | AWS::SSM::Parameter | CdkBootstrapVersion
User: arn:aws:iam::209163669254:user/omer.t@mindbehind.com is not authorized to perform: ss
m:PutParameter on resource: arn:aws:ssm:eu-central-1:209163669254:parameter/cdk-bootstrap/h
nb659fds/version (Service: AmazonSSM; Status Code: 400; Error Code: AccessDeniedException;
Request ID: 29feddac-a094-4470-bedb-ce7c4cb7fa08; Proxy: null)
Dan Van Brunt
10/19/2021, 6:25 PMsst.Api
to use a custom authorizer
but also allow for anonymous access?
Our Custom Authorizer passes into the rest calls the user’s ROLE if they have one. otherwise they are considered anonymous.Matthew Smithburger
10/20/2021, 2:24 AMyarn build
in the directory, only when I run sst deploy.
ModuleNotFoundError: Module not found: Error: Can't resolve 'electron' in '/Users/matt.smithburger/Projects/mintopoly/server/node_modules/swarm-js/node_modules/got'
> Build error occurred
Error: > Build failed because of webpack errors
at /Users/matt.smithburger/Projects/mintopoly/server/node_modules/next/dist/build/index.js:397:19
at async Span.traceAsyncFn (/Users/matt.smithburger/Projects/mintopoly/server/node_modules/next/dist/telemetry/trace/trace.js:60:20)
at async Object.build [as default] (/Users/matt.smithburger/Projects/mintopoly/server/node_modules/next/dist/build/index.js:77:25)
Error: There was a problem building the "Site" NextjsSite.
at NextjsSite.buildApp (/Users/matt.smithburger/Projects/mintopoly/server/node_modules/@serverless-stack/resources/src/NextjsSite.ts:545:13)
at new NextjsSite (/Users/matt.smithburger/Projects/mintopoly/server/node_modules/@serverless-stack/resources/src/NextjsSite.ts:103:16)
at new UIStack (/Users/matt.smithburger/Projects/mintopoly/server/lib/UI.ts:11:18)
at Object.main (/Users/matt.smithburger/Projects/mintopoly/server/lib/index.ts:30:3)
at Object.<anonymous> (/Users/matt.smithburger/Projects/mintopoly/server/.build/run.js:93:16)
at Module._compile (node:internal/modules/cjs/loader:1095:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:816:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
There was an error synthesizing your app.