Description
======================== Async AWS SDK for Python ======================== .. image:: https://img.shields.io/pypi/v/aioboto3.svg :target: https://pypi.python.org/pypi/aioboto3 .. image:: https://github.com/terrycain/aioboto3/actions/workflows/CI.yml/badge.svg :target: https://github.com/terrycain/aioboto3/actions .. image:: https://readthedocs.org/projects/aioboto3/badge/?version=latest :target: https://aioboto3.readthedocs.io :alt: Documentation Status .. image:: https://pyup.io/repos/github/terrycain/aioboto3/shield.svg :target: https://pyup.io/repos/github/terrycain/aioboto3/ :alt: Updates **Breaking changes for v11: The S3Transfer config passed into upload/download_file etc.. has been updated to that it matches what boto3 uses** **Breaking changes for v9: aioboto3.resource and aioboto3.client methods no longer exist, make a session then call session.client etc...** This was done for various reasons but mainly that it prevents the default session living longer than it should as that breaks situations where eventloops are replaced. **The .client and .resource functions must now be used as async context managers.** Now that aiobotocore has reached version 1.0.1, a side effect of the work put in to fix various issues like bucket region redirection and supporting web assume role type credentials, the client must now be instantiated using a context manager, which by extension applies to the resource creator. You used to get away with calling ``res = aioboto3.resource('dynamodb')`` but that no longer works. If you really want to do that, you can do ``res = await aioboto3.resource('dynamodb').__aenter__()`` but you'll need to remember to call ``__aexit__``. There will most likely be some parts that dont work now which I've missed, just make an issue and we'll get them resoved quickly. Creating service resources must also be async now, e.g. .. code-block:: python async def main(): session = aioboto3.Session() async with session.resource("s3") as s3: bucket = await s3.Bucket('mybucket') # <---------------- async for s3_object in bucket.objects.all(): print(s3_object) Updating to aiobotocore 1.0.1 also brings with it support for running inside EKS as well as asyncifying ``get_presigned_url`` ---- This package is mostly just a wrapper combining the great work of boto3_ and aiobotocore_. aiobotocore allows you to use near enough all of the boto3 client commands in an async manner just by prefixing the command with ``await``. With aioboto3 you can now use the higher level APIs provided by boto3 in an asynchronous manner. Mainly I developed this as I wanted to use the boto3 dynamodb Table object in some async microservices. While all resources in boto3 should work I havent tested them all, so if what your after is not in the table below then try it out, if it works drop me an issue with a simple test case and I'll add it to the table. +---------------------------+--------------------+ | Services | Status | +===========================+====================+ | DynamoDB Service Resource | Tested and working | +---------------------------+--------------------+ | DynamoDB Table | Tested and working | +---------------------------+--------------------+ | S3 | Working | +---------------------------+--------------------+ | Kinesis | Working | +---------------------------+--------------------+ | SSM Parameter Store | Working | +---------------------------+--------------------+ | Athena | Working | +---------------------------+--------------------+ Example ------- Simple example of using aioboto3 to put items into a dynamodb table .. code-block:: python import asyncio import aioboto3 from boto3.dynamodb.conditions import Key async def main(): session = aioboto3.Session() async with session.resource('dynamodb', region_name='eu-central-1') as dynamo_resource: table = await dynamo_resource.Table('test_table') await table.put_item( Item={'pk': 'test1', 'col1': 'some_data'} ) result = await table.query( KeyConditionExpression=Key('pk').eq('test1') ) # Example batch write more_items = [{'pk': 't2', 'col1': 'c1'}, \ {'pk': 't3', 'col1': 'c3'}] async with table.batch_writer() as batch: for item_ in more_items: await batch.put_item(Item=item_) loop = asyncio.get_event_loop() loop.run_until_complete(main()) # Outputs: # [{'col1': 'some_data', 'pk': 'test1'}] Things that either dont work or have been patched ------------------------------------------------- As this library literally wraps boto3, its inevitable that some t
Release History
| Version | Changes | Urgency | Date |
|---|---|---|---|
| 15.5.0 | Imported from PyPI (15.5.0) | Low | 4/21/2026 |
| v15.5.0 | Tag v15.5.0 | Low | 10/30/2025 |
| v15.4.0 | Tag v15.4.0 | Low | 10/18/2025 |
| v15.3.0 | Tag v15.3.0 | Low | 10/18/2025 |
| v15.2.0 | Tag v15.2.0 | Low | 10/4/2025 |
| v15.1.0 | Tag v15.1.0 | Low | 8/14/2025 |
| v15.0.0 | Tag v15.0.0 | Low | 6/26/2025 |
| v14.3.0 | Tag v14.3.0 | Low | 5/7/2025 |
| v14.2.0 | Tag v14.2.0 | Low | 5/5/2025 |
| v14.1.0 | Tag v14.1.0 | Low | 3/4/2025 |
| v14.0.0 | Tag v14.0.0 | Low | 2/23/2025 |
| v13.4.0 | Tag v13.4.0 | Low | 1/19/2025 |
| v13.3.0 | Tag v13.3.0 | Low | 12/21/2024 |
| v13.2.0 | Tag v13.2.0 | Low | 10/13/2024 |
| v13.1.1 | Tag v13.1.1 | Low | 7/9/2024 |
| v13.1.0 | Tag v13.1.0 | Low | 6/25/2024 |
| v13.0.1 | Tag v13.0.1 | Low | 6/5/2024 |
| v13.0.0 | Tag v13.0.0 | Low | 5/27/2024 |
| v12.4.0 | Tag v12.4.0 | Low | 4/15/2024 |
| v12.3.0 | Tag v12.3.0 | Low | 2/4/2024 |
| v12.2.0 | Tag v12.2.0 | Low | 1/16/2024 |
