Ömer Toraman
10/13/2021, 1:24 PMLogGroupName
in CloudWatchLogs
event?
For example:
LogSubscriber:
Type: AWS::Serverless::Function
Properties:
Handler: build/index.handler
Events:
ErrorLog:
Type: CloudWatchLogs
Properties:
FilterPattern:
LogGroupName: /aws/lambda/*
Camilo Bravo
10/13/2021, 1:52 PMThomas Ankcorn
10/13/2021, 2:53 PMIt seems you are configuring custom domains for you URL. And SST is not able to find the hosted zone "<http://example.domain.com|example.domain.com>" in your AWS Route 53 account. Please double check and make sure the zone exists, or pass in a different zone.
Dan Van Brunt
10/13/2021, 2:53 PMsst build
where it skips the StaticSite build steps and just uses whats already in the .build
?Tony J
10/13/2021, 2:58 PMDan Van Brunt
10/13/2021, 3:30 PMStaticSite
is giving the CF Distro access to the bucket? In our CFN we normally create a CF OAI and then give it read access to the bucket to that only the distro can and there is no direct access to the bucket. Seems like you have this working in StaticSite…. but I can’t see anything that sets this up? Is this maybe a sane default of cdk?Dan Van Brunt
10/13/2021, 3:42 PMStaticSite
as it currently does not seem to allow us to setup an origin group with the one that is created as part of the construct. Or am I missing something?Kelly Davis
10/13/2021, 4:05 PMDan Van Brunt
10/13/2021, 7:25 PMsst.ApiGatewayV1Api
like you can with sst.Api
?Kelly Davis
10/13/2021, 8:44 PMError: This lambda function uses a runtime that is incompatible with this layer (nodejs14.x is not in [nodejs, nodejs4.3, nodejs6.10, nodejs8.10, nodejs10.x, nodejs12.x, nodejs14.x, python2.7, python3.6, python3.7, python3.8, python3.9, java8, java8.al2, java11, dotnetcore1.0, dotnetcore2.0, dotnetcore2.1, dotnetcore3.1, go1.x, ruby2.5, ruby2.7, provided, provided.al2, FROM_IMAGE])
This just started happening - seemingly randomly - after having worked fine for the last day or so.. The specified runtime that it is complaining about is in fact in the list of compatible runtimes..Kelly Davis
10/13/2021, 10:00 PMNo native build was found for platform=darwin arch=x64 runtime=node abi=72 uv=1 libc=glibc node=12.22.6
at Function.load.path (.../node_modules/node-gyp-build/index.js:59:9) ...
There is a binary dependency, leveldown
which I've tried adding to bundle.nodeModules without success. I've confirmed that locally the darwin-x64 binary is present (in node_modules). I've also confirmed that the issue does not occur when deploying to the lambda to aws. Any suggestions?Ashishkumar Pandey
10/14/2021, 11:00 AMStan
10/14/2021, 2:39 PMimport { Function } from "@serverless-stack/resources";
import { APIGatewayProxyEventV2, APIGatewayProxyHandlerV2 } from "aws-lambda";
export const lambdaHandler: APIGatewayProxyHandlerV2 = async (event: APIGatewayProxyEventV2) => {
return {
statusCode: 200,
headers: { "Content-Type": "text/plain" },
body: `Your request was received at ${event.requestContext.time}.`
};
};
new Function(this, "MySnsLambda", {
handler: lambdaHandler
});
in the docs I found only this way:
new Function(this, "MySnsLambda", {
handler: "src/sns/index.main",
});
Pranav Tadikonda
10/14/2021, 6:30 PMDevin
10/14/2021, 8:14 PMAmplify.configure({...})
Erik Robertson
10/14/2021, 8:52 PMERROR Error: Cannot find module '/Users/erik/src/dataworks/dwam-back/.build/src/../config/config.js'
at runtime in local debug mode when calling the /list lambda endpoint where I'm adding Sequelize.
My project structure is like this :
/sst.json
/package.json
/stacks
/src/list.js my lambda endpoint, which does an import { db } from '../models';
/models/index.js which does a const config = require(__dirname + '/../config/config.js')[env];
/config/config.js
I see two possible issues :
1. In my .build folder there is a src subfolder but no models or config subfolders
2. the error above comes from .build/src/list.js where models/index.js has been included into this flattened version of list.js but in that context the dynamic require could be pointing to a different folder than intended when authoring it (in my case it's ok since src+models+config are under the root /
Any help would be welcome. It might be bad JS usage of my end of import/require since I'm not yet fully comfortable with those and the implications, but I've tried other variants without success + it wouldn't address issue #1 AFAIK.Daniel Bollom
10/15/2021, 12:56 AMkierans777
10/15/2021, 3:24 AMSam Hulick
10/15/2021, 5:45 PM❌ dev-microservices-api-files failed: Received response status [FAILED] from custom resource. Message returned: A conflicting operation is currently in progress against this resource. Please try again. (RequestId: 9ec1b767-603f-4e10-adda-68185e6353aa)
any idea why this would happen?Dennis Dang
10/15/2021, 7:15 PMarda
10/15/2021, 8:07 PMDan Van Brunt
10/15/2021, 8:40 PMcan only be default-imported using the 'esModuleInterop' flag
errors when implementing the example code of sst.ApolloApi
?Dan Van Brunt
10/15/2021, 9:07 PMsst.ApolloApi
? @Frank @thdxr Is this normal? I up’d the memory to 4096 and still averaging 1.5-2s
This is just for a hello world reply.
in comparison an actual Contentful api call takes avg 10msMatthew Smithburger
10/15/2021, 11:29 PMThere are no available API endpoints in your app. Please deploy a service with an API Gateway endpoint.
error but I do have some endpoints deployed to a dev stage. I am probably missing something simplekierans777
10/16/2021, 6:28 AMjest
package and Jest config haven't been autodetected.Saman -
10/16/2021, 3:05 PMUsername - Users can use a username and optionally multiple alternatives to sign up and sign in.
I want to allow Users to sign in/out with both Username & Email. I want both these attributes to be required. How do I achieve this?
BR,
SamanÖmer Toraman
10/16/2021, 8:53 PMnpx sts start
for the first time, it created two stacks (three actually, CDKToolKit
as well)
1. dev-notes-my-stack
2. dev-notes-debug-stack
Anyways, we (me and the Guide) then removed the stack:
npx sts remove my-stack
The output stated that it removed the stack (dev-notes-my-stack
), however, I can still see the Stack on the AWS CloudFormation console.
And when I run the above command once again:
Warning: Setting the stage in the "sst.json" will be deprecated soon. Read more about this change here: <https://docs.serverless-stack.com/working-locally#deprecating-the-stage-option-in-the-sstjson>
Using stage: dev
Preparing your SST app
Transpiling source
Linting source
Removing dev-notes-my-stack
Stack dev-notes-my-stack is not found in your app.
---
Here’s the CloudFormation Console showing the stacks:Brinsley
10/17/2021, 8:02 AMnpm start
) to error out. I'm trying to figure out how to get the type checking to ignore it but I'm at a loss right now. I've added node_modules to the ignorePatterns
array in .eslintrc.json
and to my tsconfig.json
. Any ideas?Ömer Toraman
10/17/2021, 1:20 PMnpx create-serverless-stack@latest my-app --use-yarn --language typescript
vs
yarn create serverless-stack my-app --language typescript
And what is the recommended way to run scripts?
npx sst start
vs yarn sst start
vs yarn start
(referencing the script in package.json
)Ömer Toraman
10/17/2021, 2:02 PMsst.EventBus
construct? It seems like it only allows for lambda and SQS targets