Questions tagged [serverless-framework]

Serverless Framework – Build and maintain web, mobile and IoT applications running on AWS, Google Cloud or Azure

0
votes
1answer
15 views

How should I post a file to AWS Lambda function, process it, and return a file to the client?

I'm using serverless-http to make an express endpoint on AWS Lambda - pretty simple in general. The flow is basically: POST a zip file via a multipart form to my endpoint Unzip the file (which ...
0
votes
0answers
15 views

Decompress-zip emit anything in this Express route, why?

Maybe I'm just tired but I can't figure out why this won't work! This is an express route running on AWS Lambda using the serverless framework (serverless-http). I'm using Multer to handle the file ...
2
votes
1answer
36 views

What interface should a Serverless scheduled java function implement?

I'm trying out writing a Java AWS Lambda using Serverless. While my Lambdas triggered by HTTP endpoints deploy and work correctly, my attempt at at scheduled one fails: The config looks like: from ...
2
votes
1answer
18 views

How to use Stage Variables in API gateway to point to different lambda functions with the serverless framework

I have been trying to automate my serverless deployment and found this article about how you can use stage variables to point to different functions. I thought this is great and would make stages ...
-3
votes
0answers
51 views

How can I deploy nodejs code on aws lambda?

I have my nodejs code running successfully on local. I need to deploy that code on aws lambda. Can someone please guide me some steps to accomplish this. Thank you!!!
0
votes
1answer
23 views

How can I customize the deployment bucket name for Google Cloud via the Serverless Framework?

Is there a way to use a predefined bucket using serverless and gcp? I tried using: deploymentBucket: name: build-artifacts-kkesley ...but it ignores it and create it's own bucket.
1
vote
0answers
24 views

Running Wand on lambda return ImageMagick in the system is likely to be impossible to load liblqr

Trying to run wand library to resize image image using liquid resize in serverless framework when invoke the function locally it works fine. but running on Lambda results in the following ...
2
votes
1answer
50 views

Decrypting keys from aws-kms in Ruby

I’m using serverless-kms-secrets on serverless frameword to set some ENV variables I want to consume using Ruby. I can confirm that the plugin works perfectly, it generated the file with the ...
3
votes
1answer
37 views

Rate Exceeded on AWS Lambda Using API Gateway and serverless framework

When I try to invoke a method that has a HTTP event it results in 500 Internal server error. On CloudWatch logs it shows Recoverable error occurred (Rate Exceeded.) When I try invoke a function ...
3
votes
0answers
32 views

serverless rate is working but cron is not working

In serverless.yml functions: cron: handler: schedule/handler.run events: - schedule: rate: cron(28 10 15 * ? *) enabled: true I want to get this function is ...
1
vote
0answers
29 views

Set Request Validator of API Gateway by serverless

I want to set Request Validator of API Gateway by serverless. I tried two different settings for the Request Validator. But, both methods have failed. I have summarized what I did, so please let me ...
1
vote
0answers
27 views

serverless-offline: remote Lambda custom authorizer for API Gateway

I have declared an HTTP Proxy method on my API Gateway resource using CloudFormation syntax (detailed in this earlier post.) I am trying to attach a custom authorizer, of type "Request", which uses ...
1
vote
0answers
31 views

AWS Lambda error “Cannot find module 'mongodb'”

I've successfully deployed my function to AWS. When trying to invoke the function (serverless invoke -f facebookAdInsert -l), I get the following error: { "errorMessage": "Cannot find module '...
0
votes
0answers
21 views

How do I bundle bcrypt in a yarn workspace monorepo using webpack and serverless-framework? [duplicate]

I'm trying to package a monorepo application for deployment with serverless. The monorepo uses yarn workspaces and lerna. To create the packages for deployment, we're using webpack. The project ...
1
vote
1answer
16 views

Is there a way to generate YAML instead of JSON CloudFormation templates using the Serverless Framework?

The Serverless framework is such a great tool. I use it wherever possible. I would like to know if there is a way to update the serverless.yml file to output yaml instead of json when generating ...
0
votes
0answers
18 views

Serverless offline not getting route

I have a serverless project that I just newly initialized: severless.yml: service: lambda provider: name: aws runtime: nodejs8.10 region: us-east-1 functions: hello: handler: handler....
2
votes
1answer
45 views

API Gateway HTTP Proxy integration with serverless-offline (NOT Lambda Proxy)

I am trying to use serverless-offline to develop / simulate my API Gateway locally. My API gateway makes liberal use of the HTTP proxy integrations. The production Resource looks like this: I have ...
0
votes
0answers
37 views

How does AWS-Lambda work to execute block of code for persisting list(size-300) of data on Mongodb, if aws lambda function time out is only 35 sec? [on hold]

I'm building server-less data tracking system using aws lambda and IOT-Core.I was getting 300 records on each n minutes from my IOT Core to on my Lambda handler and I configured my Lambda Function's ...
1
vote
0answers
32 views

Run local lambda using python 3.7

I'm trying to run a local lambda function using the command sls invoke local -f marketingAnalytics but this throws me an error: Traceback (most recent call last): File "/usr/local/lib/node_modules/...
1
vote
0answers
93 views

How to use a specific version of aws-sdk in lambda function building by serverless and webpack?

I need to use a higher version of aws-sdk than what lambda function provides by default. I am using serverless framework and webpack to build my serverless application. In serverless I can include or ...
2
votes
0answers
35 views

Importing serverless-http error - Cannot invoke an expression whose type lacks a call signature

Im using AWS with Serverless Framework v1.36.3 with TypeScript. Today when I make a deploy the whole API/Lambdas was affected, and in my IDE I see some issue from tslint: The problem is the way to ...
0
votes
1answer
32 views

How to call AWS lambda function in my PHP code to send emails

I have created a PHP script which uses PHP Mailer and Twilio API to send emails and SMS messages to some clients. Now when I run that script it takes very long to send even to only one client. Is it ...
1
vote
0answers
52 views

Connect to remote MongoDB from Serverless/Lambda

Using Serverless/Lambda and Node, I am failing to connect to a remote MongoDB database. The database is hosted on a separate EC2 server. Here's my Serverless function code: module.exports....
0
votes
0answers
22 views

How to make Amazon ES access policy to lambda's IAM only How to write in serverless.yml?

I want to allow only the lambda function to access Amazon ES, but are there variables that allow you to set specific arn allowed in the resources section of serverless.yml? In the aws console, we set ...
0
votes
0answers
9 views

Serverless Webtask Function - Invalid verification code

I'm trying to install a Serverless Webtask Function that can automatically update my Algolia index each time my static site (hugo) is updated using web hooks. Unfortunately, I can not create a a ...
1
vote
1answer
20 views

Serverless plugin domain manager not reducing the resource limit

I ran into the 200 resource limit on cloudformation when using serverless. I saw on the blog that using the domain manager will help mitigate this issue by freeing a few resources from the api gateway....
1
vote
1answer
226 views

Safe way to backup env.yml - Serverless Framework

It's best practice to put sensitive environment variables into env.yml and reference them in serverless.yml. Of course, this also means not checking env.yml into a code repository. So where's a safe ...
0
votes
1answer
16 views

How to render new lines with Pino.js

I have a node app that uses the aws serverless framework. For some reason pino is not rendering \n characters. My logs ending up looking something like (notice the \n in the code block formatting.): ...
1
vote
1answer
36 views

Give Lambda Invoke permission to ApiGateway with one deployment

I wrote resources in my serverless.yml like below: resources: Resources: RestApi : Type : AWS::ApiGateway::RestApi Properties : Body : ${file(./swagger.yaml)} ...
0
votes
0answers
13 views

Serverless plugin nested stack error - Cannot create LogStack

I ran into the 200 resource limit on cloudformation when using serverless. I used the serverless-nested-stacks plugin to go around that problem. When i run serverless deploy I get this error ...
0
votes
1answer
31 views

Allow serverless lambda to be called by cloud watch

I have one lambda function within my serverless.yml. It looks somehow like this: functions: clean: handler: app.run events: - schedule: rate(2 hours) It works pretty well and out of ...
1
vote
0answers
17 views

Upload image to Cloudinary via Lambda using node.js

I'm working on a Serverless Webapp (node.js) and have come across a problem which has been blocking me now for 2 days. Scenario: - User comes to the site, uploads an image directly to our S3 bucket. -...
-1
votes
2answers
19 views

Custom variable for ENV always error when deploy, serverless framework

I'm trying to use S3 service in my project. I save custom variable & use in my provider property: service: snapnext custom: imagesBucketName: snapnext-images provider: name: aws runtime: ...
1
vote
1answer
21 views

Swagger defined API can not be executed locally on Serverless framework

When api specification of serverless.yml is described in swagger format in resources instead of functions , API can not be executed locally. API specification of serverless.yml is described in ...
1
vote
1answer
22 views

Tag missing from API Gateway when using tags in serverless

I put tag information in tags in provider of serverless.yml. After executing sls deploy, I checked lambda from console of AWS, tag setting was done. However, when we confirmed the apigateway from AWS' ...
2
votes
1answer
59 views

Include exclude packages in serverless yml from same folder

I have a node_modules folder from there i want to exclude only few modules but other modules should be added while packaging. How can i do that.Also how to exclude some modules using regex. like in my ...
1
vote
1answer
44 views

Building a multi page serverless application using AWS Lambdas Serverless application model

I am new to the serverless application model for the web and want to understand a few things. I went through the AWS Building your first serverless tutorial and have a couple of questions. I am used ...
1
vote
1answer
18 views

Issue handling Lambda errors in Go

I recently found an article that has a very specific suggestion for handling errors in Go and Lambda: https://hackernoon.com/error-handling-with-api-gateway-and-go-lambda-functions-fe0e10808732 I'm ...
1
vote
1answer
14 views

Setting the env using a .env file in Serverless

Using the Serverless framework, I want to be able to change the AWS region from an envrionment variable. provider: name: aws region: ${env:AWS_REGION} Then, AWS_REGION can be set to eu-west-2. ...
1
vote
1answer
30 views

AWS Lambda node-soap function (serverless framework)

I am testing a call to a SOAP service using node-soap library. This works fine as a standalone node.js app and the SOAP service responds, however when I package the same code up as a serverless AWS ...
0
votes
1answer
24 views

Testing Apollo graphql query on AWS lambda web console

I can deploy and run successfully my lambda with a GraphqlClient in the URL: https://4er563if.execute-api.us-east-1.amazonaws.com/dev/zipcodes As far as I understand, that passes through the AWS API ...
1
vote
1answer
30 views

How to deploy a Serverless function using Gitlab CI?

I'm trying to deploy my Serverless function using a .gitlab-ci.yml file, and to inject environment variables into my function I'm using this format in my serverless.yml file: ${file(./serverless.env....
1
vote
1answer
28 views

Accessing Cognito user attributes from Appsync

Imagine that you have a simple AWS stack with Appsync, Aurora RDS and Cognito. Obviously, Cognito manages the users registration process, where each user has a few attributes, let's say email, ...
0
votes
0answers
13 views

Connecting to a Postgres database with serverless Go function

I've setup an endpoint that uses the init() function to setup my Postgres connection. The handler then uses the db to make calls to and from the db. However when I call the function there seems to be ...
0
votes
1answer
34 views

Create SNS topic with email protocol and email address endpoint using serverless

Creating Lambda functions using serverless and I am trying to create a SNS topic with Email protocol. I want to then pass that arn as an ENV variable to a lambda function. I cannot find any ...
1
vote
1answer
18 views

Define role for both Http and websocket API in one serverlss.yml

I am using AWS Websocket API with serverless framework 1.38.0 and I want to deploy both http and websocket event lamda with single serverless.yml and with one existing IAM role. Hence for this I have ...
0
votes
2answers
22 views

Installing serverless with aws-go-dep not working

I'm just getting starting with Golang and Serverless. I've basically gone through these steps on MacOS: brew install golang brew install dep npm install -g serverless mkdir ~/Projects/testproject ...
0
votes
0answers
20 views

access to custom files on AWS Lambda layers

After reading this https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html#configuration-layers-path I came with the a layer with a following structure: layer_folder nodejs ...
0
votes
1answer
32 views

Serverless conditional function deployment

Following config is extracted from my serverless.yml service: test-svc provider: name: aws ... functions: apiHandler: handler: index.handler events: - http: ANY / - http: '...
0
votes
1answer
52 views

Getting request body as a string from API gateway, expecting JSON content

I have recently started to create a slack slash command bot for learning purpose. I am getting the different format of request body from API gateway and nodejs app on EC2 server. I just want to get ...

http://mssss.yulina-kosm.ru