Posts about cloud

Kibana proxy for AWS ECS (Fargate)

23 January 2019

One of the most annoying parts of setting up Elastic Search on AWS is the way access is configured for that service. From what i've gathered you have one of two options to protect it:

  1. Make sure it's running internally only (i.e. not internet facing and only available to the other services on the same VPC)
  2. Completely open to the internet and eventually relying (if you can make it work) on the Cognito authentication service

Typically you would, as we did, go for the path of least resistance ...

OCR using the open Google Cloud Vision API

22 February 2016
Just create a new api key in the developer console, replace it in the code below and it should work. Then you can call "whatever_you_call_the_file.rb /Downloads/some_image_with_text.jpg" and google will OCR-it and the script will print out the recognized text.
require "base64"
require 'net/http'
require 'json'

# Base 64 the input image
b64_data = Base64.encode64(File.open(ARGV[0], "rb").read)

# Stuff we need
api_key = ""
content_type = "Content-Type: application/json"
url = "https://vision.g...
Displaying all 2 posts