Various Boto Commands generate HTTP 400 Errors

146 views
Skip to first unread message

John Vogtle

unread,
Nov 26, 2014, 2:20:42 PM11/26/14
to boto-...@googlegroups.com
I've been using boto for several years now.  As of several days ago, Amazon appears to be returning an HTTP 400 response code on various failed commands.  For example, the following code for checking the for the existence of a queue:

import boto
sqs = boto.connect_sqs()
dummy = sqs.lookup("nosuchqueue")

returns:

400 Bad Request

<?xml version="1.0"?><ErrorResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/"><Error><Type>Sender</Type><Code>AWS.SimpleQueueService.NonExistentQueue</Code><Message>The specified queue does not exist for this wsdl version.</Message><Detail/></Error><RequestId>1c4a0bfd-08b7-5aa1-ac59-470d20880b1a</RequestId></ErrorResponse>

Boto's documentation says that if the queue doesn't exist, the returned queue object should be None (it is) but the HTTP 400 response code is new.  I've seen the same behavior using ec2.create_image() if the AMI name already exists:

EC2ResponseError: EC2ResponseError: 400 Bad Request

<?xml version="1.0" encoding="UTF-8"?>

<Response><Errors><Error><Code>InvalidAMIName.Duplicate</Code><Message>AMI name CloudDOCX Ubuntu 12.04 - 20141124 ebs-ssd is already in use by AMI ami-04b4296c</Message></Error></Errors><RequestID>02713298-b33b-49be-85bf-bed5c4ebd65b</RequestID></Response>

Looking at boto/connector.py (get_object) shows that if the response status is other than 200, the above messages will be displayed.

I'm seeing this for boto versions 2.29.1 and 2.34.0.  I don't think it's a boto problem per se but wanted to see if anyone else is seeing something similar.

Thanks much.

    John M. Vogtle

John Vogtle

unread,
Dec 1, 2014, 6:49:35 AM12/1/14
to boto-...@googlegroups.com
Responding to my own post...

In reviewing the AWS Documentation, the underlying GetQueueUrl service should return an HTTP 400 response code if the queue doesn't exist.  Not sure why it didn't previously. (sigh).  I'll work with the boto developers to either implement a change or live with the results.

    -John

Tamás Sztanka-Tóth

unread,
Jul 13, 2015, 6:40:31 PM7/13/15
to boto-...@googlegroups.com
Hi!

Have you solved this issue somehow? I am getting the same error...

Tamas
Reply all
Reply to author
Forward
0 new messages