Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

s3 getobject not getting large json object

json_file_get = async (req, res, next) => {
        try {
            var project_id = req.body.project_uuid;
            const params = {
                Bucket: '',
                Key: "",
            }
            //const data = await s3.getObject(params).promise();

            let readStream = s3.getObject(params).createReadStream();
            console.log(CONFIG.BASE_PATH+'logs/one.json');
            let writeStream = fs.createWriteStream(CONFIG.BASE_PATH+'logs/one.json');
            readStream.pipe(writeStream);

          } catch (e) {
            return e
          } 
 
PREVIOUS NEXT
Tagged: #getobject #large #json #object
ADD COMMENT
Topic
Name
3+5 =