I am developing a custom JavaScript enrichment to add and modify event attributes. To attach this script, is it possible to upload the script to an S3 bucket and reference the enrichment JSON in DynamoDB?
Also one more doubt - I want to confirm whether JavaScript custom enrichments can directly add new fields at the root level of the event or if they must always be returned as a derived entity inside derived_contexts.
It’ll be as a derived entity - this is in keeping with the idea that enrichments that add data at enrichment time are inserted as contexts. Although you can modify properties at the root you cannot set them - as this would break the format of the event itself.