I have a lambda function set up with api gateway.when I upload a json file I get these 3 lines on top when I check the file in S3. how can i remove this.
I tried using diffrent variations with split() but I keep removing the wrong lines
I can’t tell you if removing this data is a good idea or not and suspect you would need to set the correct URI request parameters here Someone more informed would need to comment on this.
What I can tell you is what you are trying to achieve with a string output and split() is possible. One way is to use a regex with capture
e.g. /(\[)/ <- will capture the escaped opening bracket inside the parentheses
Thanks, that fixed it. the reason I needed the top 3 lines removed because I have another lambda function that has a trigger on that S3 bucket which grabs the json and splits it. so it can go into DynamoDB as separate entries