Questions tagged [serverless-framework]

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

0
votes
1answer
19 views

How to create groups and grant different permissions in AWS Cognito in Serverless

I am creating an app using serverless framework in AWS. I am using NodeJS to write Lambda. In the application I want create two different roles Admin Users In my serverless.yaml file I have created ...
3
votes
1answer
27 views

How do I connect to an RDS defined under “Resources” in serverless.yml from a Lambda function?

Say I have a section in my serverless.yml like this: resources: Resources: RDSCluster: Type: AWS::RDS::DBCluster Properties: MasterUsername: SomeUserName ...
1
vote
1answer
14 views

Running Serverless template Webpack build standalone

I started working with serverless and I would like to know why I am unable to run the Webpack build without going through the Serverless framework webpack --version 4.32.0 npm --version 6.9.0 ...
0
votes
1answer
9 views

Serverless Framework - What permissions do I need to use AWS SSM Parameter Store?

I'm opening this question because there seems to be no documentation on this, so I would like to provide the answer after much time wasted in trial and error. As background, the Serverless framework ...
0
votes
0answers
7 views

Error handling binary files with an express app deployed to AWS lambda

I’m porting an old existing Express app to AWS Lambda. The app just contains 1 endpoint, and the operation is really simple: Receives a docx file via POST request Manipulates the content of the file ...
1
vote
1answer
27 views

AWS serverless framework : How to get Cogntio user pool ID and App client ID in the Lambda function

I am trying to create a cognito user pool ID and the app client using Serverless.yml file I am referring this link - https://serverless-stack.com/chapters/configure-cognito-user-pool-in-serverless....
3
votes
1answer
33 views

Serverless-framework, when does the API Gateway URL change?

I am using serverless-framework to deploy a lambda with http endpoints on AWS. This works fine and returns a API Gateway endpoint. I wanted to know under what scenarios does the endpoint URL change. ...
1
vote
1answer
20 views

Serverless deploy doesn't integrate AWS Lambda with SQS event

I am trying to create an AWS SQS event associated with an AWS Lambda function called 'sendExportJob' using Serverless framework but after the deploy I can not see in the AWS console the SQS trigger. ...
1
vote
1answer
19 views

Conditionally enable x-ray for API Gateway and Lambda in serverless framework

I am trying to enable x-ray only when I needed to save some bucks. The following serverless.yml loads the environment variables from the .env file. However, it seems like serverless only allows true, ...
0
votes
2answers
19 views

Serverless: [AWS] Unable to create role resource with policy

I am learning how to make use of serverless framework and i am at the point of creating roles on which some specific functions will assume, but cloudformation throws an error indicating: An error ...
2
votes
0answers
25 views

How can I utilize AWS::Serverless::LayerVersion in order to use external libraries in my AWS Lambda functions - AWS SAM [GoLang]

I need to use external library that is located on my local file system in order to successfully execute my Lambda function. Using AWS SAM framework I found out that this can be done by specifying AWS::...
0
votes
1answer
21 views

How to define CF resource as function event source in serverless framework

I'm trying to create a AWS Lambda with the serverless framework. The Lambda is triggered through an AWS IoT Topic Rule. In case the execution of the Rule fails I want to have an error action executed. ...
2
votes
1answer
31 views

Client receiving 502 error despite Lambda logs reporting success

The API response body: ReadableStream bodyUsed: true headers: Headers __proto__: Headers ok: false redirected: false status: 502 statusText: "" type: "cors" url: "correct-url" __proto__: Response ...
0
votes
0answers
14 views

East/West communication in a AWS serverless microservice architecture

I am well aware of the fact that east/west, or service to service synchronous communication between services is not the gold standard, and should only be used sparingly in a microservice architecture. ...
0
votes
1answer
32 views

Serverless deploy failing with + character in stackTags variable

In My serverless.yml file i have a StackTag variable defined as below stackTags: Name: My Service Category: Environment:${opt:stage}+Role:Application So when i run sls deploy --stage dev in ...
0
votes
0answers
18 views

Step Function state machine built using Serverless gets stuck in infinite retry loop

I'm looking to see if my implementation is wrong on my serverless.yml. As far as I can see, my Retry: logic is being ignored. The state machine fails on the 2nd function (callTextract, CallTextract ...
2
votes
0answers
31 views

File getting corrupted on S3 when upload using serverless framework

I am using Serverless Framework which has functionality of the File(Image/Excel) upload on S3 bucket of AWS. While uploading file I am using S3 service of "putObject" function with basic params for ...
0
votes
0answers
24 views

DNS_PROBE_FINISHED_NXDOMAIN trying to access AWS lambda endpoint

I'm trying to deploy a Node/Express app to AWS lambda using serverless. It seems to work, but after several executions of serverless deploy, I get DNS_PROBE_FINISHED_NXDOMAIN error when trying to ...
1
vote
0answers
23 views

“Type Error: lambda is not a function” in handler with multiple functions

I have two functions in my handler.js file and I have configured them correctly in serverless.yml. The problem is, when I run invocation, only the first one work and the second one throws a type error:...
1
vote
1answer
54 views

Having multiple main.go files in order to deploy AWS Lambda based application

I have following complex structure: utils: - utils.go function1: pkg1_specific_to_fn1: -pkg1_specific_to_fn1.go pkg2_specific_to_fn1: -pkg2_specific_to_fn1.go main.go ...
2
votes
1answer
30 views

Attempting to check if s3 bucket item exists within nested asyncs

I have a Serverless Lambda function that, in response to an S3 s3:ObjectCreated event, tries to check if a separate item exists in an S3 bucket using the following bit of code using the AWS JavaScript ...
0
votes
1answer
25 views

Deploying multiple AWS Lambda functions

If I have several AWS Lambda functions, is it possible to specify deployment configuration for all three functions in a single YML file, or do I need to write specific YML file for each Lambda ...
0
votes
0answers
23 views

Custom api gateway websocket endpoint using serverless

I’m trying to custom my api gateway websocket endpoint via serverless because I need to initialize it for cloudfront which is deployed before websocket. The initialize code is below: ...
0
votes
2answers
53 views

How to properly setup an IAM execution role and a bucket policy for getting lambda writing to a public read S3 bucket?

For context, I'm using serverless framework so a few things happening: A role is created with some attached policies and a lambda function gets that assigned as execution role. The S3 policies are (...
0
votes
0answers
32 views

two resources shown in api gateway stage after deployment

I have created one lambda function when I deploy it. Using sls deploy -s dev, I can see in API gateway stage dev with resource path /users. functions: user: handler: user/index.user events: ...
0
votes
2answers
22 views

AWS Serverless VPC Subnet Creation

If I create VPC and Subnets using my serverless.yml file and I deploy it later again does the VPC get created again ? Or only incremental changes are pushed.
1
vote
1answer
42 views

SQS messages are always one message behind in serverless

I am working with a serverless API, and I have a lambda function triggered from an sqs queue, with the batch size of 1, which means my intention is to trigger the lambda soon as I send a message to ...
2
votes
0answers
64 views

Why do I get an error when I put the cors:true option back in to serverless.yml?

To test that I needed CORS enabled in my API Gateway for a Lambda Proxy, I removed the cors:true definition in my serverless.yml. Then when I put it back, I get the following error: You can only ...
1
vote
1answer
24 views

How to create different access levels in aws cognito?

I have a working web app developed using aws web services including api gateway, lambda and dynamo db. I used cognito user pool to authenticate the users. But I failed to find a way to achieve ...
0
votes
1answer
34 views

Cannot put event to a cloud watch log stream using aws-sdk with serverless

I am trying to log some information to a log stream I created in aws watchlog using a lambda function with aws-sdk, but I cannot get any logs even when the lambda is triggered. This is my code, ...
1
vote
1answer
18 views

Unauthenticated and authenticated APIs using Cognito

I followed the tutorial at https://serverless-stack.com to create an "events" API. The admin creates an event and then can set a property as "published" to allow guests to view those events. This ...
1
vote
1answer
26 views

SNS Topic says it wants a string

I have looked around through several guides and they all follow this same pattern, yet I still get the following error: An error occurred: IngestSNSTopic - Value of property Endpoint must be of type ...
0
votes
2answers
31 views

Google HTTP Cloud Function returns 403

I use serverless framework to manage my cloud functions. Some of them are of HTTP type. Recently, all the HTTP functions started to fail with 403 error. No matter if you enter a URL in a browser or ...
1
vote
0answers
23 views

API Gateway Resource policy returning 403

So I'm trying to restrict access on API Gateway for one API endpoint for Auth0 to call when a user has signed Up. I've tried a few permutations on this, the example below in my mind should work that ...
1
vote
0answers
29 views

How to manipulate request Accept header for AWS API Gateway Lambda LAMBDA_PROXY integration

I've written a small lambda function and deployed to AWS using the serverless framework. It provides a single function that returns a png file. When the resource is opened in a browser it correctly ...
1
vote
1answer
30 views

How can I load a third-party ML model into a serverless function

I have built an ML model (using the sklearn module), and I want to serve it predictions via AWS API Gateway + Lambda function. My problems are: I can't install sklearn + numpy etc. because of the ...
0
votes
1answer
53 views

Nested stack does not detect changes in the template with RequestMappingTemplateS3Location

I have a serverless specification with a nested stack, I want to define Type: AWS :: AppSync :: Resolver using RequestMappingTemplateS3Location and ResponseMappingTemplateS3Location, and the templates ...
0
votes
0answers
28 views

webpack with serverless isn't working with folder structure

I have few serverless project created without using ES6/ES7 support. In our new project, i wanted to integrate this with serverless but not able to get it going. Here is my serverless.yml file #...
0
votes
1answer
46 views

Cannot connect RDS Database to a Lambda Function (Using serverless framework)

I want to connect my RDS Database table with my lambda function, for this, I have created a lambda function and used knex.js and postgres database in rds, I got the knex object, but I cannot work with ...
0
votes
1answer
56 views

How to make lambda wait for callback?

I'm creating an AWS lambda function that is supposed to regularly backup an AppSync API on S3 (it is fired by a CloudWatch schedule rule). It's based on a class that, for each API passed as the ...
0
votes
0answers
18 views

How to emulates google cloud function on local machine to speed up the development cycles?

I found a plugin: https://www.npmjs.com/package/serverless-offline But it emulates AWS lambda. I write a HTTP function and test it, print out the second argument of the function: res: {"...
0
votes
0answers
7 views

Set resource for iamRoleStatements to my Lambda function in Serverless Framework

I'm using Serverless for my Lambda deployment and when creating my iamRoleStatements I want the resource to be set to my Lambda's ARN. I've tried the following with no success: Resource: "arn:aws:...
0
votes
1answer
43 views

ES6/ES7 support with serverless

I have few serverless project created without using ES6/ES7 support. In our new project, i wanted to integrate this with serverless but not able to get it going. Here is my serverless.yml file #...
1
vote
1answer
45 views

Deploying SSR Nuxt.js on AWS Lambda with Cloudflare?

I am trying to implement a vue.js server(-less) side rendered webshop-a-like-site via nuxt.js on AWS Lambda backed with Cloudflare. I prefer Cloudflare over Cloudfront because of http/3, image ...
0
votes
1answer
41 views

How to deploy serverless code in different stages via command line?

Currently I'm using following command line to deploy in different stages from my local mechine: serverless deploy --stage qa But this code create whole new section (project) in the API Gateway ...
2
votes
0answers
30 views

AWS Layer: adding “/opt/” path when using a Nodejs layer

So I uploaded this layer to AWS using the Serverless framework: service: webstorm-layer provider: name: aws runtime: nodejs8.10 region: us-east-1 layers: nodejs: path: nodejs ...
1
vote
1answer
22 views

Why serverless endpoint urls in not working?

I have followed this https://serverless.com/blog/serverless-express-rest-api/ to setting up serverless framework on AWS. I am successfully getting end points on cmd. But when I am hitting the end ...
0
votes
0answers
16 views

Timestamp crawled as a String

I crawled .csv file and crawler create table but time column created as a string not timestamp here is my yaml AWSGlueTimeSeriesCsvCrawler2: Type: AWS::Glue::Crawler Properties: ...
1
vote
1answer
102 views

Node Debug serverless offline using vscode

I am using VS Code for development of AWS Lambda functions, I started using the serverless framework and the serverless offline library but,I am unable to use VS Code's debug mode to locally debug the ...
0
votes
0answers
54 views

Adding an additional resource on serverless for AWS API Gateway

I have a serverless app with a http event. I need to create a child resource to the endpoint created by serverless. How can I accomplish this with serverless? The template looks like this so far: ...

http://mssss.yulina-kosm.ru