Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

check for subscribed services #525

Open
rubic opened this Issue · 0 comments

1 participant

@rubic

It would be handy if boto could be queried to determine if an account was subscribed to a specific AWS service. Libararies built on boto could provide a more useful error message or check the subscription earlier in the process.

What follows is a non-exhaustive list of errors that occur when attempting to access non-subscribed services. Note the return codes 403, 401 and error messages aren't consistent.

We could incorporate the info below into boto by adding an is_subscribed method for each kind of connection.

SQS

conn = boto.connect_sqs()
conn.get_all_queues()

SQSError: SQSError: 403 Forbidden
Type: CodeOptInRequired
Message: The AWS Access Key Id needs a subscription for the service.

Route53

conn = boto.connect_route53()
conn.get_all_hosted_zones()

DNSServerError: DNSServerError: 403 Forbidden
Type: CodeOptInRequired
Message: The AWS Access Key Id needs a subscription for the service

RDS

conn = boto.connect_rds()
conn.get_all_dbinstances()

BotoServerError: BotoServerError: 403 Forbidden
Type: CodeOptInRequired
Message: The AWS Access Key Id needs a subscription for the service

SES

conn = boto.connect_ses()
conn.get_send_quota()

BotoServerError: BotoServerError: 403 Forbidden
Type: CodeOptInRequired
Message: The AWS Access Key Id needs a subscription for the service

EMR

from boto.emr.connection import EmrConnection
conn = EmrConnection()
conn.describe_jobflows()

EmrResponseError: EmrResponseError: 403 Forbidden
Type: CodeOptInRequired
Message: The AWS Access Key Id needs a subscription for the service

Cloud Front

conn = boto.connect_cloudfront()
conn.get_all_distributions()

CloudFrontServerError: CloudFrontServerError: 403 Forbidden
Type: CodeOptInRequired
Message: The AWS Access Key Id needs a subscription for the service

SimpleDB

conn = boto.connect_sdb()
conn.get_all_domains()

SDBResponseError: SDBResponseError: 401 Unauthorized
Code: SubscriptionCheckFailed
Message: Subscription check failed. Please sign up for Amazon SimpleDB service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.