I would like to implement the following scenario using AWS S3 and Lambda.
User takes a photo from mobile, add description, location and more attributes as a separate metadata. Upload the image file to S3 with the metadata as the file inner metadata. According to that link I can do it by adding a key value pair to ObjectMetadata with "x-amz-meta-" as a key.
I was managed to invoke the lambda every creation of a file in my S3 bucket but in the S3Event from the Lambda's invocation method I'm not getting the metadata that I putted in the ObjectMetadata.
Code sample for the upload process:
PutObjectRequest por = new PutObjectRequest(BUCKET_NAME, KEY_NAME, file);
ObjectMetadata metadata = new ObjectMetadata();
metadata.addUserMetadata("x-amz-meta-xxxxx", "test123");
por.setMetadata(metadata);
s3client.putObject(por);
I hope that I provided enough information