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
18
votes
2 answers

Cannot find module 'source-map-support/register

I've followed the webpack4 example to setup the config: https://github.com/serverless-heaven/serverless-webpack/tree/master/examples/babel-webpack-4 as I got the error "cannot find module source-map-support/register". I've looked into the already…
18
votes
2 answers

AWS Lambda Function always returns null (Node/Javascript)?

I have a simple Lambda function that is supposed to take event data and send a message to an SNS topic. Runtime is Node.js 8.10. Here's my Lambda code in its entirety: const AWS = require("aws-sdk"); exports.handler = async (event) => { const sns…
Z_z_Z
  • 1,057
  • 4
  • 12
  • 22
17
votes
4 answers

What does npm ERR! code ELSPROBLEMS mean?

Building a node project, using serverless Firstly I get the error Error: Error: npm ls -prod -json -depth=1 failed with code 1 at ChildProcess. (/Users/jrobens/NetBeansProjects/azuron/winpay/winpay-…
Interlated
  • 5,108
  • 6
  • 48
  • 79
17
votes
1 answer

Where to put "useDotenv: true" in serverless.yml file?

I was using serverless templates and all worked fine until suddenly all my deployments started ignoring .env files. I searched through the documentation and it says that if I want to use the environment variables from .env files I now have to add…
17
votes
6 answers

Serverless: Deplyment error S3 Bucket already exists in stack

I am trying to deploy a serverless project which has s3 bucket creation cloudformation in the serverless.yml file, but the problem is when I tried to deploy, it says the s3 bucket already exists and failing the deployment. I know s3 bucket name…
17
votes
3 answers

AccessDenied on DynamoDB GSI Index

I've wrote a serverless.yml to deploy some lambdas and I'm using GSI in a specific API. If I run locally using serverless-offline, it's working but I'm facing an error when deploy the lambda: AccessDeniedException: User:…
user866364
17
votes
2 answers

CORS on Serverless yml

I have a React application and trying to access to serverless from aws. But I have below error No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://www.test.com' is therefore not allowed access. The response…
Lee
  • 333
  • 3
  • 7
  • 19
16
votes
3 answers

Express.js app serverless, using Lambda or Functions - a good idea?

Disclaimer: I admit this is more of a broad-ish best practice question, rather then a specific programming issue, however, I believe the SO bunch is the best audience for it. I am aware of this similar question (Should I be using Express.js in a…
marko-36
  • 1,309
  • 3
  • 23
  • 38
16
votes
9 answers

Serverless command "offline" not found

I am running my nodejs code and also installed serverless(npm i -g serverless) but while running it with the command sls offline start --CacheInvalidations I am getting error as:- Serverless Error --------------------------------------- Serverless…
16
votes
3 answers

Get SQS URL from within Serverless function?

I'm building a Serverless app that defines an SQS queue in the resources as follows: resources: Resources: TheQueue: Type: "AWS:SQS:Queue" Properties: QueueName: "TheQueue" I want to send messages to this queue from within…
Nick ONeill
  • 7,341
  • 10
  • 47
  • 61
15
votes
10 answers

Azure Function in Java does not work locally

I am trying to run Azure function locally on my mac with IntelliJ. I did everything, step by step in this tutorial: https://learn.microsoft.com/en-us/azure/azure-functions/functions-create-maven-intellij but when I start the project console show me…
Mário Jaroš
  • 433
  • 1
  • 3
  • 11
15
votes
6 answers

AWS Eventbridge: Pattern to capture ALL events

I'd like to deploy an AWS Event Rule in Eventbridge which is triggered by all events, with no filtering whatsoever. I've tried the following patterns with no luck. { source: ["*"] } According to the documentation you cannot leave the pattern empty.…
15
votes
5 answers

Exposing to public more than 1 port with AWS ECS service and Elastic LoadBalancer

I have service that exposes multiple ports and it worked fine with kubernetes but now we move it to AWS ECS. It seems I can only expose ports via Load Balancer and I am limited to 1 port per service/tasks even when docker defines multiple ports I…
15
votes
1 answer

Sequelize connection timeout while using Serverless Aurora, looking for a way to increase timeout duration or retry connection

I'm having an issue at the moment where I'm trying to make use of a Serverless Aurora database as part of my application. The problem is essentially that when the database is cold, time to establish a connection can be greater than 30 seconds (due…
Scott Carpenter
  • 449
  • 1
  • 3
  • 10
15
votes
3 answers

Not able to add policies in SAM template

I am working on SAM template for publishing my Application in AWS Serverless repository. But when I try to add policies for my lambda it shows me error: Invalid Serverless Application Specification document. Number of errors found: 1. Errors:…
Mayank
  • 325
  • 1
  • 4
  • 13