arda
11/03/2021, 6:51 PMprocess.env
is printed alright in my terminal. Do my miss something? Do I have to prefix NEXT_PUBLIC_
to these variables?Clayton
11/03/2021, 7:38 PM.nvmrc
file at the project root (e.g. with ‘16’) but it doesn’t seem to affect things.Ross Coundon
11/03/2021, 8:14 PM> node_modules/jest-pnp-resolver/index.js:46:4: error: Cannot assign to "defaultResolver" because it is a constant
46 │ defaultResolver = getDefaultResolver();
╵ ~~~~~~~~~~~~~~~
node_modules/jest-pnp-resolver/index.js:13:18: note: "defaultResolver" was declared a constant here
13 │ const {basedir, defaultResolver, extensions} = options;
╵ ~~~~~~~~~~~~~~~
> 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");
╵ ~~~~~~~~~~~~~~~~~
> node_modules/jest-pnp-resolver/getDefaultResolver.js:8:32: error: Could not resolve "jest-resolve/build/default_resolver" (mark it as external to exclude it from the bundle, or surround it with try/catch to handle the failure at run-time)
8 │ defaultResolver = require(`jest-resolve/build/default_resolver`...
╵ ^
> node_modules/jest-config/build/vendor/jsonlint.js:909:22: error: Could not resolve "file" (mark it as external to exclude it from the bundle, or surround it with try/catch to handle the failure at run-time)
909 │ var cwd = require('file').path(require('file').cwd());
╵ ~~~~~~
Is there anything that I can go back to the team with in terms of things they could change to make it work?Adrián Mouly
11/04/2021, 3:37 AMpermissions
on each integration? or I can jut define a Function and assign the permissions to it, and later attach that function to both Cron and GW?Adrián Mouly
11/04/2021, 4:50 AMGreg Martin
11/04/2021, 2:47 PMDan Van Brunt
11/04/2021, 5:18 PMDan Van Brunt
11/04/2021, 8:18 PM.env.local
env vars are not being loaded into the process.env in the sst.Stack
we just moved from 0.48.0
to 0.50.2
Noah D
11/04/2021, 9:03 PMSione
11/05/2021, 1:27 AMDan Van Brunt
11/05/2021, 2:55 AMIS_LOCAL
?Omi Chowdhury
11/05/2021, 4:25 AMinvokeError [1636085771837] started /Users/omi/workspaces/libs/lambda-utils/index.ts:1
import LogUtils, { CoveLogger, ChildLogger } from '@fragment/log-utils';
^^^^^^
SyntaxError: Cannot use import statement outside a module
I’ve tried to dig into this a bit, this is the generated import in `.build`:
var import_lambda_utils = __toModule(require("@fragment/lambda-utils"));
So for some reason esbuild is thinking that module doesn’t need to be bundled and transpiledRoss Coundon
11/05/2021, 7:33 AMError: Bundle cannot be disabled for the "AuthorizerFunction" function since the "srcPath" is set to the project root. Read more here — <https://github.com/serverless-stack/serverless-stack/issues/78>
Looking at the github issue I'm confused as to how to workaround this. Shifting my src
down a level doesn't make any difference. Does the code need to live in an entirely different folder structure for this to work?Clayton
11/05/2021, 2:33 PMaws-cdk
packages in a stack (e.g. @aws-cdk/aws-events
) and have been able to successfully run and build the stack without having to install these packages first in the project.
Is this ok, or should they be listed in the project’s package.json? And if so, is it ok for them to be devDependencies only?Seth Geoghegan
11/05/2021, 3:01 PMsst start
.
sgeoghegan-kas-api-stack | CREATE_FAILED | AWS::CloudFormation::Stack | sgeoghegan-kas-api-stack
❌ sgeoghegan-kas-api-stack failed: ERROR Parameter Name /sgeoghegan/kas/api-url with a different configuration already exists.
Stack sgeoghegan-kas-db-stack
Status: deployed
Stack sgeoghegan-kas-api-stack
Status: failed
Error: ERROR Parameter Name /sgeoghegan/kas/api-url with a different configuration already exists.
Failed to deploy the app
error Command failed with exit code 1.
info Visit <https://yarnpkg.com/en/docs/cli/run> for documentation about this command.
Blake E
11/05/2021, 4:04 PMNextjsSite
construct, with an oauth flow which requires an https redirect - so rather than struggle to setup a local cert, I’ve been deploying to test my code - which doesn’t provide the sexiest workflow.
Normally, with sst, sst start
would get me what I want - but with nextjs a boilerplate temp site is deployed, and nextjs is run locally at localhost:3000
which doesn’t satisfy my oauth partner requirements.
I’m considering ngrok to my localhost, so I can edit code locally while I test this oauth flow, but anyone have any other suggestions? Workarounds for the lack of local tunneling for next dev
sites?Joe Kendal
11/05/2021, 4:37 PMClayton
11/05/2021, 6:09 PM.addOutputs
method publishes outputs without an export name
value set – making the value inaccessible to cdk.Fn.importValue
.
Is there are way to add an export name to a SST created output or should you duplicate these via cdk.CfnOutput
?
I’m finding myself creating outputs via .addOuputs
for consumption by other SST stacks within the same service and by cdk.CfnOutput
for consumption by other Services’ stacks in the same account – which leads to duplicate outputs.
Not a huge issue, but would be nice remove the duplication in the code and console if possible.Ross Coundon
11/05/2021, 8:45 PMRoss Coundon
11/05/2021, 10:56 PMdatasetIds.forEach((datasetId) => {
const populatorFunction = new sst.Function(this, `populatorFunction-${datasetId}`, {
handler: 'src/main/handler/populator.startLookingForMissingUrls',
environment: {
OFSC_INSTANCE: datasetId,
},
});
new sst.Cron(this, `OmwPopulatorCron=${datasetId}`, {
schedule: process.env.POPULATOR_CRON,
job: {
function: populatorFunction,
},
});
})
So you can see that the OFSC_INSTANCE env var is set according to the value from a string array defined earlier.
When running this using sst start
I'm seeing some odd behaviour regarding the env var OFSC_INSTANCE.
On the first kick off of each lambda via the cron, sometimes the value of the env var is correct. However, after that, both lambdas have the same value for that env var. Sometimes they're the same on first start too.
Is there something about the local execution environment that would env vars end up getting shared between invocations of shared code?Muhammad Ali
11/07/2021, 2:14 AMaws cognito-idp sign-up
... but i have to provide a rest endpoint for user so that they can do signup themselves (and do challenge to confirm signup).
I mean there must be a library from aws-cdk
which provides user signup from backend code?Kevin Baker
11/07/2021, 1:19 PMDillon Peterson
11/07/2021, 1:37 PMHaseeb Naseem
11/08/2021, 9:54 AMSyed Farhan
11/08/2021, 7:46 PMWarning: Ignoring extra certs from `/etc/pki/tls/certs/ca-bundle.crt`, load failed: error:02001002:system library:fopen:No such file or directory
and
Unexpected Top Level Error: Error: socket hang up
Muhammad Ali
11/09/2021, 5:11 AMSean Matheson
11/09/2021, 9:42 AM/foo/*
would match /foo/bar
and /foo/bar/baz
Josep Segarra
11/09/2021, 10:38 AMYuval Ron
11/09/2021, 10:49 AMSean Matheson
11/09/2021, 3:42 PMsrc
to lambdas