Lab 2
Lab 2
• You can enable versioning by clicking on the bucket, then click on properties and
then click on Enable versioning, then click on Save button.
Versioning
If you uploaded a new version of an object(eg. one file) you can press Show button
in order to see all the object’s version.
Delete Markers
• A delete marker is a placeholder (marker) for a versioned
object that was named in a simple DELETE request. Because
the object was in a versioning-enabled bucket, the object was
not deleted. The delete marker, however, makes Amazon S3
behave as if it had been deleted.
• A delete marker has a key name (or key) and version ID like
any other object.
Delete Markers
• You can delete a file from a bucket thus: click on Hide, select
the file, click on More, click on Delete.
Delete Markers
• Click on Delete.
Delete Markers
Click on Show. It can be seen that text.txt has a delete marker
associated. If you delete the marker the file will be restored.
If you want to completely delete the file you have to delete all
versions that are associated with the file.
Object Lifecycle Management
• To manage your objects so that they are stored cost
effectively throughout their lifecycle, we can
configure their Amazon S3 Lifecycle. There are two
types of actions:
– Transition actions—Define when objects transition to
another storage class storage class. There are costs
associated with the lifecycle transition requests.
– Expiration actions—Define when objects expire.
Amazon S3 deletes expired objects on your behalf. The
lifecycle expiration costs depend on when you choose to
expire objects
Object Lifecycle Management
You can add a lifecycle rule thus: click on your
bucket, then click on Management, then click on
Lifecycle, then click on “Add lifecycle rule”.
Object Lifecycle Management
Enter the rule name and chose the scope. You
can apply the rule to all objects or to all objects
from a prefix. Click on “Apply to all objects in the
bucket, then click Next.
Object Lifecycle Management
Chose Previous versions, then click Next.
Object Lifecycle Management
You can chose after how many days to delete
the previous versions of the objects, then click
on Next button.
Object Lifecycle Management
Click on Save button.
AWS S3 Replication
Amazon S3 Replication enables automatic, asynchronous
copying of objects across Amazon S3 buckets. With Amazon S3
Replication, you can configure Amazon S3 to automatically
replicate S3 objects across different AWS Regions by using
Amazon S3 Cross-Region Replication (CRR) or between buckets in
the same AWS Region by using Amazon S3 Same-Region
Replication (SRR).
It can be used in order to have a back-up for your bucket.
AWS S3 Replication
You can add a replication rule thus: click on your
bucket, then click on Management, then click on
Replication, then click on “Add rule”
AWS S3 Replication
Click on entire bucket, then click on Next button
AWS S3 Replication
Chose the destination bucket and then click on
Next button. Both buckets should have
versioning enabled.
AWS S3 Replication
Chose Create new role, a rule name, then click
on Next.
AWS S3 Replication
Click on Save button.
Storage classes
• Amazon S3 offers a range of storage classes designed for
different use cases.
• These include:
– S3 Standard for general-purpose storage of frequently
accessed data;
– S3 Intelligent-Tiering for data with unknown or changing
access patterns;
– S3 One Zone-Infrequent Access (S3 One Zone-IA) for long-lived,
but less frequently accessed data;
– Amazon S3 Glacier (S3 Glacier) and Amazon S3 Glacier Deep
Archive (S3 Glacier Deep Archive) for long-term archive and
digital preservation.
Storage classes - Performance
Storage classes - Performance
AWS Pricing
• You pay for storing objects in your S3 buckets.