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
2
votes
1 answer

How could I reduce the long cold start time when doing SSR from Lambda

I have an SSR server for React.JS app made with CRA, ConnectedRouter, Redux and Saga. I am trying to host this server under AWS Lambda using the below code: const serverlessExpress = require('@vendia/serverless-express'); const app =…
2
votes
1 answer

serverless s3 AccessDenied

I spent hours on this issue without understanding why the Access Denied Here my corresponding part of the serverless.yml provider: name: aws runtime: nodejs12.x region: eu-central-1 environment: STAGE:…
Ajouve
  • 9,735
  • 26
  • 90
  • 137
2
votes
2 answers

Get SQS URL Name from within Serverless function?

I would like to grab the name of the serverless function. Here is my code. What I am trying to achieve is, instead of arn https://sqs.us-east-1.amazonaws.com/xxxx/channels.fifo, I want to the env SQS_URL to be set to channels.fifo. I looked at…
dempti
  • 336
  • 1
  • 3
  • 15
2
votes
0 answers

setPreviewData on Next.js /api serverless throws error (not a funciton)

I'm using next.js for presenting data from sanity.io and I'm deploying it as a serverless application on AWS (edge-optimized). At first this functionality was working but at some point it just stopped working on the aws deployment and I just can'…
2
votes
2 answers

Defining URL Query String Parameters in AWS::Serverless::Api SAM template

How do I define and validate URL Query String Parameters for an AWS::Serverless::Api in a SAM template? They don't seem to be mentioned in the documentation…
DrkStr
  • 1,752
  • 5
  • 38
  • 90
2
votes
1 answer

API Gateway 400 before reaching my code/lambda

How can I ensure requests to URLs with whatever (bad) query string data in them, make it to my lambda behind api gateway and not be blocked at api gateway? I have an endpoint on API gateway which responds to requests such as the one below where the…
2
votes
1 answer

Trouble adding an s3 event trigger to my lambda function with SAM

I am trying to get my lambda to run when an image is added to a "folder" in an s3 bucket. Here is the template AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 Description: 1. Creates the S# bucket that sotres the images…
2
votes
1 answer

AWS lambda module not found error when debugging locally using SAM cli and AWS CDK?

I am trying to debug lambda function locally using SAM cli and AWS CDK. So I am getting error function module not found any idea why so? I have taken this project from github…
rock stone
  • 473
  • 2
  • 9
  • 20
2
votes
2 answers

Reusing cloudformation template for AWS::ApiGateway::ApiKey

I have AWS SAM template, part of which looks like this: # ....... InternalApiKey: Type: AWS::ApiGateway::ApiKey Properties: Enabled: true Name: !Sub internal_api_key_${Env} Value: !Ref InternalApiKeyValue …
2
votes
1 answer

How to Include/Reference Multiple Resource files in CloudFormation?

I am new to cloud formation templates. I am trying to organize the templates based on AWS services so that I can easily manage it. For example, iam-roles in one file, dynamodb tables on another, s3, lambda resources in individual files. When I try…
Ada Pongaya
  • 405
  • 4
  • 18
2
votes
1 answer

How do I create a serverless template from a local boiler template

I have a boiler template saved in my local. How do I create a template using it? I tried the below command, but it did not work: serverless create --template-path '.\Boiler plate\' --name UserRegistration I got the following error: TypeError…
Gaurav Thantry
  • 103
  • 1
  • 13
2
votes
1 answer

Why does deploying to production fail using Vapor - Unable to load dynamic library 'imagick'

I have a basic Laravel 7.x application that I'm trying to deploy to production using Vapor. when it reaches the Running Deployment Hooks section of deployment it fails with the following message. An error occurred during deployment. Message:…
mattwallace
  • 4,132
  • 6
  • 43
  • 77
2
votes
1 answer

AWS BucketPolicy failed to create - Invalid policy syntax MalformedPolicy

I'm trying to create the following bucket policy in yaml, but the bucketPolicy fails to create: Cloudformation error message: Invalid policy syntax. (Service: Amazon S3; Status Code: 400; Error Code: MalformedPolicy; Request ID: CD4; S3 Extended…
2
votes
1 answer

Module not found Serverless Lambda Error with webpack

I am working with AWS lambda functions. I have configured Webpack and babel for es6 or later js versions. Everything working well. I also implemented lambda layers for common nodejs modules. This is serverless.yml layers: commonLayer: path:…
Adam Ch.
  • 163
  • 1
  • 13
2
votes
1 answer

serverless trigger for existing S3 fails with overlapping suffixes

Following S3 Simple event definition I have created serverless deployment functions: convert: handler: handler.convert events: - s3: bucket: dev.domain.com event: s3:ObjectCreated:* rules: -…