Questions tagged [aws-serverless]

AWS Serverless implementation with API Gateway, Lambda functions, CloudFormation and SAM (Serverless Application Model).

Serverless computing allows you to build and run applications and services without thinking about servers. Serverless applications don't require you to provision, scale, and manage any servers.

You can build them for nearly any type of application or backend service, and everything required to run and scale your application with high availability is handled for you.

Links

  1. Serverless Computing and Applications

  2. AWS Serverless Application Repository

  3. Serverless AWS Functions documentation

1217 questions
82
votes
7 answers

AWS SAM YAML template - Unknown Tag !Ref

When I try to deploy my AWS SAM YAML file, it fails saying the !Ref is an unknown tag. Any ideas to get around this? AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 Resources: MySimpleFunction: Type:…
EdsonF
  • 2,719
  • 3
  • 30
  • 34
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
28
votes
2 answers

AWS cloudformation error: Template validation error: Template error: resource NotificationsTopic does not support attribute type Arn in Fn::GetAtt

I am trying to create an AWS cloudformation stack using a yaml template. The goal is to create a sns topic for some notifications. I want to output the topic arn, to be able to subscribe multiple functions to that topic by just specifying the topic…
25
votes
1 answer

The API with ID does not include a resource with path /* having an integration LAMBDA on the ANY method

.net core serverless web api I am trying to do proxy integration with lambda and api gateway, everything is working fine with aws console but i am facing issues with aws cli commands i tried integrating with cli but the lambda is not properly…
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
21
votes
6 answers

Uploaded file must be a non-empty zip (Service: AWSLambdaInternal; Status Code: 400; Error Code: InvalidParameterValueException;

I have a simple Express/Node.js application with the following files with no subdirectories (other than .serverless and node_modules). .serverless node_modules app.js lambda.js package.json package-lock.json serverless.yml AWS throws this error -…
Aseem Savio
  • 680
  • 1
  • 7
  • 12
21
votes
2 answers

What's the difference between AWS sam build and sam package when using SAM?

I'm building some serverless apps and trying to use SAM. I've been going through some tutorials and some use sam build, while others use sam package. What are the differences between these commands? It seems like sam package is more difficult to…
21
votes
2 answers

How you Reference the function ARN of a Function (Lambda) in serverless.yml file?

Considering this lambda function on a serverless.yml file: functions: s3toEc2Lambda: handler: s3toec2lambda.S3toEc2Lambda name: "${self:service}-s3toEc2Lambda" role: S3toEc2LambdaRole And considering this SNS created on resources…
20
votes
1 answer

How to deploy to different environments with AWS SAM

I have two questions about AWS SAM and deployments. I’m reading through the docs and checking through examples like this and I’m still not quite sure how to deploy to a staging and production environment separately with my SAM template. Is it as…
Petesta
  • 1,623
  • 3
  • 19
  • 29
20
votes
2 answers

Parameter store vs AppConfig

When should I use Parameter store for saving configuration vs AppConfig? For example, if I had to change the log level at run time, should that be stored in SSM or Appconfig? What are the pros and cons? What are the differences in these two,…
19
votes
6 answers

AWS SAM - Template does not have any APIs connected to Lambda functions

So I'm trying to convert an existing spring boot application to an AWS lambda and using SAM. I'm trying to use aws-sam-cli to try my lambda locally, however with my SAM setup I am getting: Template does not have any APIs connected to Lambda…
Kristof Plennings
  • 469
  • 1
  • 6
  • 17
18
votes
4 answers

"sls dynamodb start" throws spawn java ENOENT

running on Mac, I've created a basic serverless service using the aws-nodejs template: serverless create --template aws-nodejs --path TestService After that I used the following commands to add serverless local: npm install…
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

Async Lambda Function: Returning promise or sending responseURL does not terminate CloudFormation custom resource invocation

I have a lambda function invoked as a custom resource via a CloudFormation template. It Creates/Deletes AWS Connect instances. The API calls work fine but I cannot seem to terminate the custom resource invocation, so the last CF block remains…
1
2 3
81 82