I need to pass user-metadata when I perform a put action to add new objects to an s3 bucket. After the file is uploaded (object is created), I would like the s3:ObjectCreated:put to pass a notification to a rest api method call for further processing.
I have found doc on how to pass user-metadata to the put operation, but not doc on how to make the sns message contain the user-metadata when sending the message to the rest api method.
Would the sns message automatically contain the user-metadata for the newly created object or would I have to perform some additional configuration to make this happen?
Update:
Should I generate a head request like this using node.js:
let authString: string = "AWS AKIAIOSFODNN7EXAMPLE:02236Q3V0RonhpaBX5sCYVf1bNRuU=";
var options = {
host: 'bucket.s3.amazonaws.com',
path: '/filename.jpg',
method: 'HEAD',
headers: { 'Authorization': authString, 'Date': 'Date: Wed, 28 Oct 2009 22:32:00 GMT' }
};
var req = https.request(options, function(res) {
res.on('data', function(d) {
process.stdout.write(d);
});
});