Is there a way to feed base64 encoded string to the ingest_attachment plugin or fscrawler?

The documents are obtained from an API as a base64 string and sent to amazon s3. I actually learned how to use fscrawler from your video on youtube. But on searching a lot, there's no functionality for indexing something that's in s3 as of now. So I thought I should index the documents in elastic search before sending it to s3(while it's in base64 format). Basically, I want lots of letters(obtained from an API as base64 string but are always pdf/docs) to be indexed by fscrawler or ingest attachment plugins and search keywords through them.