Using AWS Cloud Services, I am using an S3 trigger to monitor a bucket and invoke a Lambda function. This function then picks up the S3 object to populate a DynamoDB table.
The problem is that I now need to monitor multiple directories for changes and each directory has meta data (not available in the object) that needs to be passed to the DynamoDB. I do not know of a way to pass this meta information from the trigger to the lambda. I currently have the Lambda duplicated for each directory with the meta information saved as environment variables for each Lambda. This works, but feels like a terrible hack.
How can I go about using a single Lambda to monitor multiple directories passing the meta arguments from the trigger to the Lambda?