AWS Classroom Series – 29/May/2021

Managing storage lifecycle

  • To manage objects so that they are stored cost effectively, we use lifecycle
  • An S3 lifecycle configuration is a set of rule that define actions that applies to group of objects
    • Transition action:

      • defines when the objects transition to from one storage class to other
      • There are costs associated with the lifecycle transition requests
      • Supported transitions Preview
    • Expiration action: Define when the object expires

  • Lets create a life cycle configuration Preview Preview Preview

Replicating Objects

  • Replication enables automatic, asynchronous copying of objects across S3 buckets.

  • Buckets that are configured for object replicated

    • can be owned by same AWS account or different
    • Can be replicated into different AWS regions.
    • Can be replicated to one S3 bucket or multiple S3
  • To enable object replication, we need to provide the following details

    • The destination bucket(s)
    • AWS IAM role that Amazon s3 can assume to replicate objects on your behalf
  • Setting up replication Preview

Using S3 Versioning

  • Versioning in S3 means keeping multiple variants of the objects in the same bucket Preview Preview Preview

Exercise

  • Create an s3 bucket
    • Add a folder called as images
    • upload 10 images
  • Find the storage class of any image
  • Add one more folder called as docs
    • upload a file called as Readme.txt
    • Enable Versioning for the bucket
  • Upload two more versions and verify the presence of versions
  • Create a life cycle rule to
    • move all the objects older than 60 days to Standard-IA

AWS CLI

aws configure
# region : us-west-2
  • Verify the access
aws s3 ls
  • AWS CLI commands
aws <service> <action> <--parameter1 value1>...<--parametern valuen>

AWS S3 CLI

  1. S3URI: The format for s3 bucket and object naming
s3://<bucket-name>
Eg:
s3://qts3bucket
  1. Commands
    • ls => listing
    • cp => copying
    • mb => create bucket
    • mv => moving the objects
    • rb => removing bucket
    • rm => removing the objects
  2. Listing buckets and its contents Preview Preview
  3. Listing s3 buckets folder contents Preview

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Social Network Widget by Acurax Small Business Website Designers

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube