Using Amazon $NAME with Boto

Today, Amazon announced it's new $NAME service available in all five AWS regions. This new service automatically integrates with your existing systems with no configuration required. As requested, we've integrated it into boto. You don't even have to upgrade your installation, it's there for all versions by default.

Usage of $NAME is simple, you first have to sign up for the service, and then you'll notice a new connect_ method is available to you, connect_me().


>>> import boto
>>> me = boto.connect_me()
>>> me.hardware()
[u'sofa', u'closet', u'barn', u'dishwasher', u'pillow']
>>> me.services()
[u'ec2', u'sqs', u'input', u'output']

You can interact with hardware by name:

>>> lr_sofa = me.get_sofa("livingroom")
>>> lr_sofa.is_clean
False
>>> lr_sofa.vacuum()
u'Pending'

Most actions, like vacuum() take some time, so we can queue up a bunch of commands at once:

>>> lr_sofa.shampoo()
u'Queued'
>>> lr_sofa.dry()
u'Queued'
>>> lr_sofa.add(me.get_pillow())
u'Queued'

You'll also note here that we can call get_pillow with no arguments to just grab a random pillow available, instead of a specific one.


Next, we can see all the actions that are pending, as well as an estimated time to completion (ttc):

>>> lr_sofa.get_tasks()
[(u'clean', u'Running'), (u'vacuum', u'Queued'), (u'shampoo', u'Queued'), (u'dry', u'Queued'), (u'add(pl-012573)', 'Queued')]
>>> lr_sofa.get_ttc()
1789

Note that the ttc is returned as a number of seconds from now, in this case it's just under 30 minutes before we can expect all these tasks to be completed.

That's it! Have fun using the new $NAME service from Amazon!

Comments

Tim Little said…
The dymo label printer is amazing since it is a theraml printer never needing ink cartridges and printing labels on one side and postage on the other.
reehasmith said…
If you are interested to buy Ink cartridges with low prices and best quality than visit Ink cartridges
casinononaams said…
Order assignments safely at do my essay. The service is DMCA protected. We never disclose information about customers and payments to any third party. We foster security and work to let the world know you’re the author.
Tommy543 said…
This comment has been removed by the author.
LasseNielsen said…
I'm a university student studying for my post graduate. I have been using https://www.fellowshippersonalstatement.com/ since my undergraduate degree and all through my time during university. The service is always there for me, always has writers available to complete my task and I have developed quite a nice relationship with many members of their staff.