Developer Interface¶
Backends¶
Storage backends provided by the storages_ec2
app.
-
class
storages_ec2.backends.
AutoConnectS3Boto3Storage
(*args, **kwargs)¶ S3 storage backend that automatically authenticates.
This storage class generates temporary credentials using EC2 metadata and then authenticates S3 reqeuests with those credentials.
This class is a wrapper around the
S3Boto3Storage
class from the django-storages app.-
bucket
¶ Get a connection to the instance’s bucket.
We can only cache the bucket for the time that the instance’s credentials are valid for, so a new connection will be generated if the instance’s credentials are about to expire.
-
connection
¶ Get a connection to S3.
-
credentials
¶ dict – Get temporary credentials used to authenticate a request to S3.
-
credentials_valid
¶ bool – Determine if the instance’s credentials are valid.
-
instance_role
¶ str – The name of the role being used by the current instance.
-