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.

Using Python's lambda function to extract data from DynamoDB's JSON structure

I'm looking for a Python Lambda function that can handle DynamoDB streams and convert the JSON data from DynamoDB format to standard JSON. PHP and nodejs have Marshaler options for this task, but I'm interested in finding similar or alternative solutions ...

Optimizing Next.js links for seamless functionality when deployed on AWS Cloudfront

I'm currently in the process of setting up a prototype project with Next.js by utilizing a Static html export (specifically, next export) and then transferring the output to AWS S3 for Cloudfront to serve. In my /pages directory, I have the following two ...

Utilizing AWS principal as a reference parameter within cloudformation: A comprehensive guide

I am trying to automate the inclusion of "AWS": "arn:aws:iam::684821578293:user/jenkins" in my cloudformation template. However, when I use the join function, it does not work. Can someone assist me with this issue? Below is the working template where you ...

Encountering a cross-origin resource sharing (CORS) issue on NodeJS or Nginx server

After conducting thorough research on the topic following the formulation of this question, it has come to my attention that there are numerous queries similar to mine. However, I firmly believe the issue at hand here is distinct: No 'Access-Control- ...

Using codedeploy to deploy a Next.js application onto an AWS EC2 instance

After creating a fresh NextJS app with only basic boilerplate files and folders, I uploaded it to a CodeCommit repository. I already had a functional CodePipeline and simply switched the Source stages. However, I am encountering deployment failures during ...

What are the steps for setting up node.js, couchdb, and other tools on Amazon EC2?

Embarking on the journey of server administration for the first time is both daunting and exciting! As a node.js developer, I have relied on Nodejitsu until now. However, with rising prices, I am now exploring setting up my own server using AWS. My develo ...

Generating a custom pre-signed URL using API Gateway resulted in a MethodNotAllowed error

I've been working on utilizing a pre-signed URL for an S3 bucket with a custom endpoint, but I'm encountering a persistent issue. Despite being very close to the solution, I keep facing a Method Not Allowed error. Here's what I have so far. ...

Guide to deploying to Elastic Beanstalk with CLI while managing Private NPM Packages

We rely on various namespaced private packages from NPM in our development process. During the deployment procedure with EB CLI (eb deploy), we encounter an issue when EB tries to execute npm i. This results in a deployment failure since EB lacks access t ...

AWS Amplify is not displaying images correctly, although they are functioning properly in development mode

I am facing an issue with my Next.js project deployed on AWS Amplify. While images load properly in development mode, they are not loading in production mode. I have tried various solutions such as: Enabling the "Legacy cache settings" option and setting ...

What is the recommended method for deleting sequelize.connectionManager.getConnection according to the Sequelize documentation?

I am currently developing an AWS Lambda function using Typescript that interacts with a database through Sequelize. According to the official Sequelize documentation, the configuration for Sequelize should be as follows: let sequelize = null; async func ...

How to choose between AWS.DynamoDB and AWS.DynamoDB.DocumentClient for your specific use case?

As I delve into learning DynamoDB and the AWS serverless stack, I've noticed that many tutorials recommend using AWS.DynamoDB.DocumentClient. This is exemplified by the following code snippet used to create an item: const dynamodb = new AWS.DynamoDB.Docum ...

There was an issue parsing the parameter '--request-items' due to invalid JSON format. Decoding failed as no JSON object could be found

My current environment includes AWS cloud, DynamoDB, AWS Cloud9, Python, and JSON. I'm attempting to write these elements into a DynamoDB table using the command aws dynamodb batch-write-item --request-items file://Sensors.json in my Cloud9 CLI. However, ...

The Design of DynamoDB Applications

Utilizing DynamoDB in conjunction with node.js and Express for developing REST APIs has been a beneficial choice for us. We have opted for Dynamo on the backend due to its operational simplicity. To streamline our usage of DynamoDB, we have incorporated t ...

Exploring NodeJS with amazon-sp-api: A guide to retrieving the products list

Currently, I am using the following code snippet to retrieve all details about my product from Amazon: let activeProductsResponse = await APIs[ idProductsStocksPlace ].callAPI({ operation: 'getListingsItem', en ...

Encountering a 502 error while trying to access the web application on Elastic Beanstalk due to the package.json file not being

Upon deploying my first web app to the Elastic Beanstalk, I encountered an issue where attempting to access it resulted in a "502 Bad Gateway" error. Reviewing the logs revealed the following error: npm ERR! Please include the following file with any supp ...

Node.js Express is successfully receiving messages from the WebSocket server but encountering difficulties when attempting to send them out

My setup involves websockets with AWS API Gateway, an EC2 instance running Node.js and Express with WS websockets. I can send a message from wscat to the API Gateway WSS URL and it shows up in the EC2 instance. However, when I send a message from the EC2 i ...

Guide on placing a numerical value within the source_mappings.json file in an AWS SDLF pipeline

Utilizing a framework known as the Serverless DataLake Framework (SDLF), files can be ingested into an AWS S3 DataLake. Certain configurations are required to move a file through various stages within the S3 repository. The initial step involves transferri ...

What is the best way to remove a specific item from a list of maps in DynamoDB based on a particular attribute value within the

Below is an example of a list I have: { "favorites": [ { "createdAt": 1448998673852, "entityId": "558da3de395b1aee2d6b7d2b", "type": "media" }, { "createdAt": 1448998789252, "entityId": "558da3de395b1aee2d6b7d83 ...

The signature does not match, so the SignedURL is being rejected

I recently started using AWS S3 and encountered the SignatureDoesNotMatch error while trying to upload an image. I double-checked for any typos in my keys, ensured that my system time was accurate, but still couldn't resolve the issue. My workflow, mo ...

What are the reasons for a Lambda function not being triggered when added as a target to an Event Bridge Rule?

I have encountered an issue with setting a rule and a lambda target for EventBridge. Although I have successfully added the rule and target, the Lambda is not being triggered. Additionally, when I look at the target Lambda function on the AWS Console, I do ...

Issue with AWS API Gateway and Restful API: socket.io encounters an error stating that the route '/socket.io?EIO=4&t=xxx&transport=polling' does not exist

My backend API services are hosted on AWS using API Gateway and EC2 instance. The backend is built with Node.js/Express JS, and socket.io is used for real-time messaging. const initializeExpress = (): void => { const app = express(); let http = re ...

Upon completing the construction and deployment of a Lambda function using AWS SAM CLI, I noticed a message in the logs stating "Client network

Update: Initially, I used the correct callback(null, response) but then encountered the need to run sam init again for a different project and install a new node version with nvm. The lambda function below is responsible for creating a new item in datocms ...

Looking for the location of the apc.php file?

I've successfully deployed the APC cache on AWS Elastic Beanstalk (confirmed via phpinfo()) How can I verify if APC is functioning properly? Where can I find the location of the apc.php file? Thank you ...

Error message: "An internal server issue occurred while attempting to upload an image in base64 format via AWS Lambda

I've been working on uploading images to S3 using AWS Lambda. I found some helpful code in a URL and made some modifications to the variables fileFullPath and Bucket: Upload Image into S3 bucket using Api Gateway, Lambda funnction const AWS = requir ...

Having difficulty with uploading images in the correct size on the AWS S3 server

When I upload an image to AWS S3 bucket, the image size is only showing as 6 Byte, which is not the actual size of the image. I am confused why the image is not uploading with its actual size. What could be causing this issue? interest.js file Inter ...

Execute the calculation on the user's AWS account

In my Node.js and Vue.js project, the goal is for a user to input their AWS credentials, provide a link to an online data source containing a large amount of data, and run an algorithm on this data using their provided AWS account. I am facing two challen ...

Is it possible to transform an array into a JSON file and securely store/upload it in an AWS S3 bucket?

Recently, I started exploring aws and its capabilities. Currently, my focus is on developing a web application that allows users to input text in two separate fields. Subsequently, this text will be converted into a Json file and stored in the S3 bucket. ...

I plan to securely store the verification code from Cognito into our database for future use and send the email at a later time

exports.handler = async event => { console.log(event); try { const { userName } = event; const { codeParameter } = event.request; let userParams = { userId: userName, codeParameter }; // Determine the reason for this function being i ...

Encountering GLIBC version error while trying to build Next.js 14 App in AWS Amplify Gen 2 deployment

I am encountering an issue while deploying a Next.js 14 application using AWS Amplify Gen 2. My build is failing due to a GLIBC version error. The error messages indicate that the required GLIBC versions (GLIBC_2.27 and GLIBC_2.28) are not located. I am ut ...

Experiencing unexpected 502 Bad Gateway errors from AWS API Gateway following an update to Lambda runtime from Node 8.x to Node 12.x

After transitioning our staging environment for the REST API from NodeJS 8.x to NodeJS 12.x on AWS Lambda due to end of life for NodeJS 8.x runtime, we have encountered a new issue. Periodically, requests from our frontend web app to API Gateway fail with ...

Utilizing AWS Amplify to access detailed owner information beyond just their ID

Is it feasible to achieve something like this? How should the design be tailored for this specific use case? Do I need to incorporate a lambda function that includes the user (owner) in the post creation process? Seeking assistance on how to implement thi ...

Exploring the correlation between the number of nodes on AWS EMR and the execution time of

I am a newcomer to Spark. Recently, I attempted to run a basic application on Amazon EMR (Python pi approximation found here) initially with 1 worker node and then in a subsequent phase with 2 worker nodes (m4.large). Surprisingly, the elapsed time to co ...

Removing an Image from Amazon S3 in a Web Application using Next.js, Mongodb, and Mongoose

Currently, I am working on implementing a deleteImage function in my front end to interact with the backend through API routes. Below is the function I have for uploading images: const uploadImages = async (ev) => { const files = ev.target?.files; ...

How to effectively manage multiple React apps using a single S3 bucket

When hosting React apps in my development and production environments using S3 static website hosting, I have found great success. I typically follow a bucket naming structure like dev-myapp-mycompany and prod-myapp-mycompany, with each environment having ...

Error message: Issue with AWS Serverless Lambda and Angular - TypeError: express function not defined

I'm encountering an issue when trying to deploy my application from localhost:4200 to AWS serverless Lambda. The error in cloudwatch logs is causing a 500 {"message": "Internal server error"} response when I access the URL. My understanding of AWS is limi ...

Storing multiple parameters in AWS SSM using Terraform and a JSON configuration file

In the process of migrating a couple of legacy applications to ec2, we are faced with the challenge of storing multiple application configuration parameters individually. The goal is to have separate parameters for each application. The current approach s ...

Most efficient method: Exporting a DynamoDB table to a CSV file and saving it in an S3 bucket

Is there a more efficient way to export a DynamoDB table into an S3 bucket in CSV format? We already have a lambda function set up to update the DynamoDB table, but now we need to export the entire table. I came across a method of streaming directly from ...

Steps for extracting URL parameters from AWS API Gateway and passing them to a lambda function

After successfully setting up my API gateway and connecting it to my lambda function, I specified the URL as {id} with the intention of passing this parameter into the lambda. Despite numerous attempts using both the default template and a custom one for ...

Steps for accessing data from AWS API Gateway and showcasing it on a static website stored on S3

I am in the process of sending an ajax request to AWS API Gateway to extract data from a JSON and display it on a webpage. The objective is to have a webpage load, trigger an ajax request to API Gateway, which then invokes a lambda function to fetch inform ...

Using aws-sdk to download an object from S3 and handling redirects

To summarize, my goal is to resize an image using a combination of redirection, AWS Lambda, and the aws-sdk. After following a tutorial on resizing images dynamically with AWS titled AWS - resize-images-on-the-fly, I was able to successfully implement eve ...

How can I use Presto/Athena to find the frequency of JSON attributes in a query?

I created a Hive table with a single column that stores JSON data: CREATE EXTERNAL TABLE IF NOT EXISTS my.rawdata ( json string ) PARTITIONED BY (dt string) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.OpenCSVSerde' WITH SERDEPROPERTIES ( 'separat ...

Utilizing AWS Amplify with TypeScript and TypeScript Lambdas for powerful web development

Currently, I am working on a project that involves a nextjs frontend with TypeScript and AWS Amplify for the backend. My intention is to write my Lambda functions in TypeScript as well. However, I have encountered an issue where I have one tsconfig.json fi ...

AWS: How to deploy a node.js application on EC2 servers

I am new to AWS and currently working on a web application using node.js and react.js. While my application functions smoothly on my laptop, I now wish to migrate it to AWS EC2. When I replicate a production environment on my laptop, I have a /dist folder ...

Stuck in the midst of an AWS Amplify build due to issues

I've created a small web application using Node.js Express, HTML, and CSS. It runs locally with the command "npm start app.js", but I'm facing issues when trying to deploy it as a serverless application on AWS Amplify. Here's the build log ...

Tips for sharing parameters between Lambda Functions in AWS Step Functions

After scouring the internet, I couldn't find a solution that works for me in Python. I'm trying to pass certain parameters from one lambda function to another within a step function, but it's proving to be more challenging than expected. Can someone provid ...

The AWS Beanstalk CLI continues to deploy React and npm development builds

I have a React application along with two AWS Beanstalk instances: one for development and the other for production. My goal is to deploy the development build of the React app to the development environment and the production build to the production envir ...

Encountering a SignatureDoesNotMatch error when trying to upload an image to S3 using a presigned URL with ReactJs/NodeJS

After successfully integrating image upload to S3 using a pre-signed URL in App1, I attempted the same process in App 2, only to encounter the recurring error: 403 SignatureDoesNotMatch FRONTEND: import React from "react"; import { uploadAdIma ...

"Silent Passageway: Connecting Node JS to ASW RDS MySQL Through a Secret

I am currently collaborating on a project with a partner. The backbone of our project is node js, and we are using an AWS RDS MySQL DB for our database. Our main challenge lies in establishing effective communication with the DB through SSH within NodeJS. ...

Strategies for rapidly increasing user numbers in Amazon Cognito

Our team recently encountered an issue with hitting the request limit on Cognito due to trying to retrieve too many users at once. These users are grouped in game pools. Currently, our only method of obtaining users is through adminGetUser in parallel. Is ...

Encountering an issue with creating an App Runner on AWS CDK

Attempting to deploy my application using App Runner within AWS via CDK. Utilizing the reference from https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-apprunner.Service.html. Upon deployment, encountering the following error: create_failed: R ...

To interact with Cognito in a React application, it is essential to provide the necessary Username and Pool

I'm currently working on creating a demo app using Cognito with React. I've been trying out the code available in this GitHub repository to experiment with it. However, I keep encountering the error message Username and Pool information required, and I'm ...

CDK Error: Unable to locate MethodResponse in AWS API Gateway configuration

I'm facing an issue in vscode while trying to access the MethodResponse interface from apigateway. Unfortunately, I'm getting an error message: The type 'typeof import(".../node_modules/aws-cdk-lib/aws-apigateway/index")' does not have a prope ...

Execute CDK Deployment on a Different AWS Account Using a Fargate Task

I have a scenario where I need to deploy a stack using CDK in Account A by running cdk synth and cdk deploy in an ECS Task located in Account B. To enable this, I set up a role in Account A with administrator access and granted permissions to Account B so ...

Troubles with yarn and npm

Hey, yesterday I was attempting to deploy my application on AWS and everything was working fine. But today, when I tried running yarn add or npm install in my dev environment, I encountered the following error: see image here The repository "crinet/crine ...

Unable to use csv-parse library on AWS Lambda function running Node.js 12

Currently, I am working on a project that involves using csv-parse on AWS Lambda with a runtime of Node 12.x. I have installed the necessary modules using npm 6.14.10 (node v12.20.1). { "name": "data_analysis_node", "version&q ...

Having trouble establishing a connection to the remote server using node js?

I have been working on integrating a third-party Recharge API. I provided them with the necessary URL, so that whenever a message is sent - whether it's a success or failure - they can update the URL accordingly. Upon checking my AWS system, everything ap ...

Mastering the art of utilizing GSI Index and FilterExpression in AWS DynamoDB querying

In my DynamoDB database table, I have the following structure. It consists of a primary key (ID) and a sort key (receivedTime). ID(primary key) receivedTime(sort key) Data ID1 1670739188 3 ID2 167072 ...

Amplify encounters the "Failed to load resource: the server responded with a status of 400" issue

I encountered an error while using Amplify, although the build was completed successfully. Failed to load resource: the server responded with a status of 400 manifest.json:1 The system is functional in the local environment. Below is the Package.json scri ...

Accessing AWS RDS from a Node.js local server

I'm encountering an ETIMEDOUT 172.31.97.43:5432 error when attempting to test my nodejs express app with a postgres database on my local machine connecting to AWS RDS. On AWS RDS, I have configured the necessary settings such as; Configuring Inbound and ...

How can I deploy React applications to AWS EC2 using Github Actions and AWS CodeDeploy?

I am currently facing a challenge in setting up a React app within Github Action workflow and deploying it on an EC2 instance. The issue I'm encountering is the inability to access the /build folder that is created during the action process. Below is the ...

Transferring a file from the /tmp directory on Amazon Lambda to an S3 bucket using Node.js

My current project involves developing a straightforward screenshot program using Amazon Lambda. The program will take a snapshot of a specified URL and store it in JSON format like this: { "site": "www.example.com", "width": "320", "height": "480" ...

The "@aws-amplify/cli" does not support platforms with the type "Windows_NT" and architecture "ia32"

For my initial AWS project, I decided to use the amplify cli. After running npm i -g @aws-amplify/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="dcbfb0b59ce8f2eee8">[email protected]</a> and successfully configu ...

Updating the version of Node.js on an Amazon Lightsail server can be done by following a

After mindlessly updating the npm version on my Amazon Lightsail instance, I ran into an issue where npm was not functioning properly because nodejs v12 does not support the safe-dot reference. I simply followed the instructions provided here at Unfortun ...

Amazon Alexa Session Attributes do not retain data across sessions

I am using the 'alexa-sdk' in nodejs to create a pension calculator skill for Amazon Alexa. I am facing an issue where session attributes are not retained when switching from one state to another. I store them like this this.attributes['ATTRIBUTE_NAME'] = ...

Exploring data in Dynamodb database

Utilizing Lambda, API-gateway, and DynamoDB with Python 3.6 for managing orders. I have a DynamoDB table structured as follows: orderId (primary Key|String) orderStatus (String) orderCode (String) date (String) The orderId field is unique. However, when ...

The passing of NODE_ENV from ECS Fargate to the React Application seems to be unsuccessful

I recently completed building a React application using Create-React-App. As part of the deployment process, I configured GitHub Actions to trigger a Docker Build and upload the build to AWS whenever I commit to the 'pre-production' branch. Below is a sni ...

AWS Systems Manager CLI capabilities

I've encountered issues while trying to run a CLI command to create an AWS System Manager Association task. The specific command causing problems is: aws ssm create-association --name AWS-RunRemoteScript --targets Key=instanceids,Values=i-03710c82b70 ...

Troubleshooting problems with AWS Elastic Beanstalk deployment

I am encountering an issue while attempting to deploy my Node.js app to Elastic Beanstalk. The app is functioning correctly locally, but when I try to deploy it, I receive the following error: Failed to run npm install. Check snapshot logs for more detail ...

issues encountered when attempting to generate logs in aws S3 bucket with 'winston' and 's3-streamlogger' modules

const winston = require('winston'); var S3StreamLogger = require('s3-streamlogger').S3StreamLogger; var s3_stream = new S3StreamLogger({ bucket: "bucket_name", access_key_id: "access_key_id", secret_access_key: "secret_access_key" }); var log ...

Moving a versioned object within the AWS S3 SDK to the same bucket

Implementing a solution recommended by AWS, I am working on creating an API that enables me to revert to previous versions using a Lambda Function connected to API Gateway. The goal is to replace the current object in the bucket with the specified version ...

The SDK generated by AWS API Gateway does not include the JavaScript client file

After setting up my API with the AWS Api Gateway Service, I am now looking to integrate the javascript SDK into a basic webpage. The provided instructions for using the javascript SDK can be found here. However, they mention importing a js file named apig ...

When running `aws-cdk yarn synth -o /tmp/artifacts`, an error is thrown stating "ENOENT: no such file or directory, open '/tmp/artifacts/manifest.json'"

Starting a new aws-cdk project with the structure outlined below src └── cdk ├── config ├── index.ts ├── pipeline.ts └── stacks node_modules cdk.json package.json The package.json file looks like this: " ...

The recently launched AWS Amplify application (serverless) is encountering a 403 Access Denied error

So I've gone ahead and created a brand new serverless (lambda) app using nodejs, expressjs, and ejs on AWS Amplify. After deploying it to the server using auto deployment, I tried accessing my app through the following URL: master.<...>.amplifya ...

What is the best way to deploy a React build using Express.js on Elastic Beanstalk?

I'm faced with a challenge in getting elastic beanstalk to properly serve React from Node.js. While everything works fine locally, I'm struggling to configure the path in elastic beanstalk to serve react. In my project, I have an express app.js ...

Is it feasible to take user input in Python with AWS Lambda?

I am currently developing an AWS Lambda function with the purpose of assisting users in collecting data from a website by using selenium and headless-chromium. The website has a SMS code verification process during login, which requires the user to input t ...