Questions tagged [amazon-web-services]

When inquiring about the functionalities of Amazon Web Services (AWS), please indicate the specific services you are utilizing. It is important to include information about your system's architecture and configuration, but refrain from mentioning any confidential or proprietary details as this platform is public. Feel free to share relevant snippets of your code within language tags to assist with understanding the issue. Additionally, provide the version number of the SDK/CLI you are using and elaborate on any troubleshooting steps already undertaken. Remember, the AWS tag is not commonly used on its own; it should be combined with other appropriate tags to ensure a clearer definition of the question's topic.

How can I retrieve the initial IP address from the 'X-Forwarded-For' using a Log Insight Query?

Can someone help me with extracting the initial IP address from the given data: X-Forwarded-For":"1.1.1.1, 2.2.2.2? This is the query I am currently using: fields @timestamp, @message | filter @message like /Endpoint request body after transform ...

Create a flexible framework for extracting data from online sources

Currently, I am facing a situation where my server receives requests and I need a way to initiate the scraping process on a separate resource that is dynamically created. I would prefer not to conduct the scraping on my primary instance to prevent overload ...

Storing extensive volumes of searchable JSON data

I'm in search of a database solution that can meet the following requirements: Store flat, random JSON structures separated by table names (e.g. random_json_table_1, random_json_table_2). Handle a high volume of insert operations (over 10,000 per se ...

What is the process for obtaining an AWS IoT device shadow on an Android app? I have been utilizing a REST API generated by AWS, however, I am unsure of how to include headers with this API

I have successfully implemented a web server in Node.js where a continuous script is running and the shadow will be updated based on user input. This link provides information on adding canonical headers. Should I include any additional headers if I am mi ...

Having trouble deploying my Scully (Angular) application on AWS due to a 502 Bad Gateway error

I am currently facing an issue while trying to deploy my Angular app with Scully on AWS, as I keep receiving a 502 error. When I attempt to run just npm run start, the app loads and displays content, but the scully static SEO content is missing - instead, ...

Setting up secure https for a node.js server in a Docker container on an AWS EC2 instance involves several steps. Let

I have a dockerized node.js/express application up and running on an AWS EC2 instance container. Currently, the app is accessible via a domain name hosted by AWS Route 53 using the HTTP protocol. I am now looking to configure HTTPS for my node.js server th ...

Difficulty connecting to the API endpoint in AWS

I created a two-tier MEAN application with the authentication API backend hosted on AWS EC2 and the Angular front-end hosted on AWS S3 as a static site. During development, I ran the auth backend using node/express on http://localhost:5719/. For the front ...

The trio of Webdriver, PhantomJS, and Amazon Elastic MapReduce working together revolution

Can Webdriver and PhantomJS be installed on Amazon Elastic Mapreduce AMIs? If I use sudo apt-get to install dependencies in a bootstrap script, will it need to run each time a task is executed or will the installations persist? Is it possible to pre-buil ...

Error: Lambda function response malformed, please check API Gateway configuration

According to the official documentation, my JSON response should include a body, headers, and a status code, which it does. However, when testing in API Gateway, I am encountering issues with receiving a malformed response. Below is the output of my metho ...

I am currently working on deploying a backend server on elastic beanstalk, but I am encountering a 502 bad gateway error when trying to access the link

Having trouble deploying a backend server on Elastic Beanstalk as I keep getting a 502 bad gateway error when using the link. The server runs on node.js and express, and here is the log output: /var/log/nginx/access.log ----------------------------------- ...

Interpreting the boto CLI command

When running this Boto code, I am getting the incorrect output. I want to see the status of my EBS volume, not the mount point. Here is the structure of my EC2 Reservation: object {1} Reservations [1] Instances[1] BlockDeviceMappings[2] ...

Encountering difficulty while importing Cognito: "The variable 'AmazonCognitoIdentity' is not recognized."

As a beginner in Node JS, I have been learning from online examples and AWS documentation through their web-based lambda editor. However, when using the following code snippet, I encountered an error stating "AmazonCognitoIdentity is not defined". I would ...

The issue at hand is that the headers cannot be redefined once they have already been sent

Hello, I have tried numerous solutions but have not been able to resolve the "Can't set headers after they are sent" error in the following simple code. I have spent several days working on this and would greatly appreciate any input you may have. ap ...

Experiencing a lack of email delivery when using the "adminCreateUser" feature in AWS Cognito

My current challenge involves utilizing the `adminCreateUser` function to create a new User, but I am encountering an issue where the temporary password is not being sent to my email address. var RegisterUser = exports.RegisterUser = function (data) { v ...

During the npm start process, a fatal error occurred: MarkCompactCollector encountered an issue with promoting young objects, leading to a failed allocation due to the JavaScript heap

Currently, I am in the process of deploying my project to an AWS LightSail instance. Here is a breakdown of what I have done so far: I cloned the repository Ran npm install Executed npm start. However, I encountered an Allocation failed Error during thi ...

Training Scikit-learn machine learning models with the power of multiple CPUs

Looking to reduce the training time of my models, I decided to utilize a high-end EC2 instance. I experimented with the c5.18xlarge instance that has 2 CPUs and ran several models with the parameter n_jobs=-1. However, I noticed that only one CPU was being ...

There seems to be an issue with the DownloadDir functionality of the node-s3-client library, as

I am currently using a node s3 client library called 'node-s3-client' for syncing directories between S3 and my local server. As per the guidelines provided in the documentation, here is the code I have implemented: var s3 = require('s3'); v ...

The action of transferring files to S3 has resulted in a Permanent Redirect

I am encountering this error while uploading a file: Error uploading to S3: PermanentRedirect: The bucket you are trying to access must be addressed using the specified endpoint. Please direct all future requests to this endpoint. les/next/dist/server/lib ...

establish a connection to a MongoDB database running on a dedicated EC2 instance

I am currently managing two separate instances on AWS, one for a node application and the other for mongoDB. Despite trying to establish a connection to mongoDB from the node application instance, I keep encountering an error reading "504 Gateway timed out ...

The local machine is unable to access credentials from the /.aws/credentials directory

I recently generated a file named credentials.txt located at ~/.aws/credentials.txt. The contents of this file include: [bogdan-ses-user] aws_access_key_id = *** aws_secret_access_key = *** Establishing Node JS Server Locally const express = require(&apos ...

Encountering "npm WARN optional dep failed, proceeding with fsevents" error while attempting to install vue-cli on AWS/EC2 instance

I'm in the process of setting up vue-cli on AWS. Everything seems good with my permissions, and I have node v4.4.5 installed. Upon executing npm install --global vue-cli, the cursor flashes for approximately 30 seconds before displaying this error m ...

Designing the File and Folder Organization for Next.js Frontend and AWS Cloud Development Kit (CDK) Backend

When it comes to creating websites with serverless backends, I've been thinking about the best practices for folder structure. Currently, my setup includes a Next.js frontend and an AWS CDK backend. The way I've structured the folders has the backend embed ...

When trying to incorporate aws-sdk into Angular2, an error message stating "Module 'stream' cannot be found" may occur

I encountered the following issues: Error TS2304: Cannot find name 'Buffer', https://github.com/aws/aws-sdk-js/issues/994 and Using aws-sdk with angular2 Even though my typings and @types/node seem to be properly installed, I am still encountering erro ...

Using React JS, how to easily upload a CSV file to Amazon S3 with your AWS credentials

Seeking guidance on how to utilize AWS credentials to upload a CSV file using React S3 Uploader. The code snippet I've tried so far is as follows: import React, { PureComponent } from "react"; import ReactS3Uploader from "react-s3-uploader"; sav ...

Store images securely in a private S3 bucket for access with Next.js

I am looking to access images from a private bucket instead of a public one. The code snippet below shows how I currently try to access the images, but I believe there must be a way to do so without making the entire bucket public. In my API file, I use AC ...

Even after a user has been removed, the functionality of AWS Amplify Auth.signIn remains operational

I have successfully implemented authentication with AWS Cognito using Auth in AWS Amplify. I have managed to set up sign-in, sign-out, and sign-up functionalities. However, an issue arose when I realized that if I do not explicitly sign out, the user remai ...

Setting up AWS Elastic Beanstalk for a Laravel application with customized Nginx configuration

Recently AWS has made a change in the Elastic Beanstalk PHP environment by switching to Amazon Linux 2 and replacing Apache with Nginx. I have been facing challenges in configuring my Laravel project to function properly. Previously, I could simply add som ...

What is the best way to successfully deploy a React app using Next.js on AWS Amplify?

Recently, I've been delving into the world of AWS and attempting to deploy my simple React app on the AWS Amplify front-end server. Despite successfully building my app, I was met with an 'Access Denied' error on the page. <Error> <Code>Acce ...

Obtaining AWS Cognito token using AWS Amplify's UI-React

I'm currently developing a Next.js frontend and NestJS backend application, and I am configuring the login component using the @aws-amplify/ui-react library. Following the steps outlined in the documentation here. import { Amplify } from 'aws-amplify'; imp ...

Using AWS Amplify to power NextJS API routes

I apologize in advance if this question seems simple, but I'm curious about the deployment location of API routes in a Next.js application on AWS Amplify. While I'm familiar with how Amplify supports backends and typically involves writing an Ex ...

[AWS Lambda SDK] - Executing Lambda Function - Processing Payload Response as Unit8Array - Conversion to String

Currently, I am utilizing the npm package @aws-sdk/client-lambda to invoke Lambdas. In my setup, I have two Lambdas - Lambda A and Lambda B, with Lambda A responsible for invoking Lambda B. The invocation of Lambda B from Lambda A is done through the foll ...

Verifying the Existence of a File in Amazon S3 Using Node.js

Currently, I am trying to find a way to replicate the functionality of fs.exists() on S3. While I have successfully retrieved the contents of the bucket, I am struggling to determine how to inquire S3 about the existence of a particular file within the bu ...

Presenting Findings Generated by the AWS CloudSearch Solution

Looking for a solution to efficiently display JSON results from AWS CloudSearch? Check out the example link provided below. I want to create a user-friendly interface that integrates facet functionality and is easy to implement. Attached is a demo search i ...

Restoring a file from archive in Amazon Web Services S3

As I work on a project, my current task involves uploading a collection of JSON files to Amazon S3 for mobile clients to access. To potentially lower the expenses related to individual file transfers, I am pondering whether it is achievable to unzip a fil ...

top-notch cloud option for handling JSON requests

I am currently developing an Android app that needs to access JSON data from three different websites at specific intervals throughout the day. In order to simplify this process, I am seeking a cloud solution that enables me to utilize scripting languages ...

AWS EC2 port has been successfully opened, however access remains unattainable

My TCP port 3000 is enabled, as indicated in the EC2 security settings. However, I am unable to connect to my server through telnet on that port and receive the error message Could not open connection to the host, on port 3000: Connect failed. The server ...

Which AWS service would be best suited for logging user application interaction events through Lambda; perhaps Cloudwatch could be the solution

Our team is currently working on developing an API server (using graphql, prisma, and node) that runs in a Lambda function deployed through Apex Up. We have a need to log various user events, including: Successful logins Failed login attempts User actio ...

Unlawful use of Unicode characters

I am currently experiencing an issue while attempting to upload the document.sdf (json) file to Amazon Cloud Search. Everything works seamlessly until certain special characters are encountered. Encountered Unicode characters that are not compliant with C ...

Obtain the raw JSON URL from the web

Is there a website that can provide me with a constant URL for my JSON code so that I can edit it and see the changes reflected live on the same link? Currently, when I try to edit JSON code on gist.github.com, the URL of the raw format changes. Any sugg ...

Using TypeScript to define task invocation parameters with AWS CDK's CfnMaintenanceWindowTask

Currently, I am utilizing AWS CDK along with the library @aws-cdk/aws-ssm and TypeScript to construct CfnMaintenanceWindowTask. The code example I am working on is derived from AWS CloudFormation documentation, specifically for "Create a Run Command t ...

Excessive memory usage is a common issue when making HTTPS requests with Node

I'm attempting to load the JSON from this URL . The file is quite large at over 600MB in size. Within a lambda function, I have configured it with a timeout of 10 minutes and allocated 3008MB of memory. However, the function seems to be utilizing more tha ...

Troubleshooting problem with Node.js S3 file uploader

Having trouble uploading from node.js to Amazon S3 and encountering an error. I've spent all day trying to debug this issue with no luck. Image magic is installed, the app is running on elastic beanstalk, and it was previously working fine on a development ...

Why are uppercase letters not allowed in field names for Amazon CloudSearch?

We are currently looking into sending our company's JSON data to Amazon Cloud search for indexing. Initially, we thought it would be a simple task of transferring the data as it is. However, we discovered that our attribute names are in camelCase format wh ...

Retrieve specific element from an object using array notation in PHP

Have you ever wondered why the array syntax for accessing an object's property works differently across various versions of PHP? I encountered an interesting issue while working with the Amazon PHP SDK. This line of code, which accesses an object's proper ...

Dual Server Cloud Storage Platform for Enhanced File Sharing

Currently, my cloud storage website operates on a single server. I am interested in setting up a system where downloading and uploading occurs on the storage server, while the web application's source is hosted on a separate server to handle MySQL que ...

What is the process for changing a DynamoDB table from PROVISIONED to PAY_PER_REQUEST using Node.js?

Currently, I have a DDB table set up with BillingMode: PROVISIONED and ProvisionedThroughput:{...}. My goal is to switch it to BillingMode: PAY_PER_REQUEST, but every time I attempt this change, I encounter the following error: TypeError: Cannot read prop ...

Building a Python Lambda function that connects to an AWS HTTP API

In this resource, you can find a guide on how to create an HTTP API that triggers a Lambda function using a node.js runtime. I recently attempted the same process with a Python lambda using the following handler: def lambda_handler(event, context): r ...

Error encountered during the execution of a Lambda function in NextJS API using AWS Ampl

I am currently facing an issue with my NextJS app running on AWS Amplify. I have created a basic REST API by adding a pages/api directory to my project. The endpoint successfully returns test JSON data when the project is run locally. However, after deploy ...

Directly uploading files to AWS using React/NextJS is a seamless process

After going through some tutorials, I have successfully created code for uploading files to AWS. However, the typical workflow involves: User chooses a file from their device File is uploaded to our server File is then sent to AWS I am looking to by-pass ...

What is the best way to initiate a node.js application automatically on an Amazon Linux AMI instance in AWS?

Could someone provide a simple guide on how to start an application when the instance starts up and is running? If the service was installed using yum, can I use /sbin/chkconfig to add it as a service? But what if I want to run a program that wasn't insta ...

Utilize AWS Code Pipeline to deploy a React application with customizable build variables

Currently, I am in the process of deploying a create-react-app as a static site on AWS S3 with CodePipeline managing the build. Within our codebase, we have REACT_APP_**** variables that are injected during the build process. My concern is how to inject d ...

During the execution of a backend script, where exactly is the image or video data stored?

I'm currently developing a web application that allows users to upload videos for processing and formatting, then saving them for download. The plan is to deploy the app on an AWS EC2 instance and utilize an S3 bucket for storing the finalized videos ...

Serverless Framework Express Rest-API encounters a 502 Bad Gateway Error

Currently, I am working on building an express rest-api using the serverless framework with the code provided below. The issue I am facing is that while the POST request method to the path /fruits is functioning properly, the GET request method is resultin ...

Error encountered while attempting to clone repository in AWS Amplify: "SSR apps do not support Basic Auth."

My AWS Amplify app has restricted access control set up with credentials in the app settings. However, I noticed that when I temporarily turn off the restrictions to make it publicly viewable and then try to turn them back on again, the build fails in AW ...

SMTPConnection._formatError experienced a connection timeout in Nodemailer

Our email server configuration using Nodemailer SMTP settings looked like this: host: example.host port: 25 pool: true maxConnections: 2 authMethod: 'PLAIN' auth: user: 'username' pass: 'pass' We encou ...

The error message "Unable to establish a connection to security.ubuntu.com:80" keeps popping up while attempting to execute a shell command in Databricks

I have been trying to implement Selenium on an AWS Databricks platform following the guidelines in a recent post. However, every time I execute the code provided, I encounter the same error: Partial Error: Could not connect to security.ubuntu.com:80 Code ...

Tips for troubleshooting an AWS Lambda function

Over the weekend, I spent time running node functions on AWS Lambda connected to DynamoDB. I used X-ray for debugging, creating my own annotations along the way. I'm curious if there is a more efficient method for debugging lambda functions, such as a ...

Playing around with TypeScript + lambda expressions + lambda tiers (AWS)

Having trouble importing modules for jest tests in a setup involving lambdas, lambda layers, and tests. Here is the file structure: backend/ ├─ jest.config.js ├─ package.json ├─ babel.config.js ├─ layers/ │ ├─ tsconfig.json │ ├ ...

Timeout occurred while waiting for the page on AWS Device Farm for Internet Explorer

I found myself in a unique situation where my AWS farm was running smoothly with capabilities options for Chrome and Firefox using my own Selenium framework, but encountered failures when setting it to INTERNETEXPLORER. self = <selenium.webdriver.remote ...

Struggling to modify the user password following authentication through Cognito

After creating a user using adminCreateUser, I encountered the challenge of NEW_PASSWORD_REQUIRED while trying to authenticate with adminInitiateAuth. How can I change the password in this scenario? I'm attempting to reset the password for a user with sta ...

Establishing a Secure Connection between PHP Server and Amazon AWS MySQL Server

Currently, I have set up two servers on Amazon AWS. One server is dedicated to running PHP while the other handles MySQL. Accessing the MySQL database through my terminal and MySQL Query Browser has proven successful. However, I am facing challenges in es ...

Transfer the AWS configuration settings to the imported module

Currently, I am attempting to perform unit testing on a JS AWS Lambda by running it locally. To simulate the Lambda environment, I am taking on the same role that the Lambda would have with AWS.config.credentials and then executing the Lambda function that ...

Deploying an Angular application on AWS EC2 without using nginx as a reverse proxy

Our team has been tackling the challenge of hosting an Angular application on AWS. A question has emerged: can we deploy the Angular application without relying on nginx? This inquiry arose when we successfully deployed a node.js application without any ...

React build failing to load exotic filetypes

I set up a project using create-react-app and I am trying to incorporate file types such as webp or mp3. Everything works perfectly when I run my application on localhost with npm run start, but once I deploy it on my server (using npm run build and serv ...

DynamoDB allows you to set a Time to Live (TTL) for items, displaying the expiration time but not automatically

My setup includes setting ttl as a TTL column and adding epoch time on it for certain items. https://i.stack.imgur.com/LenXa.png However, I noticed that these items are not being deleted. What could be causing this issue? https://i.stack.imgur.com/icEsl ...

Node.js AWS S3 Presigned URL with SignatureMismatch

I am currently working on a NodeJS script to reverse-proxy client requests by creating pre-signed URLs for S3 objects being requested. For instance, when a user accesses the website at build.localhost:8080, the 'build' subdomain corresponds to a ...

Troubleshooting npm errors during code deployment in AWS CodeBuild pipeline

Issue encountered during the initial deployment of code. After merging the code successfully, an error occurred while running 'npm ci' in CodeBuild. The pipeline indicates success upon code merge, but the npm command throws the following error: ...

Encountering a 403 error upon refreshing the page of my Angular 6 project

I am currently working on an Angular 6 project with JWT authorization deployed on AWS Elastic Beanstalk and utilizing CloudFront. I am using the @auth0/angular-jwt library to manage everything efficiently. The setup is functioning smoothly, and I have a li ...

Encountered an error while configuring process.env.secrets when deploying Next.js with AWS Amplify

Hello, I am facing an issue while trying to host a web/app with AWS Amplify. Despite my efforts, it doesn't seem to work. Here is the error I'm encountering after running the code with yarn and removing package.lock.json: The error log includes ...

Storing files in a repository does not impact modifications

My AWS-hosted Next.js front-end application has a backend dependency specified in the package.json like this: "api-client": "git+https://username:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="fa8a9b89898d95889eb ...

Experiencing Issues Connecting to AWS RDS MySQL Database Through Express JS

I have been attempting to establish a connection with my Amazon RDS cloud database using the Express framework. The connection setup in my server.js file is as follows: const express = require('express'); var bodyParser = require('body-parser') const mysq ...

Transfer files seamlessly between different APIs

Is it possible to directly transfer thousands of files (images, pdfs) from one third-party API service to Google Drive API without the need for intermediate storage like an AWS S3 bucket? I already have authentication set up for both APIs. I am considerin ...

The error message thrown by DynamoDB BatchGet is always 'The key element supplied does not align with the schema'

I've been struggling with the DynamoDB batchGet operation for quite some time now. Here's my table definition using serverless: Resources: MyTable: Type: AWS::DynamoDB::Table DeletionPolicy: Retain Properties: TableName: MyTab ...

How can the CORS issue be resolved when sending a form from a client to an AWS API gateway function?

Within my front end React application, I am looking to implement a contact form that will submit data to a Lambda function via an API Gateway with a custom domain attached. The frontend operates on the domain dev.example.com:3000, while the API Gateway is ...

Struggling to establish a connection with AWS RDS through sequelize

After successfully connecting to my AWS RDS PostgreSQL using the initial code, I decided to switch to Sequelize. Here is the new code that I tried: import "dotenv/config.js"; import Sequelize from "sequelize"; const dbConfig = { HOST ...