Questions tagged [aws-serverless]

AWS Serverless implementation with API Gateway, Lambda functions, CloudFormation and SAM (Serverless Application Model).

Serverless computing allows you to build and run applications and services without thinking about servers. Serverless applications don't require you to provision, scale, and manage any servers.

You can build them for nearly any type of application or backend service, and everything required to run and scale your application with high availability is handled for you.

Links

  1. Serverless Computing and Applications

  2. AWS Serverless Application Repository

  3. Serverless AWS Functions documentation

1217 questions
7
votes
1 answer

AWS Lambda filesystem path for a Serverless Framework Function?

So this seems easy but has been tricky. Obviously Serverless bundles with webpack and then uploads to S3 before deploying with Cloud Formation. The issue here is that webpack has some isues with the node __dirname, as you can read about over here:…
Necevil
  • 2,802
  • 5
  • 25
  • 42
7
votes
1 answer

AWS SAM template/cloudformation No integration defined for method (Service: AmazonApiGateway

I am trying to deploy a lambda function and API gateway . I create a .net core web API project with AWS CLI . Deploying only the function and creating the API gateway and resource manually on aws web console does work. If I do include the API…
7
votes
3 answers

DynamoDB w/ Serverless, using Fn::GetRef to reference global secondary index

I have an API/service I'm defining with a DynamoDB table. I have a couple indexes (defined as Global Secondary Index) to support a couple queries. I have the table designed, with the GSI definitions, and what looks like correct queries. However,…
6
votes
2 answers

Python error in serverless framework stating - Serverless Error: spawn docker ENOENT

Error: Running "serverless" from node_modules Deploying serverless-flask to stage dev (us-east-1) ✖ Stack serverless-flask-dev failed to deploy (0s) Environment: darwin, node 16.0.0, framework 3.1.1 (local) 3.1.1v (global), plugin 6.0.0, SDK…
6
votes
2 answers

Exclude everything in the build except one folder Serverless Patterns

I am working on a serverless project. what I want to achieve or want to know if it is possible or not is that when I run sls package i want the serverless to exclude every file/folder in the root directory except for one folder. I have tried…
6
votes
1 answer

Serverless can't fetch all records Event object failed validation?

I am trying to fetch all records using query and JSON schema but I am keep getting Event object failed validation unless I pass a query it didn't give me any result. I am trying to fetch all the records that have status=OPEN I set the default value…
Developer Nans
  • 311
  • 1
  • 4
  • 14
6
votes
3 answers

Serverless-offline throws "Configuration error" or "Cannot read property 'options' of undefined"

I am trying to deploy a serverless REST API with NodeJS, AWS Lambda, API Gateway, RDS and PostgreSQL. So far I've set up the PostgreSQL RDS successfully and before start writing the functions to handle the requests to the DB I thought it'd be a good…
andres_v
  • 399
  • 1
  • 4
  • 12
6
votes
2 answers

Provisioned concurrency has minor impact on response time of Lambda function

We are using a serverless architecture along with AWS Lambda and an API gateway. The execution time of the lambda is in the range of a few milliseconds. The final response at the client's end is received in seconds (which is far more than the…
Avani Khabiya
  • 1,207
  • 2
  • 15
  • 34
6
votes
1 answer

Change API Gateway Name when using Serverless Framework

The Serverless framework has made it very easy for developers to create an API gateway connected to a lambda function. like this hello: name: hello-handler description: blablabla handler: /lambda-functions/hello-handler.handler role:…
joe
  • 128
  • 9
6
votes
4 answers

Error Unable to setup base domain mappings for serverless custom domain

In serverless.yml, under custom, I have the following code (with dummy values here): customDomain: domainName: myhost.mydomain.com basePath: '' stage: ${self:provider:stage} createRouteS3Record: true endpointType: 'edge' …
6
votes
2 answers

Php laravel Upload file directly to AWS S3 bucket

Can anyone help me how to upload a file into aws S3 bucket using PHP laravel. But the file should directly get uploaded into S3 using pre signed URL.
6
votes
1 answer

Sharing an Authorizer between different HTTP API services in AWS with Serverless

I am looking to share an authorizer between different HTTP API services with Serverless. I have seen different links which explain about splitting different endpoints/services into separate holders with their own serverless.yml files, but I cannot…
StuartM
  • 6,743
  • 18
  • 84
  • 160
6
votes
1 answer

How to connect google data studio to postgres serverless on AWS using ssh tunnel?

I have my database on AWS serverless and I can only connect to it outside the VPC via ssh tunnel, I need to connect from Google Data Studio, does anyone have any solution?
6
votes
4 answers

What’s the best way to deploy multiple lambda functions from a single github repo onto AWS?

I have a single repository that hosts my lambda functions on github. I would like to be able to deploy the new versions whenever new logic is pushed to master. I did a lot of reasearch and found a few different approaches, but nothing really clear.…
6
votes
4 answers

Unable to import module 'handler' aws lambda function in nodejs

I keep getting this error and I don't know what is causing it. I am having an API that based on a condition will post to another API, but I get this error in my wrapping API. Here is the code ... handler.js 'use strict'; const axios =…
squeekyDave
  • 918
  • 2
  • 16
  • 35