How to use AWS.Textract?

Managed to find the solution!!! :tada:

encoded_file_str = File.read!("sample-1.png") |> Base.encode64()

AWS.Client.create("XXX", "XXX", "ap-southeast-1")
|> AWS.Textract.analyze_document(%{
  "Document" => %{"Bytes" => encoded_file_str},
  "FeatureTypes" => ["TABLES"]
})

Thanks @benwilson512 for the hints!!!

3 Likes