Questions tagged [serverless-framework]

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

Serverless is the application framework for building serverless web, mobile and IoT applications. It's a command line interface that helps you build and maintain Serverless apps across teams of any size. It's completely extensible via Plugins and developed full-time by a dedicated team.

3050 questions
74
votes
3 answers

AWS Lambda http, where do I find the URL?

I am fairly new to AWS Lambda but sure can see the benefits of it and stumbled upon the superb framework Serverless to help me built solutions on Lambda. I started out building solutions using AWS API Gateway but really need "internal" VPC API's and…
Anders
  • 3,198
  • 1
  • 20
  • 43
73
votes
8 answers

How to pass parameters to serverless invoke local

I'm working on a aws serverless project and need to test the lambda functions locally. I am using serverless invoke local -f {function_name} command to test the API calls that does not request any path or query parameters. My question is how can I…
Lasitha Yapa
  • 4,309
  • 8
  • 38
  • 57
73
votes
4 answers

Difference between SAM template and Cloudformation template

I'm finding it hard to understand the difference between SAM template and Cloudformation template. I know that SAM template can be used to define Serverless Applications like Lambda, but how does that make it different from Cloudformation template?…
66
votes
5 answers

Rename an Azure Function

How to rename an Azure Function? I want to replace a default 'HttpTriggerCSharp1' name to my own. At the moment unfortunately this name is included in the function url and there is no option to change…
55
votes
5 answers

How do I get the AccountId as a variable in a serverless.yml file?

I want to build an ARN in my file dynamically, but I need to get my current AccountId. How can I access it as a variable? For example: example: arn:aws:states:${region}:${accountId}:stateMachine:${self:service}-${self:custom.stage}-example What is…
justin.m.chase
  • 13,061
  • 8
  • 52
  • 100
52
votes
5 answers

Lambda Integration vs. Lambda Proxy: Pros and Cons

What do you think are the Pros and Cons of using Lambda integration with and without the proxy feature in AWS API Gateway (and more specifically, when using the Serverless framework)? Here's what I think up to now: Lambda Integration with…
marcelog
  • 7,062
  • 1
  • 33
  • 46
51
votes
3 answers

How could I use aws lambda to write file to s3 (python)?

I have tried to use lambda function to write a file to S3, then test shows "succeeded" ,but nothing appeared in my S3 bucket. What happened? Does anyone can give me some advice or solutions? Thanks a lot. Here's my code. import json import…
49
votes
8 answers

How to test AWS Lambda handler locally using NodeJS?

I am following these instructions to create a basic web scraper that executes in Lambda. I have experience writing selenium code, but not with Node JS. I got the project running in Lambda, but when I tried editing the project locally in order to…
kroe761
  • 3,296
  • 9
  • 52
  • 81
45
votes
4 answers

How to return the inserted item in dynamoDB

I am using nodeJS sdk to put the item to dynamoDB, The item is: { "eventId": date + '-' + eventName + '-' + eventPurpose, "eventName": eventName, "eventPurpose": eventPurpose, "eventDates": eventDates, "attendees": attendees } The…
41
votes
2 answers

AWS Lambda Task timed out after 6.00 seconds

I am using serverless framework. My Lambda function connects to DynamoDB table for updating item in table. Read & Write capacity units of table are 5 & auto_scaling is disabled. AWS Lambda function has 128MB memory allocated. I have used Jmeter for…
41
votes
13 answers

Serverless Framework with AWS Lambda error "Cannot find module"

I'm trying to use the Serverless Framework to create a Lambda function that uses open weather NPM module. However, I'm getting the following exception, but my node_modules contain the specific library. I have managed to run the sample,…
38
votes
4 answers

What is the difference between AWS lambda and AWS Lambda@EDGE?

What is the difference between simple aws lambda and aws lambda@edge ?
mnhmilu
  • 2,327
  • 1
  • 30
  • 50
37
votes
5 answers

How to remove stage from URLs for AWS Lambda functions + Serverless framework?

I'm using Serverless Framework to deploy functions in AWS Lambda, but I can't find where/how I can remove the stage specifier from the URL endpoints created. The documentation does not seem to cover this part. For example, this is my serverless.yml…
36
votes
6 answers

AWS Serverless | Code storage limit exceeded

I have an error Code storage limit exceeded deploy the serverless application in AWS. Total size 409 B. The error message says: An error occurred: HelloLambdaFunction - Code storage limit exceeded. (Service: AWSLambda; Status Code: 400; Error Code:…
Ashish Kadam
  • 1,439
  • 2
  • 13
  • 18
35
votes
1 answer

How do I pass json inputs to a Cron scheduled Lambda deployed in Serverless using event?

I have been trying to deploy a Lambda in Serverless to run on a Cron schedule that invokes it every hour. When it is invoked, I want the event inside the Lambda to be populated by my own JSON input rather than the info from the Cron event which is…
Raiju
  • 723
  • 1
  • 6
  • 11
1
2 3
99 100