Questions tagged [amazon-s3]

Amazon S3, commonly known as the Simple Storage Service, is an exceptional online storage solution offered by Amazon Web Services. However, please note that our focus here is strictly on answering programming-related queries. We kindly request you to refrain from asking questions about general S3 support, functionality, or configuration as they are considered off-topic for this platform.

Discover the Power of Node.js with the @aws-sdk/client-s3 Package, Leveraging AWS CLI Credentials Stored in

A Nodejs project has been set up with media files stored in an S3 Bucket and utilizing the @aws-sdk/client-s3 as the AWS SDK Client. The project consists of two important files, namely .env and S3Bucket.js. The content of .env (located in the root directo ...

Plow through the contents of the S3 Bucket, exploring every Folder and File

I've encountered an issue while iterating through an S3 bucket using s3.listObjects. The error message { [UnexpectedParameter: Unexpected key 'Key' found in params] has been popping up. Below is the snippet of code I'm currently working ...

send email with .jpg image attachment through AWS SES using node.js

Check out the code snippet below from https://github.com/andrewpuch/aws-ses-node-js-examples, which provides an example of sending an email with an attachment. I made some modifications to the code in order to retrieve an image file from AWS S3 and send i ...

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 ...

Accessing Private Files with Signed URLs from AWS S3

Issue: The challenge is to securely allow users to upload a file and retrieve it later. The files are stored in private Buckets and objects using S3 pre-signed URLs for uploading. However, fetching the file poses a problem as the signed URLs expire after ...

Unable to load Environment Variables in ScrapingHub Configuration

Recently, I encountered a puzzling situation while deploying spiders on ScrapingHub. The spider itself functions properly, but I am facing challenges in changing the output feed based on whether the spider is running locally or on ScrapingHub. My goal is t ...

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 ...

Protect a web address with the power of AngularJS, Firebase, and S3

I am looking to create a website using an AWS S3 bucket for storing videos, along with AngularJS and Firebase for authentication. My main concern is ensuring that the URL to access the video content (/video) is secure and can only be accessed by authentica ...

Deploying to AWS S3 without the need to update or modify any

Just a heads up - this is not an EC2 instance I have developed a node.js application to handle requests for images by using app.use("/images", s3Proxy({...})). These images are stored in my AWS S3 bucket and then served. I am uploading images to the bucke ...

Encountering a Glitch when Transferring a File to S3 utilizing Federated Identity via aws-amplify in React

When attempting to upload an image with a Facebook federated identity, I encountered an error: AWSS3Provider - error uploading Error: "Request failed with status code 403" Status Code: 403 Forbidden I noticed that the URL in the request, while the user is ...

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 ...

Angular facilitates the seamless uploading of files to S3

Utilizing this particular plugin Alright, so here's the issue I'm facing: I have been able to generate a signed S3 URL on my server and successfully upload a file using the following method: How it used to work: shell curl -T file.jpg http://bla.s3.ama ...

Guide on using multer to retrieve files from digital ocean spaces

I successfully uploaded PDF files to Digital Ocean Spaces using a Node.js app. However, I am struggling with accessing these files and displaying them to the user. The code snippet below is from a tutorial on object storage file upload, but it does not pro ...

The live streaming feature in Node.js is currently experiencing issues with the streaming-s3 function

I have successfully implemented the streaming-s3 node-modules on my local machine. However, when I try to use it on a live server where HTTPS is enabled, it does not seem to be working properly. Interestingly, if I disable HTTPS on the live server, the fi ...

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 ...

Retrieve files from Amazon S3 using JavaScript

I'm currently working with a javascript file that's intended to download a text file from one of my S3 buckets. However, after running this file using "node file.js", nothing happens and there's no output. Is there something I'm missing ...

Guide on transferring numerous files (50k+) from a folder to AWS S3 using node.js

Currently, my Node.js API on a Windows machine is generating numerous XML files that are later sent to an S3 bucket. The quantity of files sometimes surpasses 50k. For the uploading process, I am utilizing the aws-sdk package. Essentially, I iterate throu ...

PHP integration with IBM Cloud storage

I am encountering an issue while attempting to establish a bucket and upload files on IBM cloud storage using PHP. I keep receiving an error 405 Method not allowed. Despite reviewing the documentation, which suggests utilizing S3, I have opted for the AWS ...

Error encountered with S3Cmd: Issue with parameters causing upload failure

When I try to upload a file from my computer to an S3 bucket using the command s3cmd put c:/ok/ok.pdf s3://bucket_name/, I am encountering an error. PARAMETER PROBLEM: NOTHING TO UPLOAD It seems like there is no solution for this issue. I followed the ...

When the page is finally displayed, the call back for `node express aws s3.listBuckets` function

Get a list of buckets using callback: router.get('/', function(request,response) { s3.listBuckets(function(error, data) { if (error) { console.log(error); } else { console.log(data.Buckets[0].Name);//since I o ...

Having trouble uploading a file sized 300 MB to Amazon S3. The response received is "Internal Server Error."

I keep encountering an "Internal Server Error" whenever I attempt to upload a large file up to 300 MB. The code snippet I am using is as follows: try { $uploader = UploadBuilder::newInstance() ->setClient($s3Client) ->setSource($fileloc) ->setBuc ...

Using a single request to save several items in s3

At the moment, my application is set up to write individual objects to s3 using PutObjectCommand. It looks something like this: const params = { Bucket: process.env.AWS_S3_PHOTO_BUCKET, Key: photo_name.toString(), Body: resized_img ...

Is there a way to read an AWS file upload's Access Control List (ACL) from the client (specifically React/Next.js) if it is not set to 'public-read'?

Is there a way to upload private files to AWS without granting public-read access, but still be able to view the file using a URL in a protected route on my client side (Reactjs/Nextjs)? How can I make this work? The situation: I need to send a PDF file f ...

Pictures failing to load correctly post Next.js compilation and running yarn start

Currently, I am utilizing Amazon S3 as a Content Delivery Network (CDN) for my application. Everything functions properly when running the application using 'yarn dev' with the domain added to the next config. Upon inspecting the src attribute of ...

Utilizing PHP to Access AWS S3 through a Proxy Server

Currently, I am attempting to retrieve the object image through a proxy server using PHP. Below is the code I am utilizing: $client = new AwsS3S3Client([ 'version' => 'latest', 'region' => 'us-east-1', 'request.o ...

Heroku (Node application): What is the fate of temporary files on the platform?

My Node application, which is hosted on a free Heroku account, utilizes Amazon S3 to store files. I am currently using the s3fs module in conjunction with multiparty middleware to first temporarily store files before uploading them to S3. However, even af ...

A step-by-step guide on uploading a file to an AWS S3 bucket using a pre-signed URL in a Node

I am currently using S3 upload function in Node.js to upload files to an S3 bucket. The frontend of the application is built on Angular. However, my client now requires that all uploads be directed to the S3 bucket via a presigned URL. I am wondering if th ...

The functionality of Angular 9 Service Worker appears to be inhibited when hosting the site from a S3 Static Website

I created a Progressive Web Application (PWA) following these steps: Started a new Angular app using CLI 9.1.8; Added PWA support by referring to the documentation at https://angular.io/guide/service-worker-getting-started; Built it with ng build --prod; ...

Sending a massive video file to a node.js server and saving it in AWS S3 with ReactJS

I am currently in the process of creating an OTT platform, but I have encountered a problem while attempting to upload large files to the server. I initially attempted to store the file in a temporary folder using multer and then utilize aws-sdk s3.upload. ...

"Looking to display an image object retrieved from AWS S3 using a signed URL in Vue.js? Here's how you

<div v-for="(data, key) in imgURL" :key="key"> <img :src= "getLink(data)" /> </div> imgURL here is an array that contains file names. methods: { async getLink(url){ let response = await PostsService.downloadURL({ i ...

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 ...

Problems arising in AWS integration with Django backend and Vue.js frontend

My Django backend is currently deployed on AWS Elastic Beanstalk with default settings and auto-scaling environment type set to single instance. Meanwhile, the Vue.js frontend is being hosted on AWS S3, configured with CloudFront and now running on HTTPS f ...

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" ...

Having difficulty sharing a photo file to s3 using React and Node's presigned URL

I'm encountering an issue while trying to upload an image file to an AWS S3 bucket. I have set up Node/Express to create a presigned URL for direct uploading from the React frontend to S3. The problem I'm facing is that although I am able to successfully u ...

What is the most efficient way to upload images in node.js?

I am currently working on a web application that involves uploading user images to an S3 bucket using multer-s3. After uploading the image, I use a module called "sharp" to collect metadata such as dimensions and MIME type before saving this information to ...

Issue with CORS on Next.js static files leading to broken links on version 10.1.4

Currently, my Nextjs application is fetching its static files from Cloudfront. During deployment, I upload the /static folder to S3. After updating to version 9, I encountered a strange problem where some of my CSS files are triggering a CORS error: Acces ...

Exploring the Benefits of Utilizing Fetch over XMLHttpRequest in React Native

Recently, I attempted to upload images to S3 from my react native app by following a guide provided by Heroku: https://devcenter.heroku.com/articles/s3-upload-node In essence, I utilized the aws-sdk on my express.js backend to generate pre-signed requests ...

Transform the image data for display in a web browser

Attempting to retrieve an encrypted image file from Amazon S3 using a presigned link with AJAX is resulting in a jumble of gibberish image data. $(document).on 'click', '.js-download', (event) -> event.preventDefault() $.ajax t ...

The Vue website on S3 is experiencing a 404 error, but it is still able to

I'm facing an issue with my Vue2 site where everything seems to be working fine for the users, but Google is flagging most of the pages as having 404 errors. Even though when accessing a direct URL like hptts://example.com/example, the page loads corr ...

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 ...

Troubleshooting NodeJS's access denied problem on AWS S3

Here is the bucket policy that I have set up: { "Version": "2012-10-17", "Statement": [ { "Sid": "AddCannedAcl", "Effect": "Allow", &q ...

Having trouble accessing the downloaded file from S3 using Angular and NodeJS

Currently, I am facing an issue while attempting to download a jpg image from amazon S3 using the NodeJs SDK. Although I can successfully retrieve the file object on the backend, encountering difficulties arises when trying to create a blob object and down ...

Is there a way to directly send a file to S3 without needing to create a temporary local file?

Looking for a solution to upload a dynamically generated file directly to amazon s3 without saving it locally first? Specifically using Python. Any ideas or suggestions? ...

Transfer a csv file from a static webpage to an S3 bucket

Looking to create a webpage for uploading csv files to an S3 bucket? I recently followed a tutorial on the AWS website that might be helpful. Check it out here. I made some modifications to accept filename parameters in my method, and everything seems to ...

"Utilizing aws-sdk in a TSX file within a React project: a step-by

When working on a project using TypeScript (tsx) for React, I encountered an issue with uploading images to the server using aws-sdk to communicate with Amazon S3. To resolve this, I made sure to install aws-sdk via npm and typings. UploadFile.tsx import ...

The React App deployed on the S3 bucket is only displaying the homepage, and it seems like the Hash router is

After deploying my react app on an S3 bucket, I encountered an issue where only the home page would display and all other pages would result in a 404 error. Despite switching from browserHistory to hashHistory, the problem persisted. The console showed a ...

Struggling to link AWS S3 ReactApp with Heroku Node/Express API

I successfully deployed a react-app to AWS S3 and a node/express API on Heroku, but I am facing difficulties in connecting them together even with the cors configuration in the API or using proxy in the react-app. I have been unable to resolve this issue. ...

The error message from AWS S3 reads: "An issue occurred during the call chain: Unable to process the request (invalid syntax: line 1, column 0), received malformed XML."

Currently, in my local environment, I am utilizing node.js to upload an image to my S3 bucket using localstack. Here is the snippet of API code I am working with: const s3 = new AWS.S3({ accessKeyId: 'testKEYId', secretAccessKey: 'testS ...

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 ...

Instructions for uploading a pre-rendered file to Amazon S3 and accessing it when our webpage loads for the first time

My web application is built using Angular Universal Starter kit. I'm looking to optimize the initial page load speed by uploading the pre-rendered file to an S3 bucket. However, I am having trouble finding the correct configurations for uploading the pre ...

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 ...

What is the process to enable a deployed React app (hosted in S3) to retrieve JSON data that is uploaded to an S3 bucket?

I'm in the process of creating a static React App that showcases API documentation. Utilizing Swagger for the backend (which is hosted separately on a lambda) to generate the JSON data model. I have another lambda set up to provide me with endpoint details ...

Converting JSON to parquet format or not converting at all, the choice

We have encountered a situation where converting a JSON file to parquet results in the creation of numerous small parquet files. How can we prevent this from happening? What is the most effective and efficient approach to managing this transformation? Bel ...

Unlocking a Static HTML Website in a Private S3 Bucket using PHP

I have recently set up a private bucket on AWS S3, containing 4 folders labeled A, B, C, and D. Inside these folders, I have uploaded an index.html file along with JS scripts and images to create a static HTML website. On my own website (www.test.com), I ...

After deploying to the production server, Next.js is failing to fetch images using the image URL

Our production deployment setup includes a network of 3 linux machines, with two dedicated to deployment and one serving as an nginx proxy. For development deployment, we utilize a separate linux machine. Within our frontend (built using the nextjs framew ...

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 could be the reason for the failure of my multer file uploads to AWS s3?

I managed to successfully upload my files locally, but I'm facing challenges with getting them onto AWS S3 Buckets. Whenever I submit a request, I encounter vague errors stating "Cannot set headers after they are sent to the client". It seems like the ...

Utilizing Node.js Express to Retrieve AWS S3 Signed URL

My current challenge lies in accessing the AWS S3 signed URL through a Node JS and Express wrapper API that I have developed. To achieve this, I am redirecting a URL to trigger the Node API using nginx. Within the Node API, I am dynamically setting the &a ...

What is the best way to store a document in a specific directory inside an S3 container with Flask?

I'm having trouble saving images in a specific folder within my s3 bucket. Despite specifying the folder path, the images always end up in the root of the bucket. Below is the code snippet I am using: s3 = boto3.client( "s3", aws_access_key_ ...

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 ...

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 ...

How to programmatically upload files to various S3 buckets using Django Storages and Boto3

I am currently utilizing django-storages to upload files into an s3 bucket. However, I am interested in being able to upload files into a different s3 bucket than the one specified in my default settings.py file. Each of my app's web pages corresponds ...

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 ...

The putObject function in Node.js extends the size of an object on the server

Currently, I am working on pushing an image to an S3 instance using Nodejs with the aws-sdk. The approach involves reading from a file on the client and saving it on the server within a meteor framework. However, my goal is to directly upload it to the S3 ...

Having trouble reaching the subpages of my NextJS static site on S3 through CloudFront when public access is restricted

I have set up CloudFront to host my NextJS static site using an S3 bucket. I purposely restricted public access to the S3 bucket, so the only way to view the site is through the CloudFront URL (I implemented Origin Access Control "OAC" on the CloudFront di ...

The Promise.all() is being triggered before the completion of the resolve() promise

Recently, I've started working with node and I'm attempting to create a service that will interact with AWS to load multiple images and then provide the AWS keys back to the client. To achieve this, I am utilizing Promise.all to handle all of the ...

Error: The policy for the bucket could not be found. Error code: "NoSuchBucketPolicy"

We've encountered an issue while trying to attach a session policy in AWS, and we're puzzled by the error message that keeps popping up. Our setup involves utilizing S3 buckets and the Secure Token service. Even though we are able to obtain tem ...

Guide to properly ending an AWS S3 read stream with AWSJavaScriptSDK

After creating an AWS S3 object and a read stream from it using the code below: const s3 = new AWS.S3(); const readStream = s3 .getObject(params) .createReadStream() .on('error', err => { // do something }); If the stream is not fully rea ...

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 ...

What is the best method for transforming a string into JSON format using Node.js?

Looking for assistance in listing the data from a CSV file stored in S3 using Node.js code. Below is the provided code, but I am seeking help to achieve the expected output as shown: CODE: const AWS = require('aws-sdk'); const fs = require('fs'); const ...

What steps should I follow to successfully integrate a Next.js <Image> tag with my AWS S3 Bucket Policy?

I have a unique situation with my Next.js application that is hosted on Vercel and utilizes an AWS S3 Bucket to store images exclusively for my website. Despite having configured my CORS policy to allow all traffic, I seem to be encountering some issues: ...

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 ...

Elusive Appearance of the Flask Flash Message

I have developed a web application using Flask that allows users to upload files to an S3 storage. However, I would like to enhance the user experience by showing them the progress of their file uploads in real-time. To achieve this, I am utilizing Flash t ...

A guide to utilizing a signed URL and the Ionic camera plugin in Ionic 4 to upload images to Amazon S3

As I work with the Ionic Native plugin for image uploading using S3 signed URLs, I am encountering an issue due to the camera plugin generating images in base64 format. This is causing difficulties when trying to upload them in the correct format. takePho ...

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 ...