Skip to content

acm1/ddblock

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ddblock (DynamoDB Lock)

CLI tool to acquire a distributed lock from DynamoDB.

Building

Install Glide if you don't already have it. On MacOS you can install it with Homebrew: brew install glide

To build a binary:

glide install
go build

To build a linux binary from another platform:

glide install
GOOS=linux go build

Setup

Create a DynamoDB table with a primary string key called Name. To acquire a lock called "mylock" in a table called "mytable":

./ddblock mytable mylock

By default the lock will last for 10 minutes. To unlock when you're done:

./ddblock -u mytable mylock

To acquire a lock before running a command, run the command, and then release the lock:

./ddblock mytable mylock && ./my_command ; ./ddblock -u mytable mylock

About

CLI tool for creating distributed DynamoDB locks

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%