Questions tagged [serverless]

Serverless computing is a cloud computing execution model in which the cloud provider dynamically manages the allocation of machine resources. Pricing is based on the actual amount of resources consumed by an application, rather than on pre-purchased units of capacity. It is a form of utility computing.

Serverless computing still requires servers. The name "serverless computing" is used because the server management and capacity planning decisions are completely hidden from the developer or operator. Serverless code can be used in conjunction with code deployed in traditional styles, such as microservices. Alternatively, applications can be written to be purely serverless and use no provisioned services at all.

3486 questions
25
votes
7 answers

Why do I get a UserCodeSyntaxError when I have no syntax error in my code?

I'm currently creating a Dialogflow chatbot in nodejs and upon deploying my code I get an error message. I've attempted to uncomment most things out to just be left with the base functioning code and I am still unable to get it working. I'm not…
Lucas Raza
  • 499
  • 1
  • 4
  • 13
25
votes
3 answers

"An error occurred: LogGroup - already exists" while trying to deploy Serverless

after running sls deploy -v && sls s3deploy as I normally do, I ran into this issue: ... CloudFormation - CREATE_FAILED - AWS::Logs::LogGroup - CallTextractLogGroup ... CloudFormation - CREATE_FAILED - AWS::IAM::Role -…
25
votes
5 answers

Serverless Error, CloudFormation cannot update a stack when a custom-named resource requires replacing

I have the following error. Serverless: Operation failed! Serverless Error --------------------------------------- An error occurred: phoneNumberTable - CloudFormation cannot update a stack when a custom-named resource requires replacing. Rename…
24
votes
8 answers

Unzipped size must be smaller than 262144000 bytes - AWS Lambda Error

I have tried to upload my application using servless/lambda function AWS, but i got this issue: An error occurred: AppLambdaFunction - Unzipped size must be smaller than 262144000 bytes (Service: AWSLambdaInternal; Status Code: 400; Error Code:…
Danilo
  • 381
  • 1
  • 2
  • 4
23
votes
5 answers

Serverless - "Unknown object type asyncfunction" error during deployment

This morning the serverless deployment of my project started to fail. I didn't change anything in the code and the last successful deployment was around a week ago. Here's the deployment log: Error -------------------------------------------------- …
Claus
  • 5,662
  • 10
  • 77
  • 118
23
votes
5 answers

Creating an Aurora Serverless Cluster from cloudformation?

From Aurora Serverless's document, there are 3 ways to create an Aurora serverless DB cluster: AWS management console, CLI, and RDS API. (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/aurora-serverless.create.html) Form my understanding,…
22
votes
4 answers

Serverless: how to remove one function

I am using serverless to deploy my API on AWS. In serverless, it allows to deploy a single function: sls deploy -f But it doesn't allow to remove a single function: sls remove // will remove all functions. Is there any way to…
Phong Vu
  • 2,726
  • 6
  • 24
  • 52
22
votes
4 answers

Best practice to store single value in AWS Lambda

I have a Lambda that is generating and returning a value. This value can expire. Therefore I need to check the values validity before returning. As generating is quite expensive (taken from another service) I'd like to store the value somehow. What…
22
votes
4 answers

Is it possible to subscribe to a WebSocket in a serverless fashion using AWS?

A website offers a websocket to get real-time data from. I'm trying to record data received from the websocket in a DynamoDB table for a data source for a serverless application. Their example of how to use the websocket is some Node.JS code using…
Braydon
  • 231
  • 1
  • 2
  • 6
22
votes
3 answers

AWS Lambda: Identifying cold starts

Is there a clear way to identify "cold starts"? Either in runtime in the Lambda itself, or via the logs? I know that cold starts are characterized by longer runtimes, which I can actually see, but I'm looking for a clear cut way. I'm using Node.js…
Bachman
  • 701
  • 1
  • 6
  • 25
21
votes
1 answer

FUNCTION_ERROR_INIT_FAILURE AWS lambda

I recently added the cool lambda feature - provisioned concurrency. After a few successful deployments, I now face this issue Serverless Error --------------------------------------- ServerlessError: An error occurred: …
20
votes
5 answers

Can Lambda continue after returning response?

Is it possible for Lambda to continue processing after returning a response like the status code is 202 then Lambda will have to call a request before ending the Lambda?
Steven
  • 821
  • 1
  • 10
  • 24
20
votes
2 answers

Parameter Store request timing out inside of AWS Lambda

I'm attempting to access the AWS SSM Parameter store, like this article does. I have tested the lambda function locally and it works as expected. When pushed to AWS, however, the lambda fails when attempting to retreive the config; it times out: { …
20
votes
2 answers

Using GraalVM to run Java in AWS Lambda

Is there any ability to use GraalVM to run Java in AWS Lambda functions? I read a lot articles about cold starts of Java applications with GraalVM AOT (ahead-of-time) compilation feature and decreasing duration of that and I'd like to try to use it…
Hleb
  • 7,037
  • 12
  • 58
  • 117
18
votes
9 answers

Getting a 504/502 error on api requests in Nextjs deployed on Vercel

I have developed an application in Next.js. For the backend I have used the api endpoints configured in Nextjs which rest inside pages/api. The api end points quite often return 502(Gateway timeout error) or 504(There is a problem with our…
Usman Abdur Rehman
  • 334
  • 1
  • 3
  • 13