Artemiy Davydov
03/15/2022, 5:16 PMErnie Francis
03/15/2022, 6:03 PMErnie Francis
03/15/2022, 6:03 PMDan Van Brunt
03/15/2022, 7:28 PMremoveOldFiles
anywhere in the SST code when I search. Did this ever make it in?Przemysław Woźniak
03/15/2022, 9:58 PMPrzemysław Woźniak
03/15/2022, 10:02 PMMichael James Munar
03/16/2022, 6:11 AMAhmed Moaz Asif
03/16/2022, 8:41 AMAhmed Moaz Asif
03/16/2022, 8:45 AMnpm start
on windows, everything gets build and deployed fine. However when I do a GraqhQL query, the live lambda environment crashes
Unhandled Promise Rejection {"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"TypeError: Cannot read property 'filename' of undefined","reason":"TypeError: Cannot read property 'filename' of undefined","promise":{},"stack":["Runtime.UnhandledPromiseRejection: TypeError: Cannot read property 'filename' of undefined"," at process.<anonymous> (D:\\Starlight\\node_modules\\@serverless-stack\\aws-lambda-ric\\src\\index.ts:48:19)"," at process.emit (events.js:375:28)"," at processPromiseRejections (internal/process/promises.js:245:33)"," at processTicksAndRejections (internal/process/task_queues.js:96:32)"]}
Works fine on MacOS and LinuxArtemiy Davydov
03/16/2022, 11:14 AMArtemiy Davydov
03/16/2022, 11:16 AMthis.addDefaultFunctionEnv({
FRONTEND_URL: webStatic.url,
API_URL: api.url,
});
but const allowedOrigins = [process.env.FRONTEND_URL, "<http://localhost:3000>"];
shows [ undefined, '<http://localhost:3000>' ]
Hans Song
03/16/2022, 11:52 AMCustom::SSTBucketDeployment
here)
this results in pretty vague messages, e.g.
Custom::SSTBucketDeployment | .../ReactSite/S3Deployment/Default (ReactSiteS3Deployment...) Received response status [FAILED] from custom resource. Message returned: invalid request. Missing key 'Status'
i had to dig through the cloudwatch logs to find this
CalledProcessError: Command '['/opt/awscli/aws', 's3', 'cp', 's3:...', '/tmp/...']' returned non-zero exit status 1.
Traceback (most recent call last):
File "/var/task/s3-upload.py", line 29, in handler
s3_deploy(s3_source_zip, s3_dest, file_options, replace_values)
...
i had to modify the lambda a bit to log the exception to figure out what went wrong (permissions in this case)Sulaiman Baig
03/16/2022, 12:29 PMsatish venkatakrishnan
03/16/2022, 1:53 PMFailed to parse generated manifest.json [Error: ENOENT: no such file or directory, open 'C:\whatsapp\my-sst-app\.build\cdk.out\manifest.json'] {
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\\whatsapp\\my-sst-app\\.build\\cdk.out\\manifest.json'
}
Jeff Hanna
03/16/2022, 1:54 PMinfo: ~~~creating connection ... {"timestamp":"2022-03-16 06:46:37"}
query: CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
info: connected --- {"timestamp":"2022-03-16 06:47:07"}
is uuid-ossp implicitly required because I have uuid types in my db? any alternative or way to avoid these delays?Tim V
03/16/2022, 2:40 PMconst site = new StaticSite(this, "website", {
path: "stack/website",
buildOutput: "dist",
buildCommand: "yarn build",
customDomain,
environment: {
API_ENDPOINT: api.url,
},
// ...
});
From package.json:
"scripts": {
"start": "sst-env -- webpack serve --open",
"build": "webpack build"
}
Any help or insight is welcomed.Mikkel Wied Frederiksen
03/16/2022, 4:16 PMDan Van Brunt
03/16/2022, 6:10 PMsst.Function
internally? Each time I’ve tried this I run into issues with where to store construct assets and how to reference them into sst.Function
Jeff Hanna
03/16/2022, 10:57 PMuat-polls-api-Api | UPDATE_FAILED | AWS::Lambda::Alias | LiveAliasApi372137E3F Replacement type updates not supported on stack with disable-rollback.
First question, why is disable-rollback on? SST docs say the default is to have rollback enabled
Second question, why is there a replacement type update if my code didn’t change? AWS Docs say alias is only replaced if the function name or alias name change which they are notJon Holman
03/17/2022, 12:15 AM(base) jonholman@jonlaptop serverless-benchmarks % AWS_PROFILE=sso-jon-stuff npx sst start
Using stage: dev
Preparing your SST app
=======================
Deploying debug stack
=======================
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module '/Users/jonholman/repos/personal/serverless-benchmarks/.build/lib'
Require stack:
- /Users/jonholman/repos/personal/serverless-benchmarks/node_modules/@serverless-stack/cli/assets/debug-stack/bin/index.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/Users/jonholman/repos/personal/serverless-benchmarks/node_modules/@serverless-stack/cli/assets/debug-stack/bin/index.js:28:17)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/jonholman/repos/personal/serverless-benchmarks/node_modules/@serverless-stack/cli/assets/debug-stack/bin/index.js'
]
}
Subprocess exited with error 1
There was an error synthesizing your app.
any ideas?Sulaiman Baig
03/17/2022, 1:53 AMMichael James Munar
03/17/2022, 1:58 AMconst cluster = new rds.ServerlessCluster(this, "CounterDBCluster", {
vpc,
defaultDatabaseName,
// Set the engine to Postgres
engine: rds.DatabaseClusterEngine.AURORA_POSTGRESQL,
parameterGroup: rds.ParameterGroup.fromParameterGroupName(
this,
"ParameterGroup",
"default.aurora-postgresql10"
),
// Optional, disable the instance from pausing after 5 minutes
scaling: { autoPause: cdk.Duration.seconds(0) },
});
What I've been trying to do is create 2 database outside, prod and dev and I've been trying to import it.
I've done
const vpc = ec2.Vpc.fromLookup(this, "VPC", {
vpcId: "vpc-xxxxxxx",
});
and
rds.DatabaseInstance.fromDatabaseInstanceAttributes
as well as
rds.DatabaseCluster.fromClusterAttributes
I couldn't seem to make anything workHans Song
03/17/2022, 3:54 AMsst cdk
command does not return the status code for failuresMichael James Munar
03/17/2022, 8:44 AMBadRequestException: ERROR: relation "schema.table" does not exist
Even though it's clearly hereMuhammad Ahsan Khan
03/17/2022, 9:36 AMUnhandled Promise Rejection {"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"TypeError: Cannot read property 'filename' of undefined","reason":"TypeError: Cannot read property 'filename' of undefined","promise":{},"stack":["Runtime.UnhandledPromiseRejection: TypeError: Cannot read property 'filename' of undefined"," at process.<anonymous> (file:///D:/Starlight/node_modules/@serverless-stack/aws-lambda-ric/lib/index.js:34:23)"," at process.emit (events.js:400:28)"," at processPromiseRejections (internal/process/promises.js:245:33)"," at processTicksAndRejections (internal/process/task_queues.js:96:32)"]}
I am getting this error using appsync construct and its related to datasource of handler on windows
kindly help me in resolving thisErik Robertson
03/17/2022, 11:28 AMcurrent credentials could not be used to assume 'arn:aws:iam::055101007100:role/cdk-hnb659fds-deploy-role-XXX-us-west-2', but are for the right account. Proceeding anyway.
❌ DEV-ERIK-dwam-back-debug-stack failed: Error: DEV-ERIK-dwam-back-debug-stack: User: arn:aws:iam::XXX:user/dev_admin is not authorized to perform: ssm:GetParameter on resource: arn:aws:ssm:us-west-2:XXX:parameter/cdk-bootstrap/hnb659fds/version because no identity-based policy allows the ssm:GetParameter action
I am already passing a --role-arn parameter to sst start which has that ssm permission and it worked well using that role to build the debug stack but it's apparently not using it for deploying.
Based on the first line I have also tried to give the iam:passRole also to that CDK role but that didn't change anything either...
Any help is appreciated.Sean Matheson
03/17/2022, 4:00 PMSteven Klaiber-Noble
03/17/2022, 8:00 PMArtemiy Davydov
03/18/2022, 7:53 AMArtemiy Davydov
03/18/2022, 8:04 AMPreflightWildcardOriginNotAllowed
I need to set the exact origin for preflight too.
I can get the WebStatic
URL if I create it before the REST API, but then how do I pass the API URL to the frontend?