Questions tagged [serverless-architecture]

Serverless architectures refer to applications that significantly depend on third-party services (knows as Backend as a Service or "BaaS") or on custom code that's run in ephemeral containers (Function as a Service or "FaaS"). By using these ideas, and by moving much behavior to the front end, such architectures remove the need for the traditional 'always on' server system sitting behind an application.

Reference: http://martinfowler.com/articles/serverless.html

177 questions
7
votes
2 answers

Providing multiple api versions on API Gateway and Lambda using Serverlesss Framework

I'm building a serverless app using API Gateway and Lambda (Serverless Framework) and trying to find a way to provide multiple versions of our app's API. Here's the way I can think of. serverless.yml handler: list.handler events: - http: …
7
votes
2 answers

How/Where to run sequelize migrations in a serverless project?

I am trying to use Sequelize js with Serverless, coming from traditional server background, I am confused where/how to run database migrations. Should I create a dedicated function for running migration or is there any other way of running…
7
votes
2 answers

AWS Lambda with poor performance when using RDS

I've implemented an AWS Lambda function using the Serverless Framework. That Lambda function is using RDS and MongoDB. The MongoDB endpoint runs around 500ms, but RDS runs on 12 sec (cold start) and ~3 sec (hot start). Note: I am using Sequelize in…
7
votes
1 answer

What is the best folder structure for a serverless project?

I'm starting to work on a new serverless project using AWS Lambda and API gateway. What is the best way to organize my project, without being locked into one framework such as the serverless framework or chalice? Here's what I'm using so…
6
votes
1 answer

How to secure an AWS Lambda function?

I have a simple Lambda function which sends emails through SES. I can call it using a POST request with the required data and it will send an email. My question is, what are the methods I can use to secure this function? Currently, anyone can call…
6
votes
1 answer

AWS CLI: The role defined for the function cannot be assumed by Lambda

AWS CLI version: aws --version aws-cli/1.11.21 Python/2.7.12 Darwin/15.3.0 botocore/1.4.78 Trying to create a Lambda function and getting the error: An error occurred (InvalidParameterValueException) when calling the CreateFunction operation: The…
5
votes
4 answers

How to fix the 'no severless pages built' in nextjs deployment using vercel?

I' am trying to deploy my NextJs app. I have been getting the same 2 errors the past few days: 1: // and will just error later on 2: Error: No serverless pages were built. Learn More: https://err.sh/vercel/vercel/now-next-no-serverless-pages-built I…
5
votes
3 answers

Serverless Web App Architecture

I am currently designing a simple Serverless Web App using Serverless. My current expected stack is; API Gateway Lambda DynamoDB Static Single Page App I have followed a few tutorials for building the Serverless API, Lambda and DynamoDB using the…
5
votes
3 answers

aws + serverless + webpack => cannot find module xxx in prod

I want to create a package to deploy on AWS using serverless and webpack. In serverless.yml I want to declare all the resources (mainly DynamoDb tables) and the functions. I want to use external node.js libraries. The folder structure is: |-…
4
votes
1 answer

MongoDB Atlas Serverless Database | Serverless Instance Costs | RPU cost explanation

Can someone explain how RPUs are getting calculated by an example ? Let's say I have a mongo collection that has 5 million documents. So if i do a findOne to the collection, the RPUs generated would be 5M or 1 ?
4
votes
1 answer

how to schedule something from cloud function

I have a serverless app running as google cloud function triggered by bucket object finalize. at the end of the function logic I want to call another action (also function) after exactly one minute (or T time). currently couldn't come up with any…
4
votes
1 answer

Cognito User Pool trying to send SMS when it's configured for email sending

I'm using the serverless framework in order to create a Cognito User Pool using the following CloudFormation configuration: Resources: CognitoUserPool: Type: AWS::Cognito::UserPool Properties: # Generate a name based on the stage …
4
votes
1 answer

Deployment(CI-CD) pipeline for serverless application

I have created a simple node express MongoDB app which has 3 API endpoints to perform basic crud operations. If I was to deploy this to Heroku as a service and use bitbucket-pipeline to perform CI-CD this would do the job for me. On top of this, I…
4
votes
1 answer

Error Code: AuthorizationError in AmazonSNS

Im trying to create a SNS topic and publish messages from the lambda. But im getting authorization error when trying to do that. Service: AmazonSNS; Status Code: 403; Error Code: AuthorizationError Full…
Dilantha
  • 1,552
  • 2
  • 30
  • 46
4
votes
2 answers

Mongo connection occasionally makes the lambda function timeout

I have been using MLab MongoDB and mongoose library to create a db connection inside a serverless (Lambda) handler. It works smoothly on local machine. But sometimes it doesn't work after deployment.The request returns an Internal server error. The…
1
2
3
11 12