Swaroop
04/12/2022, 11:46 AMDaniel Gato
04/12/2022, 11:59 AMdeploy stack: run cdk deploy
deploy stack: poll stack status
deploy stack: poll stack status: {
StackStatus: 'UPDATE_COMPLETE',
LastUpdatedTime: 2022-04-12T08:11:52.538Z
}
deploy stack: poll stack status: unknown
deploy stack: poll stack status: {
StackStatus: 'UPDATE_COMPLETE',
LastUpdatedTime: 2022-04-12T08:11:52.538Z
}
deploy stack: poll stack status: unknown
....
We are 2 people experiencing the same on the same project
I already tried to delete .sst and .build just in case.
Edit: it worked for me but my colleague is still stuck on that for now 3hDan Van Brunt
04/12/2022, 12:53 PMesBuildConfig.define
supposed to replace as a string?
With this…
const viewerRequest = new sst.Function(this, 'FunctionViewerRequest', {
handler: 'src/viewer-request.handler',
...defaultOptions,
memorySize: 128,
timeout: cdk.Duration.seconds(5),
bundle: {
esbuildConfig: {
define: {
'process.env.PRERENDER_TOKEN': 'NOT_TELLING',
},
},
},
})
… and this in the function…
const PRERENDER_TOKEN = process.env.PRERENDER_TOKEN
…I’m getting the error…
"errorMessage":"NOT_TELLING is not defined"
Which makes it look like the replacement isn’t replacing as a string? ""
Dan Van Brunt
04/12/2022, 1:03 PMHarris Newsteder
04/12/2022, 1:52 PMArt Kelly
04/12/2022, 2:07 PMray
04/12/2022, 3:53 PMRudi
04/12/2022, 5:15 PMEdward Smith
04/12/2022, 6:46 PMonExit
event where we could tear down resources for dev envs when process exits?Rudi
04/12/2022, 8:53 PMJackson Bowe
04/13/2022, 5:19 AMDaniel Gato
04/13/2022, 10:10 AMconst func = new sst.Function(
this,
'func',
{
bundle: {
copyFiles: [
{
from: 'node_modules/mymodule/myfile.ext',
to: '.',
},
],
},
handler: 'src/..'
});
If I remove/add the bundle part I keep getting:
Stacks: Building changes...
Stacks: Synthesizing changes...
Stacks: No changes to deploy.I would expect those files to be copied to the .sst/artifacts/…/function/ folder
Jędrzej Kuryło
04/13/2022, 1:04 PMsst.Api
in my stack results in 6 lambdas created in AWS?Adrian Schweizer
04/13/2022, 3:19 PMsqsQueue: {
receiveMessageWaitTime: Duration.seconds(20),
},
Adrian Schweizer
04/13/2022, 5:06 PMfifo: true
config to an sqs queue, and now it can't deploy my project anymore. It tries to update the queue, but then it says
dev3-convento-cron | UPDATE_ROLLBACK_IN_PROGRESS | AWS::CloudFormation::Stack | dev3-convento-cron | Export dev3-convento-cron:ExportsOutputRefReminderMailQueue696E8B23D1985592 cannot be updated as it is in use by dev3-convento-api
and at the end it says:
Stack prod-convento-cron
Status: failed
Error: Export prod-convento-cron:ExportsOutputFnGetAttReminderMailQueue696E8B23Arn31F9752B cannot be updated as it is in use by prod-convento-api
Adrian Schweizer
04/13/2022, 6:19 PMGabriel Araújo
04/13/2022, 8:52 PMType 'Api<Record<string, ApiAuthorizer>>' is not assignable to type 'Api<Record<string, never>>'.
Type 'Record<string, ApiAuthorizer>' is not assignable to type 'Record<string, never>'.
'string' index signatures are incompatible.
Type 'ApiAuthorizer' is not assignable to type 'never'.
Type 'ApiUserPoolAuthorizer' is not assignable to type 'never'.ts(2322
for
return new sst.Api(this, "Api", {
authorizers: {
Authorizer: {
type: "jwt",
jwt: {
issuer: "<https://myorg.us.auth0.com>",
audience: ["UsGRQJJz5sDfPQDs6bhQ9Oc3hNISuVif"],
}
},
},
defaults: {
authorizer: "Authorizer",
authorizationScopes: ["user.id", "user.email"],
},
routes: {
"GET /notes": "src/list.main",
"POST /notes": {
function: "create.main",
authorizer: "Authorizer",
authorizationScopes: ["user.id", "user.email"],
}
},
});
Bshr Ramadan
04/14/2022, 5:17 AMUnhandled Promise Rejection {"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"Error: Cannot use GraphQLNonNull \"Boolean!\" from another module or realm.\n\nEnsure that there is only one instance of \"graphql\" in the node_modules\ndirectory. If different versions of \"graphql\" are the dependencies of other\nrelied on modules, use \"resolutions\" to ensure only one version is installed.\n\n<https://yarnpkg.com/en/docs/selective-version-resolutions>\n\nDuplicate \"graphql\" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results.","reason":"Error: Cannot use GraphQLNonNull \"Boolean!\" from another module or realm.\n\nEnsure that there is only one instance of \"graphql\" in the node_modules\ndirectory. If different versions of \"graphql\" are the dependencies of other\nrelied on modules, use \"resolutions\" to ensure only one version is installed.\n\n<https://yarnpkg.com/en/docs/selective-version-resolutions>\n\nDuplicate \"graphql\" modules cannot be used at the same time since different\nversions may have different capabilities
and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results.","promise":{},"stack":["Runtime.UnhandledPromiseRejection: Error: Cannot use GraphQLNonNull \"Boolean!\" from another module or realm.","","Ensure that there is only one instance of \"graphql\" in the node_modules","directory. If different versions of \"graphql\" are the dependencies of other","relied on modules, use \"resolutions\" to ensure only one version is installed.","","<https://yarnpkg.com/en/docs/selective-version-resolutions>","","Duplicate \"graphql\" modules cannot be used at the same time since different","versions may have different capabilities and behavior. The data from one","version used in the function from another could produce confusing and","spurious results.
I tried to use yarn resolutions like this:
"resolutions": {
"graphql": "15.5.1"
}
But It didn't solve the problem.
I have monorepo, and I tried to unify versions of many related dependencies between repos
did anyone faced this?Garret Harp
04/14/2022, 3:28 PMPavan Kumar
04/14/2022, 5:13 PMsst.json
nor as command line
params. For example .sst/stage
is used to set stage name, which is convenient as different developer can have their own stage name without committing it to github. Likewise is there something like .sst/region
so that each developer can choose the region near to him without committing it to git.Devin
04/14/2022, 7:01 PMcomicSeries: { title: 'whatevr', active: true/false }
and then customers haveMany
subscriptions that look like this
subscriptions: {[{ comicTitle: 'whatevr', active: true/false }]}
So a comic or subscription can be active
. This works great 🎉
When a comicSeries becomes inactive, I want to deactivate each subscription for each customer. Realistically, I can just do this in a lambda. But isn’t this technically a use for a queue?
My question is, how would you handle this in a robust way?Seth Geoghegan
04/14/2022, 11:44 PMArtemiy Davydov
04/15/2022, 4:28 AMexport default function main(app: <http://sst.App|sst.App>): void {
app.setDefaultFunctionProps({
runtime: "nodejs14.x",
});
for (const region of ["us-west-1", "eu-central-1"]) {
new CoreStack(app, "core-stack", { env: { region } });
}
}
Will that be enough? Or should I create a new stack for each region and share all parts of the main one? https://docs.serverless-stack.com/constructs/Api#sharing-an-api-across-stacks
Do I need to use load balancer? https://docs.serverless-stack.com/constructs/v1/Api#apialbroutepropsErik Robertson
04/15/2022, 9:31 AMDamjan
04/15/2022, 2:11 PMAshishkumar Pandey
04/15/2022, 2:27 PMaws-api-gateway-cli-test
?Bryan Campbell
04/15/2022, 10:28 PMnpm run test
and npx sst test
both return the same error, “Unknown script test”.
I’ve uninstalled the VSCode Jest extension, removed and reinstalled /node_modules and package-lock.json, restarted VSCode several times. Nothing seems to work. I am able to still run tests fine in another sst project. Anyone know how to get me back testing again?Garret Harp
04/16/2022, 5:55 PMDevin
04/16/2022, 6:34 PMgetSomeStuff
endpoint
do {
result = dynamodb.query(paramn)
} while (true)
while running on sst localhost. and then I just cmd + c
from that terminal. Does it kill the loop or do I need to go see the console.Ashishkumar Pandey
04/16/2022, 9:56 PM