Skip to content

Instantly share code, notes, and snippets.

@justinhennessy
Created August 14, 2019 11:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinhennessy/70df84063e7e38da862508f2311a3183 to your computer and use it in GitHub Desktop.
Save justinhennessy/70df84063e7e38da862508f2311a3183 to your computer and use it in GitHub Desktop.
require 'aws-sdk'
require 'json'
file = File.open "example.json"
data = JSON.load file
table = ARGV.shift
data["table"] = table || data["table"]
client = Aws::Lambda::Client.new
resp = client.invoke_async(
function_name: "athenapartitioner-aws",
invoke_args: "#{data.to_json}"
)
puts resp.status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment