Can't seem to find where to specify the location of the object when I call getObject.
Basically, trying to get an object from s3 and download it. I am able to get the object with no issues but it does not download it. Am I missing a param?
// Load the SDK and UUID
var AWS = require('aws-sdk');
var uuid = require('node-uuid');
// Create an S3 client
var s3 = new AWS.S3();
var params = {
Bucket: "my-artifacts",
Key: "artifact.jar"
};
s3.getObject(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Response I get:
{ AcceptRanges: 'bytes',
LastModified: 2017-08-09T14:31:32.000Z,
ContentLength: 19442174,
ETag: '"0df85e32d56c37be82c99150824ca956-3"',
VersionId: 'xQBKHSPWAdd_JXzLOWv0AEixv4hSRDKK',
ContentType: 'application/java-archive',
Metadata: {},
Body: <Buffer 50 4b 03 04 14 00 08 08 08 00 ec 73 09 4b 00 00 00 00 00
00 00 00 00 00 00 00 09 00 04 00 4d 45 54 41 2d 49 4e 46 2f fe ca 00 00
03 00 50 4b 07 08 00 ... > }