Questions tagged [serverless-framework]
Serverless Framework – Build and maintain web, mobile and IoT applications running on AWS, Google Cloud or Azure
2,936
questions
0
votes
0
answers
8
views
API key required but is not specified
I'm using serverless framework to create an api gateway. I did not specify any apikeys under provider/apiGateway, yet when I navigate to the API in aws console I see that an apikey is required. Do I ...
0
votes
0
answers
12
views
I want using fixed Endpoint with serverless-appsync-simulator
Is it possible to use domain or localhost with serverless-appsync-simulator endpoint?
I don't want the endpoint to change.
When I start simulator, it uses a private IP address (192.168.x.x:20002/...
0
votes
0
answers
19
views
Serverless.js and Lambda@Edge: specifying origin
I'm trying to create a CloudFront distribution (using Serverless.js) that has two origins (both S3 buckets). There's a default origin that serves the public website, and an origin for paths starting ...
0
votes
0
answers
12
views
Serverless authorizer deleted when removing separate service
Good afternoon all, I have been running into a weird issue with the serverless cli tool over the last week. My team and I have an authorizer that we deploy separately from our APIs. When we deploy our ...
0
votes
1
answer
26
views
esbuild fails due to missing android-arm when running on ubuntu x86-64 on GitHub actions
I have a node 14 AWS lambda function using serverless-bundle for packaging, which in turn uses esbuild. Installing it locally works fine both with npm install and npm ci, also when deleting ...
0
votes
0
answers
12
views
cognito user attribute (email) is always undefined when retrieving it in lambda with cognito authorizer
I have a APIGateway with a CognitoAuthorizer. In the receiving lambda I want to check the users' email and some custom attributes I defined in the serverless using the serverless-cognito-add-custom-...
0
votes
1
answer
57
views
How to fix Serverless error "Invalid API Key identifier specified" when using 2 stages with api keys on AWS?
I am using the following configuration to deploy a couple lambda functions to different stages prod and dev on AWS. Both stages should be protected with an api key which is stored in SSM.
serverless....
0
votes
1
answer
25
views
Serverless Lambda in Ca-central-1 region
I'm trying to set-up serverless framework for Lambda function in AWS (CA-Central-1 Region) and while trying to create the CloudFormation I'm having issues with the ReporterFunction since it's not ...
0
votes
2
answers
21
views
How can I get rid of the "Warning: Invalid configuration encountered" in serverless.yml?
Currently I'm trying to breakdown my serverless service into multiple services to get over the cloudFormation resource limit.
My current project structure is as follows:
aws-backend
functions
...
2
votes
1
answer
40
views
Django application running on top of Serverless + Lambda + API Gateway HTTP API is rewriting links to be prefixed with default
My Django Application (Largely REST Framework based) is currently producing URLs on the admin page that don't resolve. The expected result is that the Django Admin's login prompt submits the form with ...
0
votes
0
answers
20
views
How to actually use Responses with Serverless websocket?
The documentation https://www.serverless.com/framework/docs/providers/aws/events/websocket#respond-to-a-ws-client-message is not clear at all. The example given is
events:
- websocket:
...
0
votes
1
answer
15
views
Are Bref websocket handlers kept alive?
sls documentation says
Websockets make it possible to add support for a bi-directional communication channel between clients and servers. Connection channels are kept alive and are re-used to ...
1
vote
0
answers
40
views
How to pass a list as an environment variable to an AWS Lambda function from a JSON config file?
I have a JSON file that is going to contain a number of different lists per client that I am deploying for. These lists are going to serve as container overrides for an ECS task that my Lambda ...
0
votes
0
answers
45
views
AWS Lambda failing with run error "ENOENT: no such file or directory, open '/var/task/bridge.js'"
I have a Node.js 12.x AWS Lambda that is configured in Serverless Framework to fire when a JSON file is dropped into a specific S3 bucket.
Abcg:
handler: Abcg.handle
reservedConcurrency: 1
...
1
vote
0
answers
30
views
Cron job set up in local timezone gets incorrectly converted to UTC (using Serverless Local Schedule)
I have a schedule for job set up as follows using serverless-local-schedule:
- schedule:
rate: cron(1 0 20 * ? *)
timezone: Asia/Tokyo
It is supposed to run at 00:01 on the 20th day of each ...
0
votes
1
answer
20
views
Serverless Framework not getting localfiles
I got a problem regarding Serverless Framework, i want to create a glue job. But when creating resource i can only choose a s3 path. Why cant i choose a local path in my repository? is this a ...
0
votes
0
answers
14
views
Serverless framework with GCP consistently throwing EHOSTUNREACH when trying to access google oath
A few days ago, everytime I tried to interact with GCP using serverless (deploy, log even remove), I get the following error:
Environment: linux, node 18.12.1, framework 3.25.1 (local) 3.25.1v (global)...
0
votes
1
answer
64
views
Load environment variables when running locally via serverless offline
I want to load env variables from .env file, when running locally,
So here's my serverless.yaml file,
functions:
health:
handler: src/api/health.check
name: ${self:provider.stackName}-health
...
0
votes
0
answers
134
views
Serverless React - getting HTML from S3 Bucket - how to call async from sync
Based on this question I posted earlier today, I have added some logging and narrow in that the problem is with the s3.GetObject.
NOTE: I've seen about 6 different ways to do the S3 get object, and ...
1
vote
1
answer
39
views
dangerouslySetInnerHTML getting data from S3 bucket object in Serverless React
My goal is to read an HTML document from an S3 Bucket, and display it in the browser using Serverless React. The document contains HTML that should be rendered in the browser. Previous research seems ...
0
votes
0
answers
17
views
How to override default AWS EventBridge event name when deploying with Serverless Framework?
I'm deploying a Lambda function via Serverless Framework, and the function is going to have multiple EventBridge events (schedules) tied to it. For this reason, I would like to create a custom name ...
0
votes
1
answer
28
views
AWS Lambda can't access mongoDB
I'm deploying simple express CRUD API with serverless framework. It works fine until it comes to accessing databese, it returns {"message":"Internal Server Error"}. But when ...
0
votes
0
answers
18
views
How to add a trigger automatically to a Lambda A function when Lambda B deploy
I have lambda function that forward cloudwatch logs to datadog. In this forwarder function I have added couple of lambdas cloudwatch logs as triggers. Problem is if we remove any lambda and deploy it ...
0
votes
1
answer
42
views
How to get secret from Google Secrets Manager using Serverless?
Using Serverless and AWS it's possible to load secrets from AWS SSM using:
environment:
KEY: ${ssm(raw):/aws/reference/secretsmanager/prod/KEY}
Is there something equivalent available for Google ...
0
votes
0
answers
22
views
Serverless Version Upgrade Name resolution errors
I was trying to update the serverless version for my project from 2.72 to 3.x. Hence I started working on the resolution of the deprecations warnings. All are gone except of the following.
Cannot ...
-2
votes
0
answers
29
views
Driver package not found while using typeorm-db2 with nestjs and serverless
I'm working on an application that's has been made with nestjs and typeorm-db2 to communicate with the databases. When the app runs in an enviroment that's not the aws lambda, everything works fine, ...
1
vote
1
answer
35
views
Using Singleton Design Pattern for AWS Library
I am creating an AWS Client Library for myself, to use in AWS Lambda.
Storing them in Lambda Layers
AWS: -DynamoDBAdapter.js -APIGatewayWebsocketAdapter.js -S3Adapter.js -SecretManagerAdapter.js
...
-1
votes
0
answers
40
views
How to correctly send input to a serverless GPU service like banana.dev to use stable diffusion?
I have successfully created a github repo to be deployed on serverless GPU services.
it works fine but can anyone tell me that how to I use the features like Upscaler (ESRGAN etc) and img2img using ...
1
vote
4
answers
202
views
Sending blob image from Angular to ExpressJS
I'm trying to send a blob image, but I'm getting Error: Unexpected end of form using multer with Serverless Framework.
From console.log
My understanding is I have to append it to FormData before ...
0
votes
0
answers
49
views
How to run migrations on a private RDS instance using Prisma?
I have a Node project which is using terraform for provisioning and resource creation while serverless is used to deploy the functions. I'm using Prisma as the ORM with graphql. My problem is that I ...
0
votes
1
answer
22
views
How to avoid dev path when deploying to AWS with serverless locally?
When I deploy my api to AWS with serverless ($ serverless deploy), then there is always the stage added to the api URLs, for example:
foo.execute-api.eu-central-1.amazonaws.com/dev/v1/myfunc
Same ...
0
votes
1
answer
15
views
How to disable apikey for local serverless development?
I created a simple api (using serverless) which is protected by an apikey (when deployed via $ serverless deploy). However, for local development ($ serverless offline) I do not want to use an api key....
0
votes
1
answer
55
views
How to stop 'CORS missing allow origin error' when deploying Express application using Serverless Component?
When my React frontend calls my Typescript Express REST API (hosted on API Gateway using Serverless Components), I get the following error:
Access to XMLHttpRequest at 'https://randomId.execute-api.ap-...
-1
votes
0
answers
32
views
Error : When I run the serverless deploy its pop up this kind of error
Deploying to stage dev
Error:
Error: npm.cmd ls -prod -json -depth=1 failed with code 1
at ChildProcess.<anonymous> (C:\Users\kavindu.chathuranga\node_modules\serverless-webpack\lib\utils....
-1
votes
0
answers
16
views
Created lambda websocket functions, but has not trigged in aws
I'm new with serverless framework, i created lambda functions trigged by websocket events, but after deploy when i look to dashboard them dont have trigger and cannot receive the events.
It looks like ...
0
votes
1
answer
33
views
How can i use AWS SAM Template File separation like Serverless Framework use?
I have used Serverless Framework very well.
At the time using it i remember using one main file called serverless.yml and after that for each service i use function.yml and refering this file to the ...
0
votes
1
answer
35
views
AWS Cognito user pool does not send verification email when configured with Serverless framework and user signs up with AWS Amplify
I configured Cognito user pool and client with Serverless framework as follows:
CognitoUserPool:
Type: "AWS::Cognito::UserPool"
Properties:
MfaConfiguration: OFF
UserPoolName: ...
0
votes
1
answer
29
views
How to optionally apply environment configuration?
I want to optionally apply a VPC configuration based on whether an environment variable is set.
Something like this:
custom:
vpc:
securityGroupIds:
- ...
subnetIds:
- ...
...
0
votes
1
answer
52
views
Package or zip archive creation with serverless but without lambda
It is needed to create zip file before deployment and there is no lambda functions. Just some folder to zip and upload. Without functions: section serverless skip packaging. Any ideas? Any work ...
1
vote
1
answer
47
views
Create S3 Bucket and upload code in Serverless Framework
serverless.yml
provider:
name: aws
runtime: nodejs16.x
deploymentBucket:
name: myS3Bucket
resources:
Resources:
MyLambdaBucket:
Type: AWS::S3::Bucket
Properties:
...
0
votes
1
answer
53
views
serverless route works twice and then crashes - address already in use :::3000
I can't figure out why a serverless route works twice then I get
address already in use :::3000
and it crashes. It returns the response body back into postman the 2nd time and then crashes.
let me ...
0
votes
1
answer
112
views
Is there an alternative to the serverless-cloudformation-changesets? for serverless version 3
Problem
Im just trying to deploy serveless-cloudformation-changesets on AWS codebuild
But the build failed because of versioning error
Serverless Error ---------------------------------------
...
0
votes
1
answer
31
views
how to deploy a stack in multiple regions using the Serverless Framework?
How to deploy a stack in multiple regions using the Serverless Framework?
For example, I need to deploy a stack of API Gateway, DynamoDB, Elasticsearch and lambda resources in 6 regions
I found a ...
0
votes
0
answers
21
views
Error: Unsupported apiGateway.restApiId object
In our project we are using serverless for AWS. After added serverless-domain-manager plugin we are experiencing strange issue - Error: Unsupported apiGateway.restApiId object
custom:
customDomain:
...
0
votes
0
answers
25
views
serverless cli package can't resolve nx monorepo imports
I have many apps consuming many libraries in a monorepo, and everything works except the $ sls package command.
It breaks because it can't resolve the imports I define in tsconfig's.
This is my ...
1
vote
1
answer
56
views
How do you create a new version of an API using serverless framework?
I have a simple API developed using serverless framework that is deployed in production. The serverless.yaml is similar to this one:
service: example
provider:
name: aws
plugins:
- ...
0
votes
0
answers
45
views
create cloud function with trigger cloud storage
I'm trying to deploy a cloud function from the serverless framework, and setting as a trigger that is activated when files are created in a bucket, but it doesn't work and I can't find more ...
0
votes
1
answer
61
views
Replace string or normalize variable in serverless framework
serverless recommends service name in string-string format, but this contains dash character, which is not allowed in some resource names, e.g. iot rule name.
What could be solution to replace dash ...
1
vote
1
answer
44
views
the default template for go lang "aws-go" in the serverless framwork isn't working
hello everyone :) noob here, I am having trouble invoking pre-built aws-go template function that i have deployed using the serverless framework.
not sure if it's relevant but here some details about ...
0
votes
0
answers
31
views
Why does the headers option not work for setting Access-Control-Allow-Headers using Middy and Serverless?
I am getting the following error when trying to do a POST against my Serverless API that uses AWS API Gateway:
Access to fetch at 'https://example.com/shop' from origin 'https://otherexample.com' has ...