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

AWS serverless function is not responding with an image

I'm trying to have AWS API Gateway respond back with an image. My Serverless Lambda code is the following const express = require('express'); const serverless = require('serverless-http'); const bodyParser = require('body-parser'); const request =…
5
votes
3 answers

Run a lambda on every DynamoDb entry on schedule?

Is there a way to run a Lambda on every DynamoDb table record? I have a Dynamo table with name, last name, email and a Lambda that takes name, last name, email as parameters. I am trying to configure the environment such that, every day, the Lambda…
5
votes
1 answer

Self signed certificate error in serverless deply

I am trying to deploy serverless application on AWS from my local machine.The machine is behind company firewall. Initially I was getting connection error so I added http_proxy and https_proxy settings on terminal. Now when I try to deploy I am…
5
votes
8 answers

Serverless deploy with serverless-python-requirements does not work

I am trying to deploy a python lambda function using serverless. I need the psycopg2 library so I used the serverless-python-requirements plugin and added it to my serverless.yml file. plugins: - serverless-python-requirements custom: …
torylor
  • 107
  • 1
  • 4
  • 11
5
votes
1 answer

Invalid HTTP endpoint specified for URI in Amazon ApiGateway

I am trying to create a resource /user/devices with GET method for API Gateway using cloudformation template but it is giving me a below error An error occurred: ApiGatewayRootMethod - Invalid HTTP endpoint specified for URI (Service:…
5
votes
2 answers

Troubles with "X-Forwarded-*" headers in HTTP request done by AWS Lambda

I developed an AWS Lambda Proxy using Serverless in order to call a private API, process its result and return it. It's simple enough, though the private API does not return anything once "X-Forwarded-For" is set in the HTTP request. I haven't found…
5
votes
2 answers

serverless: function doesn't exist in this service

In serverless i have the following directory structure for my functions: serverless.yml functions - stories - create.js get.js my serverless.yml then looks like this: functions: stories: create: handler:…
gardni
  • 1,384
  • 2
  • 24
  • 51
5
votes
1 answer

Finding logs for lambda function errors in AWS Cloudwatch?

I'm going to profess that I have not actually started deploying AWS Lambda functions yet, but this article says this: The logs on AWS CloudWatch are horrible. It took me an eternity to find failing functions for simple applications, imagine the…
4
votes
4 answers

CSRF verification failed after adding a filefield on model

I'm having a weird problem. So I have an application where my model was completely fine until I added a Filefield to it. Now I'm getting a CSRF-Verification failed error, even if I don't try to upload a file and leave it blank, it gives me the error…
Yorbjörn
  • 356
  • 3
  • 21
4
votes
2 answers

How to configure eventbridge rule in serverless.yml (using serverless framework ) to invoke lambda on specific time

We have already python lambda function running with AWS eventbridge which was configured manually using console to trigger lambda on 9 PM everyday. Currently, we also have rule arn for eventbridge. Plan: So, We are migrating everything to serverless…
4
votes
2 answers

Cannot read property 'defaultEncoding' in s3sync Plugin of Serverless framework

I had installed the plugin by following command in serverless 2.53.1. npm install --save-dev serverless-s3-sync After installing I had imported the plugin like this in serverless.yml plugins: - serverless-plugin-common-excludes -…
4
votes
0 answers

Skip gradle test with aws sam build

I have java spring boot gradle project. When I use sam build command it fails because of failing tests. Is there a way to skip tests with sam build. I know that tests can be skipped with gradle build like so: gradle build -x test but don't know how…
Ayush Shukla
  • 419
  • 1
  • 4
  • 10
4
votes
1 answer

AWS SAM - Apply policy template for a resource created conditionally

I create a DynamoDb table conditionally: MyDynamoTable: Type: AWS::DynamoDB::Table Condition: IsDevAccount and this is how IsDevAccount is defined using an input parameter: Conditions: IsDevAccount: !Equals [ !Ref Stage, dev ] Now I'm…
Amir Keibi
  • 1,991
  • 28
  • 45
4
votes
1 answer

Serverless Deployment not working (Python, Lambda)

I have a lot of code abstracted away into execute(): xkcdrandomizer.py import xkcd import cv2 import imageio import matplotlib.pyplot as plt import numpy as np import random from kumikolib import Kumiko import tweepy import json import…
4
votes
2 answers

Serverless Error AWS profile "" doesn't seem to be configured?

It's my first time working around AWS and I'm trying to run an API through serverless. I'm not sure how to configure AWS profile. I can't seem to find much information about it online either. Does anyone have maybe a link? or something to lead me in…
Stephen
  • 99
  • 2
  • 7