Skip to content

Instantly share code, notes, and snippets.

@Remiii
Last active December 31, 2015 17:29
Show Gist options
  • Save Remiii/8020664 to your computer and use it in GitHub Desktop.
Save Remiii/8020664 to your computer and use it in GitHub Desktop.
SQS-QueueCreator

SQS-QueueCreator

Install PIP "python-pip"

$ apt-get install python-pip

Install "boto" with PIP

$ pip install -U boto

Mark: http://docs.pythonboto.org

riri
fifi
loulou
#! /usr/bin/env python2
from boto.sqs import connect_to_region
conn = connect_to_region('eu-west-1',
aws_access_key_id='xyz',
aws_secret_access_key='xyz')
with open('queue_ids.txt') as f:
for server_id in [line.strip() for line in f]:
print(server_id)
q = conn.create_queue(server_id)
q.set_attribute('ReceiveMessageWaitTimeSeconds', 20)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment