Blake E
01/10/2022, 9:17 PM@aws-cdk/aws-events.Rule
for rule
• @serverless-stack/resources.Function
for function
• @aws-cdk/aws-events-targets.LambdaFunction
+ the rule.addTarget
for targeting the lambda to rule
Everything deploys fine, and have an sst start
running, but my lambda function is throwing error:
> node_modules/@serverless-stack/resources/dist/App.js:212:57: warning: "@aws-cdk/aws-s3" should be marked as external for use with "require.resolve"
212 │ codeDirectory: path.join(require.resolve("@aws-cdk/aws-s3"), "../auto-delete-objects-handler"),
╵ ~~~~~~~~~~~~~~~~~
> node_modules/fsevents/fsevents.js:13:23: error: No loader is configured for ".node" files: node_modules/fsevents/fsevents.node
13 │ const Native = require("./fsevents.node");
╵ ~~~~~~~~~~~~~~~~~
8f2f6eb8-04d0-404d-84b6-743959b1267e ERROR build_failure: The function src/cw-ingestor.debugHandler failed to build
Seems like the sst.Function
build sugars aren’t getting wired up properly when using the aws-event-targets
package?Ross Coundon
01/11/2022, 9:23 PMsst start
for a few minutes and a few rebuilds from code changes on a TypeScript project, the debugger stops hitting breakpoints.
Looking at dev tools in VSCode I see the error
Error: Error processing setBreakpoints: RangeError: Start offset -2140284536 is outside the bounds of the buffer
Looking at the Github issues for VSCode I came across this which suggests it's to do with invalid sourcemaps.
Could something to do with the sourcemaps be getting corrupted following a rebuild of the code?Mark Fox
01/11/2022, 9:53 PMcolin
01/11/2022, 10:39 PM0.57.2
today and it doesn’t seem like sst start
is running the type checking or linting anymore. Didn’t see any changes in the release log. My "lint"
and "typeCheck"
values are still set to true
in sst.json
and .eslintrc
is below. Any ideas?
{
"env": {
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"serverless-stack"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/no-empty-interface": "OFF"
}
}
Michael Robellard
01/12/2022, 9:36 PMLukasz K
01/13/2022, 8:18 AMExport lktest-altera-stack-Altera:ExportsOutputRefGlobalApiUserPoolAuthorizer0FC6637617CEFDF2 cannot be deleted as it is in use by lktest-altera-stack-Avatars, lktest-altera-stack-Company and lktest-altera-stack-Cost (and 4 more)
Carter Himmel
01/13/2022, 11:13 PM@serverless-stack/resources@0.59.0-next.{commit_hash}
Carter Himmel
01/13/2022, 11:29 PMlib # stack defs
packages
hasuraActions
...other things
this is what our function defs look like: http://tugboat.dev/uxbm0y.png▾
app.appPath
is /home/fyko/code/pushas/com.pushas.app/lib
it has no problem re-compiling changes to stack defs but it cannot do anything in packages/Michael Robellard
01/14/2022, 12:37 AMconsumers: {
dynamodbstream: {
srcPath: "services/dynamodbstream/",
handler: "stream.handler",
environment: {
SEARCH_ENDPOINT: opensearch_domain.domainEndpoint,
},
permissions: [new iam.PolicyStatement({
actions: ["es:*"],
resources: [opensearch_domain.domainArn],
})]
}
}
And I can confirm in the AWS Console that the Permissions are set for the Lambda Role
Is there something else that needs permission because of the Local Environment?
After some further attempts, I have discovered that if I change the METHOD from post to put I get a different error message. I am not sure why post is causing the error message in question, but now I am getting:
User: arnawssts:309833148800assumed-role/mike-local-chartflow-dyna-ChartflowDatadynamodbstr-P6L43N5FZMK/mike-local-chartflow-dyna-ChartflowDatadynamodbstr-dpL0R4lmGyGK is not authorized to perform: es:ESHttpPut
Getting closer, but any help would be appreciated.
Changing the resources to : ["*"], allowed it to work, but clearly not a best practice. Any ideas would be appreciated.Derek Kershner
01/14/2022, 5:15 PMRight now sst.json needs to be at the root of your repo
We have some tricky situations to deal with to support it being a subpackageI appear to have this working (
sst.json
in subpackage), and am planning on adding a second SST app to this monorepo...can you help me determine why this won't work, or if I have found a path?
Is it specifically related to start
? or would it also affect build
and deploy
?Jon Holman
01/17/2022, 6:59 PMRoss Coundon
01/17/2022, 8:28 PM1. If you have one or moredependencies, and if they are on the experimental package list below, rename them to@aws-cdk/aws-XXXX
. For example, rename@aws-cdk/aws-XXXX-alpha
to@aws-cdk/api-gatewayv2
.@aws-cdk/*aws-apigatewayv2*-alpha
Hamed Mamdoohi
01/17/2022, 11:44 PMRoss Coundon
01/18/2022, 10:49 AMAdam Fanello
01/18/2022, 6:43 PMMarcin M
01/19/2022, 3:22 PMDerek Kershner
01/19/2022, 5:38 PMDan Van Brunt
01/20/2022, 5:21 PMMischa Spiegelmock
01/20/2022, 6:22 PMMischa Spiegelmock
01/21/2022, 8:05 AMnpm link
but get invalid ConstructNode type
https://serverless-stack.slack.com/archives/C01HQQVC8TH/p1642709706056000?thread_ts=1642702962.053600&cid=C01HQQVC8THDerek Kershner
01/22/2022, 6:18 PMcore
and nextjs-lambda
become packages with no dependencies. There is no downside to this as only SST
packages consume them.
2. cli
and resources
have lite
packages created alongside their current packages. These packages would be the exact same code as the current packages, but with no dependencies.
3. NON-lite cli
and resources
would install cli-lite
and resources-lite
, and also install all of the current dependencies. These packages would become an index file with export * from lite
.
Benefits:
1. Allows a path for users to have completely custom and advanced apps with no restrictions.
2. Non-breaking change.
3. During the yearly major-version update (for Jest, ESLint, Apollo, etc), the lite
packages would give SST
a way to support users who do not want to upgrade their support packages (which would be legacy at that point), but still want to have the newest features. Major version updates in those packages are frequently met with challenges, and large apps are likely to appreciate this in a major way.
Cons:
1. A small amount of work up front. I would volunteer for this, as I have already spent more time troubleshooting dependencies than would be required to implement.
2. The contributing experience for Open Source Devs of SST would have one layer of abstraction to uncover (they would have to realize the lite packages contain the business logic).
3. It's possible, but unlikely, there might be cryptic errors for lite
users, if things like ESLint are missing, but linting is enabled.
Alternatives:
1. Fork. This is essentially the reverse of above, but achieves the same goal. It is more work, and benefit 3 goes away (since it wouldn't be internal SST anymore).Devin
01/23/2022, 10:43 PMRoss Coundon
01/24/2022, 9:39 AM"cdk bootstrap" to version 9 if your organization's policies prevent a successful upload or to get rid of this message)
Is there a recommended way of bootstrapping since this was done originally by the SST framework?Ivan Roskoshnyi
01/24/2022, 3:49 PMserverless.yml
but I found no info how to do it in SST.
2. In SST I use serverless-mysql
what I used in serverless
. Is it ok for SST? I faced an issue when I tried to deploy code to prod: Error: Received packets in the wrong sequence
I found that we need to disable webpack minimization of modules but I have no idea how to do it in SST
Hope someone faced these issues. They are looking common but as this framework is new....There are no info in google.Joe Kendal
01/24/2022, 6:03 PMIvan Roskoshnyi
01/25/2022, 4:33 AMalternate domain name
(programatically) so my url will be human-readable instead of an URL with ID provided by AWS
The guide covers only customDomain and route53 creation but it doesn't cover full configuration of it using SST.
Glad to any suggestions!Gregory Houtteman
01/25/2022, 12:08 PMnpm ERR! 404 '@aws-cdk/api-gatewayv2-alpha@2.7.0-alpha.0' is not in this registry.
which means I need to be running CDK v2.8.0 to use @aws-cdk/api-gatewayv2-alpha@2.8.0-alpha.0
I assume I messed up a step somewhere in the upgrade instructions ... it might be because I update to 0.60.4 first then Seed indicated I needed to to do the upgraded steps from the
<https://github.com/serverless-stack/serverless-stack/releases/tag/v0.59.0>
which I did but I never actually ran the npx sst update 0.59.0 I reran the 0.60.4Seth Geoghegan
01/25/2022, 4:02 PMDan Van Brunt
01/25/2022, 7:25 PMsst.EdgeFunction
)
So far, the test is only with deleting the original function (no Distro or replicas) and with a 1min delay… but it does prove the case that this is possible and would very likely work with EdgeFunctions as well, since they just need to wait the extra 2hrs.
Next steps:
• polish cleanup lambda to catch can’t delete lambda error and complete gracefully
• consider putting a boolean isEdgeFunction
or similar on sst.Function
or doing this as its current sst.EdgeFunction
which simply extends sst.Function
• celebrate? 🎉Martin Wawrusch
01/25/2022, 10:45 PM