Ross Gerbasi
04/29/2022, 10:33 PMArpad
04/29/2022, 10:35 PMKarolis Stulgys
04/30/2022, 11:00 AMInvalid request provided: One or more of the CNAMEs you provided are already associated with a different resource.
where should I go and what should I delete?lgupta
04/30/2022, 5:38 PMLewis Eccles
05/01/2022, 6:46 AM"error": "Unexpected token < in JSON at position 0"
The 2nd screenshot is attempting to load the interface within the browser.
The only way I can interact with the GraphQL api is via the AWS console "AppSync" console where it works fine, loads the schema, I can perform queries & mutations etc. As well as use the Appsync console to authenticate users
Any one else ran into anything similar?
------ UPDATE ------
Ok quite a silly mistake on my part. I figured out how to load the UI for GraphQL in SST Console - I had to manually put my output of the GraphQL URL into SST Console, and additionally add a HTTP header to my request.
{
"x-api-key": "input output API key Here"
}
Adrián Mouly
05/02/2022, 5:06 AMKarolis Stulgys
05/02/2022, 6:28 AMauth
as as in the guide but with nextjs
and I get an issue when I use Amplify on the frontend and try to deploy the stack.
Error: Command failed with exit code 1: ./node_modules/.bin/next build
warn - The `target` config is deprecated and will be removed in a future version.
See more info here <https://nextjs.org/docs/messages/deprecated-target-config>
warn - Compiled with warnings
• I use all the latest packages in my package.json
• I have ssr:true in Amplify config
• It builds fine if I run build locally for the frontend
• It deploys fine if I remove Amplify config from the frontend
I understand this might not be related to sst but maybe someone had this issue and somehow resolved?Art Kelly
05/02/2022, 10:53 AM// Create an HTTP API
const api = new sst.Api(this, "Api", {
// Secure it with IAM Auth
defaultAuthorizationType: sst.ApiAuthorizationType.AWS_IAM,
routes: {
"GET /private": "src/private.handler",
// Make an endpoint public
"GET /public": {
function: "src/public.handler",
authorizationType: sst.ApiAuthorizationType.NONE,
},
"GET /cognito": {
function: {
srcPath: "src/",
handler: "getCognito.handler",
environment: {
"userPoolId": auth.cognitoUserPool?.userPoolId ?? ""
},
},
authorizationType: sst.ApiAuthorizationType.NONE,
}
},
});
api.attachPermissionsToRoute("GET /cognito", [
new iam.PolicyStatement({
actions: ["cognito-idp:ListUsers"],
effect: iam.Effect.ALLOW,
resources: [
`arn:aws:cognito-idp:${this.region}:${this.account}:userpool:${auth.cognitoUserPool?.userPoolId}/*`,
],
}),
])
Ryan Barnes
05/02/2022, 1:38 PMnpx sst deploy --stage prod
. I cannot see errors on the debugging stack npx sst start
.
When I start the debugging stack and query my graphql lambda all I can see from the browser is {"message":"Internal Server Error"}
and all I see from the command line is
8e29906c-8622-4ab7-98fd-5bbcb2c97764 REQUEST dummy-graphql-apollo-my-s-ApolloApiLambdaGET95C283-IaPKrXb9HmmO [src/lambda.handler] invoked by API GET /
and eventually I'll see this (looks like the call to the lambda just times out)
e30f62ab-2b81-4c6d-8fea-80baf75a8846-1651498094641 Failed to send a response because the Lambda Function timed out. If this happens again, you can increase the function timeout or use the --increase-timeout option with "sst start". Read more about the option here: <https://docs.serverless-stack.com/packages/cli#options>
However if I deploy this to prod I see a real error, I can paste in thread.
This is a small git repo that should replicate the issue https://github.com/unwrap-nlp/graphql-apollo
Do you mind helping me figure out how to see errors in the debugging stack?Chad (cysense)
05/02/2022, 3:27 PMenv
variables in SSM? How are these initially loaded? Do you put all SSM params in one stack or is this integrated into your other stacks? Do you load them from env var file and then set them or set them in the UI?Kesley David DEV
05/02/2022, 6:24 PMserverless deploy
, and my functions would be pushed to lambda in my aws account.
But I'm checking, there were big changes. Is it possible for me to deploy my api like I did before? at least initially for me to plan for migration?Scott
05/03/2022, 1:08 AMError: There was a problem transpiling the Lambda handler: > node_modules/pg/lib/native/client.js:4:21: error: Could not resolve "pg-native" (mark it as external to exclude it from the bundle, or surround it with try/catch to handle the failure at run-time)
4 │ var Native = require('pg-native')
Note - The above works locally with sst start
I've also tried an alternative solution which involves having a mocked pg-native library (which just returns an empty module). This actually works with sst build & seed deploy, BUT then sst start runs into issues running typeORM locally. See attached error.
I'm currently at a stand still of either typeORM works locally OR online, but have been unable to find a solution that works for both.Karolis Stulgys
05/03/2022, 7:19 AMnextjs
instead of create-react-app
? I get issues with deployment with auth (Amplify).
Locally things works fine. Here's my previous thread: https://serverless-stack.slack.com/archives/C01JG3B20RY/p1651472910967679Rob N
05/03/2022, 2:58 PM.dockerignore
should be placed to be picked up by the SST/CDK build of a docker lambda function?Dan Van Brunt
05/03/2022, 4:58 PM<https://domain.com/blah>
to <https://www.domain.com/blah>
Brett Fieber
05/03/2022, 7:09 PMvpc.securityGroupIds
& vpv.subnetIds
to be Arrays.
The easier solution is just wrap your ${ssm:...}
calls in `[]`'s
So for example:
vpc:
securityGroupIds: [${ssm:terraform-output/$self:provider.stage}/vpc/security-groups/default/id/value}]
subnetIds: [${ssm:terraform-output/$self:provider.stage}/vpc/subnets/private/ids/value}]
Jarod Stewart
05/03/2022, 9:04 PMconstructs
as a dev dependency and then have type issues on stack
when used on SST components?Jeff Hanna
05/03/2022, 11:20 PMJustin Robinson
05/04/2022, 12:32 PMRobert
05/04/2022, 1:21 PMSettings / Edit Custom Domains
Thank you in advance!Rohith Gilla
05/04/2022, 1:53 PMIt seems you are configuring custom domains for you URL. And SST is not able to find the hosted zone "<http://app-serverless-cli.text-shot.com|app-serverless-cli.text-shot.com>" in your AWS Route 53 account. Please double check and make sure the zone exists, or pass in a different zone.
I tried deleting npx sst remove — stage {my stage name}
but still same issues.Seth Geoghegan
05/04/2022, 2:30 PMSeth Geoghegan
05/04/2022, 5:46 PMapp.stack(StackA).stack(StackB).stack(StackC)
, should I be able to deploy stackB to a shared
stage?
yarn run sst deploy stackB --stage=shared
Based on the error message I'm receiving, I cannot:
Stack shared-my-service-stackname is not found in your app.
I know I can deploy the entire app to the shared
stage, but that's not what I want herelgupta
05/04/2022, 7:29 PMerror - Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/lgupta/Documents/Projects/checkout-com-payments-app/node_modules/kysely-data-api/dist/esm/data-api-driver' imported from /Users/lgupta/Documents/Projects/checkout-com-payments-app/node_modules/kysely-data-api/dist/esm/data-api-dialect.js
Adam Fanello
05/04/2022, 11:42 PMallowMethods: [CorsHttpMethod.ANY],
. A value of ["*"]
should (less clearly) do it, but that isn't an accepted value. I see SST is using CorsHttpMethod internally, but won't let me.Derek Kershner
05/04/2022, 11:51 PMevents.CronOptions
intentional for sst.Cron.schedule
? Seems like a huge loss for the only composable way to create a schedule to be gone.Ash Rhazaly
05/05/2022, 7:46 AMPolicyStatement
not an acceptable type in Permissions
?Robert
05/05/2022, 8:12 PMAdrian Schweizer
05/05/2022, 8:19 PMAlexandru Simandi
05/05/2022, 8:29 PM1.0.2
went fine up to this error that I cannot wrap my head around, used to work fine on 0.65.5
node_modules/aws-cdk/lib/diff.d.ts:1:26 - error TS2307: Cannot find module '@aws-cdk/cloudformation-diff' or its corresponding type declarations.
1 import * as cfnDiff from '@aws-cdk/cloudformation-diff';
The current fix is to install the dependency myself: "@aws-cdk/cloudformation-diff": "2.23.0"
, is this a bug on aws side?