Skip to content

Instantly share code, notes, and snippets.

@markpeek
Created October 10, 2017 20:00
Show Gist options
  • Save markpeek/ba167bd03a171e29b8f89dcccadf5d75 to your computer and use it in GitHub Desktop.
Save markpeek/ba167bd03a171e29b8f89dcccadf5d75 to your computer and use it in GitHub Desktop.
Sample Pipeline for troposphere
t = Template()
DynamoDBInputS3OutputHive = t.add_resource(Pipeline(
"DynamoDBInputS3OutputHive",
Activate="true",
Name="DynamoDBInputS3OutputHive",
ParameterValues=[
ParameterValue(
StringValue=Ref("TableName"),
Id="myDDBTableName",
),
],
ParameterObjects=[
ParameterObject(
Attributes=[
ParameterObjectAttribute(
Key="description",
StringValue="DynamoDB read throughput ratio"
),
ParameterObjectAttribute(
Key="type",
StringValue="Double"
),
ParameterObjectAttribute(
Key="default",
StringValue="0.2"
),
],
Id="myDDBReadThroughputRatio,
),
ParameterObject(
Attributes=[
ParameterObjectAttribute(
StringValue="S3 output bucket",
Key="description",
},
ParameterObjectAttribute(
StringValue="AWS::S3::ObjectKey",
Key="type",
},
ParameterObjectAttribute(
StringValue=Join("", ["s3://", Ref("S3OutputLoc")]),
Key="default",
),
ParameterObject(
Attributes=[
ParameterObjectAttribute(
StringValue="DynamoDB Table Name",
Key="description",
),
],
),
),
Description="Pipeline to backup DynamoDB data to S3",
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment