  local bucket="$1"
  local key="$2"
  local versionID="$3"

  aws s3api get-object --bucket "$bucket" --key "$key" --version-id "$versionID" "$tmpfile"
  aws s3api put-object --bucket "$bucket" --key "$key" --body "$tmpfile"

  STATE="${bucket}/${key}"
  dynamodb_key="{ \"LockID\": { \"S\": \"${STATE}-md5\" } }"