Francis Menguito
05/18/2022, 9:37 AMWillian Medeiros
05/18/2022, 12:20 PMAdrian Schweizer
05/18/2022, 1:24 PMcustomDomain:
app.stage === "prod" ? {
isExternalDomain: true,
domainName: "<http://api.mydomain.com|api.mydomain.com>",
cdk: {
certificate: new Certificate(stack, "apicert", {
domainName: "<http://api.mydomain.com|api.mydomain.com>",
validation: CertificateValidation.fromDns(),
}),
},
} : undefined,
David Garcia
05/18/2022, 2:03 PMoutaTiME
05/18/2022, 6:45 PMSam Hulick
05/18/2022, 6:57 PMsst.Api
? so I don’t have to do:
'GET /folders': 'lambda/rest/functions/get-folders.main',
'GET /global-search': 'lambda/rest/functions/global-search.main',
'GET /tags': 'lambda/rest/functions/get-tags.main',
'GET /trash': 'lambda/rest/functions/get-deleted-items.main',
way back in the early days of SST, I wrote a messy helper function to handle this for me. but now I need to get rid of that as it’s.. well, a mess, and there’s probably a better way now 🙂Ross Coundon
05/18/2022, 7:39 PMid
on the stack and when setting a different ID on each stack
I also tried setting the same ID on each stack which I figured would fail and it did. What’s the right way to do this?Sam Hulick
05/18/2022, 10:04 PMJoão Pedro
05/19/2022, 2:42 AMapp.stack(MainStack, { stackName: 'main-stack' })
then I get this message:
Stack "main-stack" is not parameterized with the stage name. The stack name needs to either start with "$stage-", end in "-$stage", or contain the stage name "-$stage-".
so I change to this as per instructions:
app.stack(MainStack, { stackName: '$stage-main-stack' })
then I get this message:
Stack name must match the regular expression: /^[A-Za-z][A-Za-z0-9-]*$/, got '$stage-main-stack'
so not sure what am I expected to do hereJohn Stephen Soriao
05/19/2022, 4:38 AMSparsh Rawat
05/19/2022, 7:54 AMFrancis Menguito
05/19/2022, 8:20 AMStack francis-alloy-one-StorageStack
Status: failed
Error: francis-sst-one-orders already exists
Is there a way that it wont error everytime I start and stop my SST?Mohiuddin Sumon
05/19/2022, 8:50 AMCiak
05/19/2022, 8:59 AMdynamodbTable.tableName
, that table will not be removed in case of sst remove
or when removing the table from the stack. Did anyone experienced the same?Shubham Sinha
05/19/2022, 1:08 PMT Indie
05/19/2022, 2:25 PMGeoff Seemueller
05/19/2022, 5:15 PMShubham Sinha
05/19/2022, 5:26 PMDan Van Brunt
05/19/2022, 6:18 PMCF -> APIG -> Lambda
but only the first one hits the authorizer and function the other only logs out in APIG but never beyond that.
This WORKS POST /api/event/submit
This does NOT GET /api/event/submit-prev
This is the behaviour to point traffic to the api from cloudfront
cfDistribution.addBehavior('/api/event/*', new cfOrigins.HttpOrigin(eventApiDomain), {
allowedMethods: cf.AllowedMethods.ALLOW_ALL,
viewerProtocolPolicy: cf.ViewerProtocolPolicy.REDIRECT_TO_HTTPS,
cachePolicy: cf.CachePolicy.CACHING_DISABLED,
compress: false,
})
Robert
05/19/2022, 6:24 PMsst start
?
I can sst build
my app no problem, I can also run sst start
without error, but when I hit the console then I have a bunch of error in the network tab 😕Shubham Sinha
05/19/2022, 6:28 PMTrey Overton
05/19/2022, 7:11 PMTrey Overton
05/19/2022, 7:13 PMTypeError: import_sst.MojoStack is not a constructor
Is using the functional version not optional after all?Giorgio Galante
05/19/2022, 9:54 PMRudi
05/19/2022, 10:50 PMDan Coates
05/20/2022, 2:07 AMchrome-aws-lambda
and puppeteer working with local sst start. I've tried various combinations of bundle options including nodeModules
and externalModules
and copyFiles
but nothing seems to work and the nodeModules
and copyFiles
settings seem to have no effect on what ends up in the artifact file when running via sst start
.
I've also tested out the example at https://github.com/serverless-stack/serverless-stack/tree/master/examples/layer-chrome-aws-lambda and get the same error of Cannot find module 'chrome-aws-lambda'
If I remove chrome-aws-lambda
from the externalModules
setting then there is a different error Cannot find module ...<path omitted>/backend/functions/puppeteer/lib/Browser
The readme in the example makes it seem like it should work with sst start
but it doesn't seem to.Bshr Ramadan
05/20/2022, 5:39 AMjs
stacks to ts
when set a function env variable to a process env var, I am getting this type safety error:
Type 'string | undefined' is not assignable to type 'string'.
I can put it like so:
environment: {
var: process.env.var || ''
}
but In case I forgot to set an env var, I want it to be undefined
and throw error in building time to notice it.
So how can I get rid of this type of error?Hans Song
05/20/2022, 6:00 AMInvalid KeyConditionExpression: Attribute name is a reserved keyword; reserved keyword: key
Neil Hynes
05/20/2022, 10:04 AMprocess.env.IS_LOCAL
and returning to abort the lambdas, but it’d be even nicer to have the crons not run at all.
Is there a way to add a rule to the cron job definition not to run if process.env.IS_LOCAL
is set?Miguel
05/20/2022, 10:37 AMlaunch.json
entry and all. The deployment and updating lambda function on save works, however my breakpoints are Unbound
on VS code and can’t seem to get them to work. Any ideas?
My api handler functions are in go
, in case it matters.
Edit: I can confirm that creating another route handled by a ts
handler it does indeed hit the breakpoint 🤷♂️