Get started quickly using AWS with boto3, the AWS SDK for Python. Boto3 makes it easy to integrate your Python application, library, or script with AWS services including Amazon S3, Amazon EC2, Amazon DynamoDB, and more.
for i in ec2.instances.all():
if i.state['Name'] == 'stopped':
Up-to-date and Consistent Interface
Boto3's 'client' and 'resource' interfaces have dynamically generated classes driven by JSON models that describe AWS APIs. This allows us to provide very fast updates with strong consistency across all supported services.
Support for Python 2 and 3
Boto3 was written from the ground up to provide native support in Python versions 2.7+ and 3.4+.
Boto3 comes with 'waiters', which automatically poll for pre-defined status changes in AWS resources. For example, you can start an Amazon EC2 instance and use a waiter to wait until it reaches the 'running' state, or you can create a new Amazon DynamoDB table and wait until it is available to use. Boto3 has waiters for both client and resource APIs.
Service-specific High-level Features