All Questions
Tagged with node.js amazon-web-services
8,469
questions
-1
votes
0
answers
23
views
Img uploaded won't render in ec2 instance
When I build using pnpm locally, an image shows up. In my ec2 when I do pnpm build start the image file has a 404 error. The code is the same the only difference is the environment in which it is ...
0
votes
2
answers
30
views
Login to AWS HSM as crypto-user, Error: Pkcs11Error: CKR_PIN_INCORRECT while perfomrin: pkcs11.C_Login(session, pkcs11js.CKU_USER, "1234"); in Nodejs
I am using AWS HSM. Followed the AWS HSM Setup guide foor FIPS Mode HSM. Installed CloudHSM Command Line Interface (CLI), Created a user called crypto-user by By logging in to HHSM using CloudHSM CLI. ...
-1
votes
1
answer
31
views
"TypeError: command.resolveMiddleware is not a function" with DynamoDBDocumentClient and UpdateCommand
I'm running the following code in a lambda, and I'm receiving the following error
{
"errorType": "TypeError",
"errorMessage": "command.resolveMiddleware is ...
0
votes
0
answers
31
views
Upload .tar.gz to s3 bucket using presigned url with node.js
I am facing an issue uploading a .tar.gz file to an s3 bucket using a presinged URL.
If I upload any other file then it works without any error but with .tar.gz it does not give any error and does not ...
0
votes
0
answers
31
views
AWS Device Farm NodeJS Appium unable to run due to APK error
I'm trying to set up AWS device farm and Appium to run a simple set of tests for a react native project.
Everything works fine locally but I'm having real problems getting it set up on AWS.
There ...
-2
votes
0
answers
25
views
AWS rekognition, video analysis: retrieve the response with node js [closed]
How to query the status and response of an analysis performed on a video by AWS Rekognition with Node JS?
The api works asynchronously, and I sent the job request with the following code, but I can't ...
0
votes
0
answers
15
views
Llamaindex TS SimpleDirectoryReader works locally but not on AWS EC2 server
I have a node express server setup for a llamaindex RAG system. Locally I'm able to generate a VectorIndexStore from a directory I've called ./data and run queries successfully. However, I've just ...
0
votes
1
answer
49
views
TypeError: Converting circular structure to JSON - while reading json file data from s3 in Node 18
I am getting TypeError: Converting circular structure to JSON error while reading json file content from s3 using node 18. I am using S3Client, GetObjectCommand of @aws-sdk/client-s3.
TypeError: ...
-1
votes
1
answer
39
views
How to restrict access to AWS Express API via specific IP and have HTTPS certificate
I have an API on AWS that is restricted to only be accessed via my other AWS website domain (which sits on a different EC2 instance).
Currently this is over HTTP. When trying to create a certificate ...
0
votes
1
answer
69
views
Amplify deployment error with no error after build
I've been going crazy for several days now. I have a project with vue3 that is deployed to amplify from bitbucket. There is no pipeline or anything, just the amplify.yml which I don't even have in the ...
0
votes
0
answers
32
views
Error: EACCES: permission denied when configuring https server on AWS Lightsail
Error: EACCES: permission denied, open '/opt/bitnami/apache/conf/bitnami/certs/server.key'
at Object.openSync (node:fs:596:3)
at Object.readFileSync (node:fs:464:35)
at file:///home/...
0
votes
0
answers
29
views
Ethers JS transaction not resolving on AWS EC2 instance
I am using ethers.js which runs on Elastic Beanstalk (EC2 t3.medium for instance). The code works perfectly on my local machine and also on AWS EC2.
However, there is always a problem after a few ...
0
votes
0
answers
19
views
Nodejs 16 error for code written in Node.js 12 runtime
I followed this AWS blog to create Lambda@edge function so that I Cloufront can access S3 bucket encrypted with KMS key.
https://aws.amazon.com/blogs/networking-and-content-delivery/serving-sse-kms-...
0
votes
0
answers
39
views
aws-sdk-client-mock not mocking DynamoDB for Javascript AWS SDK v3
I was following aws-sdk-client-mock to write a unit test case for GetCommand in javascript aws-sdk-v3. However, while following the documentation, I observed it's not mocking but its actually going to ...
0
votes
0
answers
30
views
DataDog in Lambda Error handler is undefined
I am currently trying to integrate Datadog into my AWS Lambdas.
In my CI pipeline I call the following:
- aws lambda update-function-configuration --function-name $LAMBDA_NAME --environment Variables=...
0
votes
0
answers
27
views
AWS StepFunction startExecution adding :UUID to name
I'm trying to set the name of an Express StepFunction execution in a lambda so that the StepFunction prevents any duplicate processing.
This code works as expected, except somehow a colon followed by ...
0
votes
0
answers
29
views
Livestream not reaching AWS endpoint
I'm trying to stream my live video into Amazon IVS and I don't see it on the live channels.
Is it possible I have a mistake in my FFMPEG configuration?
I'm expecting to see this in my playback url or ...
1
vote
0
answers
68
views
How to retrieve image from s3 bucket and present it to the UI?
I am using a "API Gateway proxy integration" or "Lambda proxy integration". By having a handler file as:
import serverless from "serverless-http";
import app from "./...
1
vote
3
answers
264
views
How to use AWS SSO with AWS-SDK 2.x
In my Nodejs app, I have been using aws-sdk (2.x) to get S3 objects. Below code works pretty fine.
const AWS = require("aws-sdk");
S3 = new AWS.S3({
accessKeyId: 'actual_accessKeyId',...
0
votes
1
answer
21
views
Cannot delete files from uploads folder after uploading to S3 from multer diskstorage
When creating or updating an item, I have to upload multiple images so I use multer diskstorage to store the items in an uploads folder and then upload to S3. I want to delete those files from ...
0
votes
0
answers
19
views
Yarn workspaces build\deploy issue with AWS CodeBuild to ElasticBeanstalk
I have a monorepo with frontend, backend and my-common yarn workspaces.
+-- node_modules
+-- package.json
+-- tsconfig.json
+-- buildspec.yml
+-- my-common
| +-- package.json
| +-- ...
1
vote
1
answer
28
views
AWS cloutfront routing issue when including params
I have a frontend APP and a backend app.
I access my frontend via mydomain.com and this all works.
For my backend I access my endpoint(lambdas) via mydomain.com/API.
This works for the most part for ...
0
votes
0
answers
28
views
AWS CodePipeline getting stuck on Deploy stage with my NestJS backend
I'm trying to deploy my NestJS backend using AWS CodePipeline, but I'm encountering some issues during the deployment stage. The build stage passes successfully, but the deployment fails with the ...
0
votes
0
answers
21
views
How to send emails using multiple domains with Amazon SES
I'm build a mini sendgrid alternative. I want to use Amazon SES to add multiple domains to my account so that my clients can send their emails from their domains. What are the steps (via API) to be ...
-1
votes
0
answers
37
views
I tried to install amplify and it's not working
npm install aws-amplify @aws-amplify/adapter-nextjs
Current behavior:
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want ...
-2
votes
1
answer
35
views
How to build a native android app using AWS SAM and typescript and kotlin?
I am building my first android app for a uni project which was tasked to make a Native android app using AWS SAM and Node.js/Typscript. I am a bit lost on how to set my repository up and to test/...
3
votes
2
answers
65
views
Wkhtmltopdf Not Working on Amazon Linux 2023
I installed wkhtmltox-0.12.6-1.amazonlinux2.x86_64.rpm on my EC2 instance(t3.xlarge).
While using wkhtmltopdf in Node.js, I'm getting the following error:
Error generating PDF: Error: wkhtmltopdf: ...
0
votes
0
answers
21
views
How to copy node_js directory from 1 server(Linux) to another server(Linux) in jenkins scripted pipeline?
when I copy whole directory from one server to another server I use this below script
stage('deploy to another server'){
steps{
sshagent(['SSHAgent']) {
sh ...
1
vote
0
answers
59
views
ytdl-core is returning a stream with nothing in it when I try to download a video
I am trying to use ytdl-core in an AWS lambda function to upload an .mp4 of a youtube video to an S3 bucket. However, I cannot get ytdl to create a stream with any data in it, so nothing is getting ...
1
vote
0
answers
26
views
How do I troubleshoot an Amazon Lambda Skill Smart Home Alexa voice request?
So a colleague made a Lambda in Node.js 12.x which allows you to read and write data with vocal requests to some devices that operate in MQTT and which connects to AWS services
He gave me the code, ...
1
vote
0
answers
23
views
Unable to view the image which are uploaded from node js
After uploading the images to the S3 bucket, I am able to upload them successfully. However, when I try to view the image using the S3 URL, something else appears instead of the image.
i want to ...
0
votes
0
answers
25
views
__dirname alternative for typescript(ESNext)
I want to retrieve an ejs file data and then sending the ejs file content as data in email as AWS SES. For this to get the path of the file I'm using __dirname. The code works on the localhost but ...
1
vote
1
answer
25
views
How to deploy a backend express application that normally runs locally on AWS
So I have a repository of both frontend and backend for a portfolio. It looks like this:
portfolio_fullstack
backend
mike_prompt.txt
env.
node_modules
server.js
package
package-lock
frontend
react-...
0
votes
0
answers
47
views
How to deploy node js express app on Vercel?
I have built an app using Node js, Express and typescript. npm run build builds the app and npm start serves the app. It works perfectly on local but I am having trouble when deploying it to the ...
-2
votes
1
answer
46
views
This simple AWS function to delete a directory is not working
I am writing this simple code to delete a directory that is asked to be deleted
here is the function regarding deleting it
async function deleteProject (data) {
const params = {
Bucket: ...
0
votes
0
answers
53
views
"Region is missing" error for Amazon S3 PutObjectCommand even though region is specified
I'm working on project where I need to upload an image file (e.g., .png) to an Amazon S3 bucket. I've been through many examples, and as far as I can tell, I've been following everything the same. I ...
-2
votes
2
answers
70
views
Lambda getting access denied when trying to copy the data in same bucket
Lambda getting access denied when trying to copy the data in same bucket.
Here is my Bucket Policy:
{
"Version": "2012-10-17",
"Statement": [
{
...
0
votes
0
answers
16
views
How to create an API authorization with the latest IOS SST and AWS
I want to create an API with the new SST v3 aka ION SST.
Docs don't say much about auth-related things and I feel confused.
I have a separate Next.js app and now I want to create a backend ...
0
votes
0
answers
14
views
Getting error while hosting MERN Project on AWS: .env file error
Upload the file on the aws ec2 instance using GitHub so after that I use pm2 to start the server file, but it shows an error that the server is running on an Undefined port and a mongodb error,
but ...
0
votes
0
answers
10
views
How to Efficiently Upload Files in Parallel in Next.js/Node.js Using Async and S3?
I'm working on a Next.js project where I need to upload multiple files to AWS S3 in parallel. I'm using the @aws-sdk/client-s3 for uploading the files. Despite trying different approaches, my uploads ...
0
votes
2
answers
57
views
AWS lambda serverless framework on local with other aws services
I am pretty new to AWS and trying to creating AWS lambda application using node js and serverless framework. But I stumbled upon a point where I have to run the things locally to test the things like ...
0
votes
0
answers
34
views
How to connect to AWS RDS Postgres via Node.js running on local machine
I have a Node.js app running on an ES2 instance which I can connect successfully to an AWS RDS Postgres database and run a SQL statement to return the results. Now I want to run that same app but on ...
0
votes
0
answers
24
views
Failed to send SQS message for ECS container without any error description
I have code running inside ECS container, with the following code to send SQS message:
import { SQSClient, SendMessageCommand } from "@aws-sdk/client-sqs";
import { MAX_ATTEMPTS } from &...
1
vote
0
answers
41
views
Running cron job only on 1 task instance in a multi instance AWS ECS Fargate container
I would like to run a cron job which runs everyday and do some operation. Now my nodejs server has 4 instances/tasks running simultaneously to handle the load. How can i ensure that my cron job is ...
0
votes
1
answer
34
views
Multer s3 upload: File in s3 not playing and file increase
I am uploading a mp4 file to s3 via node.js s3.
The code works and I see the file in the s3. However The original file is 860kb but when uploading it it turns to 1.4MB and when I download it from S3 ...
-3
votes
1
answer
49
views
Serverless S3 Sync is invalid
I was getting started with serverless everything was fine until i used S3Sync to upload data to my bucket, this is my yml file i also installed serverless-s3-sync plugin using yarn before using sls ...
1
vote
1
answer
96
views
"connect ECONNREFUSED" with Nginx on AWS EC2
I'm deploying my node server to AWS and came across a problem. Everytime I try to connect to my instance over HTTP I get this error
Error: connect ECONNREFUSED [INSTANCE PUBLIC IP]:80
I've deployed ...
0
votes
1
answer
43
views
Unable to use trained custom model in AWS Bedrock
I have trained a custom model in AWS Bedrock, named amazon.titan-image-generator-v1. The generated ARN for this model is:
arn:aws:bedrock:us-east-1:901111142777:custom-model/amazon.titan-image-...
0
votes
0
answers
22
views
AWS Cognito: How to approve Pre-Sign-Up event when email already existed on Cognito, but not existed in DB
I have a problem with Cognito Service.
I have an application called Application A using the same database with another application called Application B.
Application A uses AWS Cognito to Authenticate, ...
0
votes
0
answers
15
views
AWS beanstalk nodejs application failing with 5xx error
I have a nodejs application running on AWS Elastic Beanstalk. I am using Nginx server. I have used load balancer as well. From a last few hours, my app goes from :
'Environment health has transitioned ...