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
10
votes
5 answers

AWS Aurora Serverless - Communication Link Failure

I'm using MySQL Aurora Serverless cluster (with the Data API enabled) in my python code and I am getting a communications link failure exception. This usually occurs when the cluster has been dormant for some time. But, once the cluster is active, I…
john
  • 2,324
  • 3
  • 20
  • 37
10
votes
1 answer

AWS serverless-image-handler v3.x broken by changes to AWS Lambda execution environment

We were using the v3 version of the AWS serverless image handler for image processing for our site. However, when AWS released this update, the whole thing was broken. Unfortunately, the new version (v4) does not work with the Thumbor style requests…
10
votes
3 answers

How to read csv file from s3 bucket in AWS Lambda?

I am trying to read the content of a csv file which was uploaded on an s3 bucket. To do so, I get the bucket name and the file key from the event that triggered the lambda function and read it line by line. Here is my code: import json import…
Angara kilkiri
  • 137
  • 1
  • 3
  • 8
10
votes
1 answer

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. I need the URL to be constant, know deleting and…
9
votes
0 answers

Yaml-schema is throwing incorrect error message

I am getting the error String is longer than the maximum length of 1.yaml-schema: AWSDynamoDBTableAttributeDefinition for the block of code below TodosTable: Type: AWS::DynamoDB::Table Properties: TableName: Todos-${self:provider.stage} …
SMTP King
  • 429
  • 3
  • 12
9
votes
2 answers

AWS SAM local and environment parameters

I want to get rid off hardcoded passwords in my lambda that is deployed to AWS. I found I shall modify packaged.yaml: Parameters: DATABASE_URI: Description: 'Required. MongoDB connection URL' Type: 'String' Resources: …
Leos Literak
  • 8,805
  • 19
  • 81
  • 156
9
votes
1 answer

Serverless: Fire and forget by invoke method does not work as expected

I have a Serverless lambda function, in which I want to fire(invoke) a method and forget about it I'm doing it with this way // myFunction1 const params = { FunctionName: "myLambdaPath-myFunction2", InvocationType: "Event", …
9
votes
4 answers

Serverless - Lambda Layers "Cannot find module 'request'"

When I deploy my serverless api using: serverless deploy The lambda layer gets created but when I go to run the function is gives me this error: "Cannot find module 'request'" But if I upload the .zip file manually through the console (the exactly…
Mikerizzo
  • 587
  • 1
  • 4
  • 22
8
votes
4 answers

Using AWS SAM-CLI requires rebuild every time I update the code

I am using SAM CLI to develop an API Gateway Lambda proxy integration. According to the docs, I should be able to use sam local start-api to test my endpoint locally. The start-api command allows for "hot reloading" as described in the AWS SAM…
Jeff
  • 2,293
  • 4
  • 26
  • 43
8
votes
1 answer

Serverless error - No file matches include / exclude patterns

I am trying some skeleton deployment using python. Here is my serverless.yaml My folder structure is serverless-test |_lambdas |____handler.py |_layers |____common |_________somefunction.py service: serverless-test frameworkVersion:…
Abhijith Nagaraja
  • 3,370
  • 6
  • 27
  • 55
8
votes
2 answers

How to return a graphql Union from a python lambda to AWS appsync?

Is it possible to respond with graphql Union from a python lambda? How? It seems possible but I cannot get it over the line. I am including a __typename attribute but most of the time I get this error: {'errorType': 'BadRequestException', …
John Mee
  • 50,179
  • 34
  • 152
  • 186
8
votes
4 answers

AWS ECS Fargate and multi threading

Context: I am new to the "serverless" concept. I am creating a pick and place application. Basically the application will consume/pick messages from 40 queues and send/place these messages in a single outgoing FIFO queue (to maintain the sequence).…
8
votes
4 answers

Is it possible/recommended to use `sam build` in AWS CodeBuild?

This question spun out of this one. Now that I have a better understanding of what was going wrong there, and a workable, if imperfect, solution, I'm submitting a more focused follow-up (I'm still something of a novice at StackOverflow - please let…
scubbo
  • 4,969
  • 7
  • 40
  • 71
8
votes
1 answer

Lambda cannot access KMS Key

When I run my lambda code, I get the following error: The ciphertext refers to a customer master key that does not exist, does not exist in this region, or you are not allowed to access. I have mostly followed this to create the stack using…
8
votes
5 answers

Amazon lambda does not show python logs

My API(Python) is deployed on Amazon Lambda. The problem is when I request my API I get the internal server error. I can tail the Lambda logs but I don't see the actual error or stack trace where the code crashed. When I tail the logs I just get…
1 2
3
81 82