I am trying to create an AWS Lambda function that processes a file loaded in the first bucket, then saves it in the second bucket and then deletes the input file.
The problem is that when I try to delete the file I get
{ "message": "Access Denied", "code": "AccessDenied", "time": "2015-02-09T22:08:45.926Z", "statusCode": 403, "retryable": false, "retryDelay": 30 }
A snippet of code that is trying to delete a file,
s3.deleteObject({ Bucket: inputBucket, Key: inputKey }, function(a, b) { if (a) { console.error("Error on delete"); console.error(a); } else { console.log("Deleted successfully"); } });
source share