Questions tagged [serverless-stack]

Use this tag to ask questions about the Serverless Stack (SST), a deployment platform for AWS built on top of CDK.

Serverless Stack (SST) is an open-source serverless application platform that deploys to your AWS account, helping you go from idea to IPO.

SST is a collection of npm packages that allow you to create a serverless app. You can define your apps with a combination of Infrastructure as Code (using CDK) and Lambda functions.

Documentation

Github

Slack

14 questions
3
votes
0 answers

How to automatically generate OpenAPI specification for AWS Lambda functions connected to API Gateway using SST?

I am currently developing a serverless application using Serverless Stack (SST) in a Node.js and TypeScript environment. My application involves AWS Lambda functions that are connected to an API Gateway. I want to generate OpenAPI specifications for…
JaVaBoy
  • 419
  • 1
  • 4
  • 9
3
votes
1 answer

SST: Deploy only some stacks

Here out IaC project structure: ./ ├── cdk.context.json ├── package.json ├── package-lock.json ├── README.md ├── sst.json └── stacks ├── common │   ├── Msk.js │   └── Vpc.js ├── index.js ├── posiciones │   ├── Consumer.js …
Jordi
  • 20,868
  • 39
  • 149
  • 333
3
votes
2 answers

When deploying my AWS API Gateway, it fails with "The domain name you provided already exists", but I can't find it anywhere

I'm using SST, so it's CDK and CloudFormation, but ultimately, it tries to created an API Gateway that fails with this error: The domain name you provided already exists. (Service: AmazonApiGatewayV2; Status Code: 400; Error Code:…
Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622
3
votes
1 answer

Serverless stack: Maximum call stack size exceeded only in windows during npm run start

I started the guide for serverless stack, and I hit a wall pretty soon in Windows 10 (the same steps don't cause any issue in Mac or Linux). I created a simple serverless stack project, and doing: npm run start I got this: RangeError: Maximum call…
ff8mania
  • 1,553
  • 3
  • 19
  • 28
2
votes
1 answer

sst start "TypeError: getAwsCredentials is not a function"

I deleted /node_modules and /package-lock.json and did npm install. After this when I am doing npx sst start I am getting this error: TypeError: getAwsCredentials is not a function. How to solve this?
2
votes
2 answers

dynamodb add item to the array list

Using serverless-stack. I have a table company with multiple branches: new sst.Table(this, 'Company', { fields: { userId: sst.TableFieldType.STRING, companyId: sst.TableFieldType.STRING, companyName:…
Alvin
  • 8,219
  • 25
  • 96
  • 177
1
vote
0 answers

How to fix the ReferenceError: __dirname is not defined error when it's coming from a third party library?

I'm trying to import the sharp package to my function. I'm trying to create a lambda function using the SST framework. The problem is, Im getting the following error: Runtime.UnhandledPromiseRejection: ReferenceError: __dirname is not defined in ES…
THpubs
  • 7,804
  • 16
  • 68
  • 143
1
vote
1 answer

Extracting values from json request (which could possibly undefined)

I am trying to learn typescript/js and one of thing i am doing is implement a rest-api using aws-lambda (severless tack). Now, I need to extract body payload to either a construct or just assign those values to variables. Lets say I am sending…
Em Ae
  • 8,167
  • 27
  • 95
  • 162
0
votes
0 answers

I switched to using "import * as " and encountered error: Entity is not defined

I used "import * as Article" instead of "import { Article }," and then an error occurred when I ran "yarn dev". The error is: jiahao@jiahaodeMacBook-Air-2 graphql-sst-sample % yarn dev yarn run v1.22.19 $ npm run env:local sst dev >…
0
votes
0 answers

SST: How to deploy multiple stacks using the same RestApi with common base path

I'm trying to migrate our Serverless Framework application to SST. We currently have 2 stacks that use the same REST API Gateway and all paths start with /v1. Following the SST doco here I was able to add routes from two stacks into one API Gateway.…
robbash
  • 985
  • 10
  • 21
0
votes
0 answers

Error connecting with AWS RDS instance using Sequelize in lambda function

I have started using Serverless Stack for the first time and this is my first experience with serverless applications. I am connecting my AWS RDS instance with sequelize in my lambda function and it is failing with error: Error connecting database:…
0
votes
1 answer

How to invoke a lambda custom authorizer on every request?

I have a lambda function with an authorizer sitting within an API gateway. I notice that when I call the lambda function, on the first request the authorizer is invoked as expected, authorization passes, IAM role is assumed and grants access to the…
0
votes
1 answer

Failed to deploy sst app due to dynamodb table

I am new to aws and react. I had some code working yesterday (I could put data into a dynamodb table from a React page). Today I tried to create a new table (called Events), but I did not get it to work. I then rolled back all local changes using…
0
votes
1 answer

reference cognito user pool created by sst (serverless-stack) in serverless.yml

I have quite a big app built with serverless and now we are trying out serverless-stack. I am trying to reference a user pool created by sst in serverless.yml function. Is it possible? Below are the steps I've tried: I have created a user…
almeynman
  • 7,088
  • 3
  • 23
  • 37