Answers for "how to store and delete s3 image using node js"

1

how to store and delete s3 image using node js

const s3 = new AWS.S3(
  {  accessKeyId: IAM_USER_KEY,  /* required */# Put your iam user key 
   secretAccessKey: IAM_USER_SECRET, /* required */  # Put your iam user secret key
   Bucket: BUCKET_NAME     /* required */     # Put your bucket name
  }
);

s3.deleteObject({
  Bucket: MY_BUCKET,
  Key: 'some/subfolders/nameofthefile1.extension'
},function (err,data){})

   s3.createBucket({
            Bucket: BUCKET_NAME        /* Put your bucket name */
        }, function () {
            s3.putObject(params, function (err, data) {});
        });
Posted by: Guest on October-02-2020

Code answers related to "how to store and delete s3 image using node js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language