Skip to content

Instantly share code, notes, and snippets.

View prabhatsharma's full-sized avatar
🎯
Focusing

Prabhat Sharma prabhatsharma

🎯
Focusing
View GitHub Profile
from kazoo.client import KazooClient
connection_string = "zookeeper-headless.zookeeper.svc.cluster.local:2181"
zk = KazooClient(hosts=connection_string)
zk.start()
def get_node(path="/"):
if zk.exists(path):
@prabhatsharma
prabhatsharma / bucket-policy.json
Last active January 25, 2019 11:23
s3-bucket-policy to restrict access only from certain VPCs
{
"Version": "2012-10-17",
"Id": "Policy1415115909153",
"Statement": [
{
"Sid": "Access-to-specific-VPCs-only",
"Principal": "*",
"Action": "s3:*",
"Effect": "Deny",
"Resource": [