Skip to content

Instantly share code, notes, and snippets.

@hwayne
Last active July 23, 2017 03:40
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 hwayne/2ea51fddf991afcbc8c67624f5628052 to your computer and use it in GitHub Desktop.
Save hwayne/2ea51fddf991afcbc8c67624f5628052 to your computer and use it in GitHub Desktop.
AWS Data Pipelines
aws_pipeline = client.create_pipeline(name: pipeline_name,
unique_id: pipeline_uid,
description: 'Automatic')
begin
# AWS uses different JSON formats for CLI and ruby sdk.
tempjson = Tempfile.new('tempjson')
tempjson.write(JSON.dump(pipeline_schema))
tempjson.rewind
`aws datapipeline put-pipeline-definition --pipeline-id #{aws_pipeline.pipeline_id} --pipeline-definition file://#{tempjson.path}`
ensure
tempjson.close; tempjson.unlink
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment