Questions tagged [boto]

boto is an open-source Python Interface to Amazon Web Services

Boto is a Python package that provides an interface to Amazon Web Services. The code is hosted on github.com (https://github.com/boto/boto) and the documentation can be found at http://docs.pythonboto.org.

Boto supports the following services:

  • Compute
    • Amazon Elastic Compute Cloud (EC2)
    • Amazon Elastic Map Reduce (EMR)
    • AutoScaling
    • Elastic Load Balancing (ELB)
  • Content Delivery
    • Amazon CloudFront
  • Database
    • Amazon Relational Data Service (RDS)
    • Amazon DynamoDB
    • Amazon SimpleDB
  • Deployment and Management
    • AWS Identity and Access Management (IAM)
    • Amazon CloudWatch
    • AWS Elastic Beanstalk
    • AWS CloudFormation
  • Application Services
    • Amazon CloudSearch
    • Amazon Simple Workflow Service (SWF)
    • Amazon Simple Queue Service (SQS)
    • Amazon Simple Notification Server (SNS)
    • Amazon Simple Email Service (SES)
  • Networking
    • Amazon Route53
    • Amazon Virtual Private Cloud (VPC)
  • Payments and Billing
    • Amazon Flexible Payment Service (FPS)
  • Storage
    • Amazon Simple Storage Service (S3)
    • Amazon Glacier
    • Amazon Elastic Block Store (EBS)
    • Google Cloud Storage
  • Workforce
    • Amazon Mechanical Turk
  • Other
    • Marketplace Web Services
2279 questions
57
votes
7 answers

Disable boto logging without modifying the boto files

I am using the Boto library to talk to AWS. I want to disable logging. (Or redirect to /dev/null or other file). I can't find an obvious way to do this. I tried this, but that doesn't seem to help: import boto boto.set_file_logger('boto',…
agiliq
  • 6,802
  • 12
  • 50
  • 73
54
votes
2 answers

Is it better to have multiple s3 buckets or one bucket with sub folders?

Is it better to have multiple s3 buckets per category of uploads or one bucket with sub folders OR a linked s3 bucket? I know for sure there will be more user-images than there will be profille-pics and that there is a 5TB limit per bucket and 100…
user805981
  • 7,315
  • 7
  • 36
  • 60
54
votes
3 answers

Using Amazon s3 boto library, how can I get the URL of a saved key?

I am saving a key to a bucket with: key = bucket.new_key(fileName) key.set_contents_from_string(base64.b64decode(data)) key.set_metadata('Content-Type', 'image/jpeg') key.set_acl('public-read') After the save is successful, how can…
S-K'
  • 2,968
  • 7
  • 33
  • 46
54
votes
9 answers

boto.exception.S3ResponseError: S3ResponseError: 403 Forbidden

I'm trying to get django to upload static files to S3, but istead I'm getting a 403 forbidden error, and I'm not sure why. Full Stacktrace: Traceback (most recent call last): File "manage.py", line 14, in execute_manager(settings) …
Levi Campbell
  • 5,753
  • 7
  • 36
  • 45
51
votes
6 answers

Can you upload to S3 using a stream rather than a local file?

I need to create a CSV and upload it to an S3 bucket. Since I'm creating the file on the fly, it would be better if I could write it directly to S3 bucket as it is being created rather than writing the whole file locally, and then uploading the file…
inquiring minds
  • 1,275
  • 1
  • 12
  • 16
51
votes
9 answers

How do I install boto?

So that I am able to work with it within my python scripts?
Worbis
  • 547
  • 1
  • 4
  • 3
50
votes
12 answers

Why are no Amazon S3 authentication handlers ready?

I have my $AWS_ACCESS_KEY_ID and $AWS_SECRET_ACCESS_KEY environment variables set properly, and I run this code: import boto conn = boto.connect_s3() and get this error: boto.exception.NoAuthHandlerFound: No handler was ready to authenticate. 1…
user334856
50
votes
7 answers

Python boto, list contents of specific dir in bucket

I have S3 access only to a specific directory in an S3 bucket. For example, with the s3cmd command if I try to list the whole bucket: $ s3cmd ls s3://bucket-name I get an error: Access to bucket 'my-bucket-url' was denied But if I try access a…
Martin Taleski
  • 4,865
  • 9
  • 32
  • 69
49
votes
4 answers

How to upload a file to Google Cloud Storage on Python 3?

How can I upload a file to Google Cloud Storage from Python 3? Eventually Python 2, if it's infeasible from Python 3. I've looked and looked, but haven't found a solution that actually works. I tried boto, but when I try to generate the necessary…
aknuds1
  • 57,609
  • 57
  • 177
  • 299
48
votes
1 answer

Difference between s3cmd, boto and AWS CLI

I am thinking about redeploying my static website to Amazon S3. I need to automate the deployment so I was looking for an API for such tasks. I'm a bit confused over the different options. Question: What is the difference between s3cmd, the Python…
user1781186
42
votes
4 answers

How to get the region of the current user from boto?

Problem: I'm trying to get the region of the authenticated user from boto3. Use case: I'm working on adding cache to https://github.com/pmazurek/aws-fuzzy-finder. I would prefer to cache the result on per-region basis. This package uses boto to get…
Piotr Mazurek
  • 761
  • 1
  • 5
  • 12
42
votes
8 answers

Is it possible to save datetime to DynamoDB?

I have the next code: users_table = Table(users_table_name, connection=Core.aws_dynamodb_connection) users_table.put_item(data={ "login": login, "password": hashlib.sha256(password.encode("utf-8")).hexdigest(), "profile": profile, …
42
votes
6 answers

DynamoDB : The provided key element does not match the schema

Is there a way to get an item depending on a field that is not the hashkey? Example My Table Users: id (HashKey), name, email And I want to retrieve the user having email as 'test@mail.com' How this can be done? I try this with boto: user =…
user1635536
41
votes
10 answers

Upload image available at public URL to S3 using boto

I'm working in a Python web environment and I can simply upload a file from the filesystem to S3 using boto's key.set_contents_from_filename(path/to/file). However, I'd like to upload an image that is already on the web (say…
dgh
  • 8,060
  • 9
  • 35
  • 48
39
votes
6 answers

Overwrite S3 endpoint using Boto3 configuration file

OVERVIEW: I'm trying to overwrite certain variables in boto3 using configuration file (~/aws/confg). In my usecase I want to use fakes3 service and send S3 requests to the localhost. EXAMPLE: In boto (not boto3), I can create a config in ~/.boto…
Vor
  • 27,623
  • 37
  • 119
  • 184