All Questions
Tagged with node.js amazon-web-services
8,470 questions
0
votes
1
answer
48
views
Await causing aws Lambda to timeout
I have some async code in my AWS Lambda function and no matter what async code is running it never resolves. It just causes the Lambda to timeout.
export const handler: Handler = async (event) => {
...
0
votes
0
answers
61
views
AWS Serverless Elasticache Valkey
Today I created Serverless Elasticache Valkey and tried to connect using code which I got from Connect to your cache section.
const {Redis} = require("ioredis");
const client = new Redis....
1
vote
0
answers
47
views
Unable to connect AWS lambda to Mongodb through VPC [closed]
AWS Lambda MongoDB Atlas Connection Timeout Issue (VPC Peering)
I have an AWS Lambda function that connects to a MongoDB Atlas cluster. To enable this connection, I have:
Configured a VPC and peered ...
0
votes
1
answer
96
views
invalid checksum when using multipart upload with FULL_OBJECT checksum in NodeJS
Problem
I am trying to upload a file into AWS (since I am testing I am using a dockerized minio).
I am calculating the checksum of the file like this:
const fileContent = await readFile(fileName, {
...
0
votes
0
answers
50
views
How to calculate the uptime of an AWS EC2 instance from the time it entered the "running" state?
Can somebody guide me in calculating the uptime of an AWS EC2 instance from the time it entered the "running" state, excluding the time spent in "pending" or "starting" ...
0
votes
0
answers
22
views
Hoe to add proxy to @aws-crypto/client-node
We are running our containers in an environment that requires a proxy to communicate with AWS services. I was able to set the proxy using AWS.config.update({ httpOptions: { agent } }), but it does not ...
0
votes
0
answers
29
views
intermittent delays in receiving the image upload streams
I'm running a Node.js application using KoaJS on AWS Elastic Beanstalk that handles image uploads by streaming the incoming data directly to the Node.js process. Nginx is used as a reverse proxy. In ...
0
votes
1
answer
151
views
Not able to get ECS fargate metrics on Datadog
I'm trying to set up Datadog for my ECS Fargate services:
I created a separate ECS Fargate service for the Datadog agent.
I provided the necessary environment variables for Datadog.
env details
The ...
0
votes
1
answer
118
views
AWS Lambda responding with internal server error and not loging to Cloudwatch
I have the following Lambda function:
import { mongoClient } from "../../db/mongo/index.js";
import z, { ZodError } from "zod";
import Project from "../../db/mongo/models/...
0
votes
0
answers
37
views
Cookies Not Sent in Cross-Origin Setup with AWS ALB and Dockerized Backend
I am encountering an issue where cookies (including an authentication token) are not being sent from the browser to my backend in a cross-origin setup. Here's a detailed breakdown of my setup and the ...
2
votes
1
answer
36
views
EC2 Userdata script : nvm cannot find .bashrc
I have these four lines at the start of my ec2 user data script to install nvm and Node.js. This never seems to succeed.
touch ~/.bashrc
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/...
0
votes
1
answer
76
views
Node Not Registering HTTPS from Nginx Reverse Proxy
I've been struggling to send a secure session cookie with express because node isn't recognizing that the request is https. I have an nginx reverse proxy in a docker-compose app. I deploy to Elastic ...
0
votes
1
answer
39
views
How to Handle EventBridge Rule Target (Lambda) Failure After All Retries Are Exhausted?
I have an schedule cron in aws that successfully delivers events to an AWS Lambda function. However, sometimes the Lambda function fails to process the events correctly event all retries are exhausted....
0
votes
2
answers
58
views
Twilio is Not a Function
I am using Twilio Messaging with AWS Lambda running on nodejs22.x x64 runtime to send SMS.
All the importing looks fine (using lambda layer to import Twilio v5.4.1). But on execution, the lambda ...
0
votes
1
answer
280
views
AWS Lambda Nodejs 20.x fails with init Status: error Error Type: Runtime.Unknown
I have upgraded a previously working lambda function from node v18 to node v20.
After going through the various issues that nodejs 20 introduced (a bunch of seemingly breaking changes), I finally got ...
-1
votes
1
answer
38
views
Issue with DELETE Request in Node.js/DynamoDB API - ValidationException
I'm working on a backend project using AWS DynamoDB and Node.js, where I've implemented a REST API. While the POST and GET requests are working perfectly, the DELETE request fails with a ...
0
votes
1
answer
49
views
Having trouble passing environmental variables into a batch job triggered by a step function
Basically I'm building a integration that runs a ECR image on ECS via a AWS batch job definition. This piece of the code works atm, and we're now moving to running the job definitions via a AWS step ...
0
votes
1
answer
305
views
How to Deploy an Angular 19 SSR App on AWS Amplify?
I have built an Angular SSR app using Angular 19, and I'm trying to deploy it on AWS Amplify. Below is my setup and the challenges I'm facing:
Package.json
{
"name": "ssr-app",
...
0
votes
0
answers
22
views
Robotjs issues on windows VM on AWS
It's an unusual problem, I have installed robot-js on an ec2 instance which runs using a Windows server. The code is pretty simple, it navigates and clicks on two instances.
robot.moveMouse(385, 150);
...
0
votes
1
answer
65
views
Easy to answer "More expressions than columns" when using CURRENT_TIMESTAMP
My typescript code is trying to insert a record into an RDS cluster and it's giving me |
ERROR Error saving mytable record: error:
error: INSERT has more expressions than target columns
I believe I ...
0
votes
0
answers
29
views
I can't display an image uploaded to an amazon s3 bucket in a react page
I have an app where a user registers a post with title, a text and an image. The image is uploaded to a cloud storage service (i'm using cloudinary), and the generated url is used to display the image ...
0
votes
1
answer
43
views
npm install hangs on elasticbeanstak ec2 instance
npm install hangs with no error
having some issue with npm on AWS/EC2 instance provisioned through Elastic Beanstalk
also, the same installation runs fine on non-aws ubuntu and macos
if I try to ...
0
votes
0
answers
21
views
Failed to execute greengrass cli command from Nodejs app (edge ubuntu machine)
I have Greengrass edge machine (which is Ubuntu machine basically).
I open its terminal and run sudo /greengrass/v2/bin/greengrass-cli component list
and it return me desire result.
I have Nodejs app ...
0
votes
0
answers
11
views
Deploy Nodejs Application over AWS Elastic Beanstalk but can not run backend api although deployement is successfully
enter image description here
app.j
const express = require("express");
const dotenv = require("dotenv");
const http = require("http");
const cors = require("cors&...
0
votes
0
answers
19
views
nodejs canvas works fine in mac os but in aws ec2 ubuntu renders incorrectly
I have set up Docker and implemented Node.js Canvas to render an image and font. It generates fine when running locally using Docker, but on AWS EC2, when running in Docker, the canvas image is being ...
-1
votes
1
answer
151
views
AWS - Lambda takes 10 seconds to start with no cold start
I have a Node Lambda that I want to run each minute at the 45th second, so I built a script to invoke it once a minute.
const command = new InvokeCommand({
FunctionName: "BalancerNoVPC",
...
0
votes
0
answers
128
views
Connecting Next.js Frontend to Node.js Backend in AWS ECS Fargate - 404 Errors
I have developed a web app with a Next.js frontend and a Node.js backend. The app uses a PostgreSQL database hosted on AWS RDS. Both the Next.js and Node.js components are Dockerized, and everything ...
0
votes
0
answers
29
views
Multiple Set-Cookie headers are combined; browser only picks the first cookie
I’m developing a GraphQL API using Apollo Server running on AWS Lambda with API Gateway (using the @as-integrations/aws-lambda package).
In my authentication flow, I need to set three cookies (idToken,...
1
vote
1
answer
112
views
How to send an email using AWS SES from inside VPC private subnet?
I have a node server running in AWS ECS Fargate inside an isolated subnet.
I have set up the task policy to allow sending emails
resource "aws_iam_role_policy" "ecs_task_ses_policy"...
0
votes
1
answer
20
views
Deployed Backend on AWS: res.cookie Tokens Not Working with Frontend
I am facing an issue where my backend, deployed on AWS, cannot properly handle cookies for authentication. Here’s the scenario:
Setup:
I used cookie-parser to generate and set a JWT token in a cookie ...
1
vote
0
answers
32
views
SQS Message from Lambda function never arrives at the queue
I have a project using Serverless Framework that has two functions - one an express API, which for some endpoints will communicate with the second function (reportGenerator), which is triggered by the ...
0
votes
1
answer
42
views
How to debug an aws lambda function that is been invoked locally? Serverlessframework, NodeJS runtime, Windows10
I’m trying to setup a debugger when I run a function locally. Currently I execute function this way:
serverless invoke local --function myFunctionName --env dev --path ./events/myFunctionName.json
I’...
0
votes
0
answers
72
views
PackagingAssertion failed: new_time >= loop->time, file c:\ws\deps\uv\src\win\core.c, line 327 when running serverless app on Windows 10 VirtualBox VM
I'm trying to set up an application using AWS Serverless on a VirtualBox VM. Everything was going swimmingly until I tried to run serverless deploy on my app, when I was greeted with this error:
...
0
votes
1
answer
73
views
Screenshot using Puppeteer and AWS lambda
I want to take screenshot of website dynamically using AWS lambda.
When I tried to use pupperter-core it is showing below error
Error. Error: Failed to launch the browser process!
/tmp/chromium: error ...
0
votes
0
answers
45
views
Where can i see in amplify app the console log
I created a app with node.js and deploy it on aws-amplify. I added some logs, that i want to see on the amplify-ui. Where is it possible to see the logs?
My code:
import express from 'express';
import ...
0
votes
1
answer
212
views
Local environment for lambda in docker
My goal is to create a local environment for the project deployed in AWS lambda for the TS project. In my conception, it will be really close to the production of Lambda. I used this article: https://...
0
votes
0
answers
40
views
why amplify didn't send ses email
I created a script in node.js to send email with aws-ses.
My script:
import express from 'express';
const AWS = require("aws-sdk");
AWS.config.update({ region: "us-east-1" });
...
0
votes
0
answers
43
views
Websocket vs SNS in EKS Containers
This is more of an architectural question so apologies if this is not a right fit.
Scenario:
The application is split in two separate containerized application in an on-prem data center, lets say UI ...
0
votes
2
answers
140
views
Timeout response when trying to use AWS S3 SDK with lambda (Node.js)
My Lambda runs fine with all services except S3. Any action I try to perform, the execution hangs and I get a timeout. For testing purposes, I'm using a default vpc configuration.
I have the S3 full ...
-1
votes
1
answer
51
views
How can use ffmpeg in AWS Lambda to clip hls trasnsimision to .mp4
The ffmpeg input is through the public url of the bucket, I want to save the output in a tmp.mp4 file and I want to upload this file to the bucket. Locally the ffmpeg command works perfectly, lasting ...
0
votes
0
answers
87
views
AWS Lambda supports nodejs20.x but @serverless-stack package is still on node 16
I have decided to update the modules of our Next.js(ts) aws appsync, aws lambda, nodejs, aws conginito, mondodb, SST app. To nodejs20.x
I found out that AWS Lambda supports nodejs20.x but @serverless-...
3
votes
0
answers
87
views
How to ensure file integrity when using pre-signed URLs for S3 uploads in Node.js?
I'm working on an application that allows users to upload files directly to AWS S3 using pre-signed URLs. I'm using the AWS SDK for JavaScript and the getSignedUrl() function to generate the pre-...
0
votes
1
answer
77
views
Unable to play video content in NextJS with CloudFront signed cookies
Summary
Currently I'm trying to build a website that displays private videos based on user privileges. I'm hosting the frontend with NextJS (http://localhost:3000) and the backend with NestJS (http://...
0
votes
3
answers
124
views
Connect redis nodejs with Elasticache aws connect fail
I had a problem connecting to aws elasticache, I found some solutions but couldn't solve the problem. Hope anyone can help.
const redis = createClient({
socket: {
host: process.env.REDIS_HOST,
...
2
votes
0
answers
253
views
BadRequestException: Your request timed out because no new audio was received for 15 seconds
I am getting this error in AWS transcribe. From the logs I understood my connection is valid & audio data is also valid. But in the server level getting this error.
my component code:
import { ...
0
votes
0
answers
115
views
browser.launchChromium throwing error after upgrading to Node20 for playwright-aws-lambda - error while loading shared libraries: libnspr4.so:
After upgrading lambda to Node 20 with playwright-aws-lambda browser.launchChromium throws below error:
/tmp/chromium: error while loading shared libraries: libnspr4.so: cannot open shared object file:...
1
vote
0
answers
168
views
AWS Architecture for deploying a fullstack app | React | Node.Js | MongoDB
I'm working on drawing an architecture diagram for a full-stack app on AWS. I'm using a three-tier architecture:
the first tier will contain my frontend app on an EC2 instance,
the second tier will ...
0
votes
0
answers
23
views
AWS Cognito: Edit attribute verification
I'm able to send the email once the user updates its email on my app. This is the code that I'm using:
import { CustomMessageTriggerHandler } from 'aws-lambda';
const verifyEmailTemplate = (name: ...
0
votes
1
answer
46
views
Cannot convert IAM secret access key to SMTP credentials
I'm trying to convert secret access key to SMTP credentials. I followed instructions at https://docs.aws.amazon.com/ses/latest/dg/smtp-credentials.html and grabbed implementation from https://gist....
0
votes
0
answers
227
views
Gremlin Error: Received network error or non-101 status code after upgrading to Node.js 23
Problem: I am using the Gremlin package in my Node.js application to connect to Amazon Neptune. Everything works fine with Node.js version 20.18, but when I upgrade to Node.js 23 (the latest version), ...